Working so far, VariantECS progress
-
- Posts: 4373
- Joined: February 28th, 2013, 3:23 am
- Location: Oklahoma, United States
Working so far, VariantECS progress
Variant based ECS
Here's what I have so far, it's just a blue circle that can be moved around on the screen. No clipping/clamping so will crash if you try going offscreen.
I know it's a pretty simple demo, but considering the amount of head-banging-against-the-wall I did, I'm going to call it a miracle I even got this far.
Funny story, wife asked what I've been spending so much time on, when I tried telling here she asks: "so what's it do?" I got a little red as I had to say, "well, nothing at the moment" since I hadn't even gotten the input working yet. Damn, so embarrassing.
I'm not sure the library portion would even be easy enough to use, unless you were comfortable using templates and understand a few things about template instantiation rules, which I'm no expert. I'm just fumbling around until it works. Then there are the ambiguous compiler errors if you forget some overloads, or misuse std::variant.
Here's what I have so far, it's just a blue circle that can be moved around on the screen. No clipping/clamping so will crash if you try going offscreen.
I know it's a pretty simple demo, but considering the amount of head-banging-against-the-wall I did, I'm going to call it a miracle I even got this far.
Funny story, wife asked what I've been spending so much time on, when I tried telling here she asks: "so what's it do?" I got a little red as I had to say, "well, nothing at the moment" since I hadn't even gotten the input working yet. Damn, so embarrassing.
I'm not sure the library portion would even be easy enough to use, unless you were comfortable using templates and understand a few things about template instantiation rules, which I'm no expert. I'm just fumbling around until it works. Then there are the ambiguous compiler errors if you forget some overloads, or misuse std::variant.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com
-
- Posts: 4373
- Joined: February 28th, 2013, 3:23 am
- Location: Oklahoma, United States
Re: Working so far, VariantECS progress
Been adding and reorganizing some things, and come across another annoying design flaw in ma'system. After a couple of edits, I ended up having what were essentially the same code with different aliases. Well, std::variant didn't like that. It like's unique types so it can work it's magic and find the active type in the list of possible types. While, I know how to get around this, I'm inclined for now, just to mark these types as a Default type, and just have fewer types in the std::variant.
I might also have a way to make things a lot cleaner, which would be freaking great. Right now, using this hand-rolled library is a bit of a pain. I like what templates can do, but it does get annoying after awhile having to always think about the template parameters of a class or function. I heard in a video, "spend 6 minutes coding and spend 6 hours debugging" or something like that, and man are they right.
Shit, I ought to be an expert in this stuff by the end of this project. So much work, just to play around with some f'ing pixels, WHY HAVE I DONE THIS TO MYSELF?!
LOL.
I enjoy learning and the challenge of it keeps me busy. Depending on how this works out, I'll upload to github soon.
I might also have a way to make things a lot cleaner, which would be freaking great. Right now, using this hand-rolled library is a bit of a pain. I like what templates can do, but it does get annoying after awhile having to always think about the template parameters of a class or function. I heard in a video, "spend 6 minutes coding and spend 6 hours debugging" or something like that, and man are they right.
Shit, I ought to be an expert in this stuff by the end of this project. So much work, just to play around with some f'ing pixels, WHY HAVE I DONE THIS TO MYSELF?!
LOL.
I enjoy learning and the challenge of it keeps me busy. Depending on how this works out, I'll upload to github soon.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com
-
- Posts: 4373
- Joined: February 28th, 2013, 3:23 am
- Location: Oklahoma, United States
Re: Working so far, VariantECS progress
Visual Studio wrote: Severity Code Description Project File Line Suppression State
Error C2614 'MovableMessageDispatcher': illegal member initialization: 'SystemMessageDispatchBase<screws::ECS_System<movable_tag,std::variant<screws::ECS_Entity<player_tag,std::variant<screws::ECS_Component<damage_tag>,screws::ECS_Component<dimension_tag>,screws::ECS_Component<health_tag>,screws::ECS_Component<orientation_tag>,screws::ECS_Component<position_tag>,screws::ECS_Component<shape_tag>,screws::ECS_Component<shield_tag>,screws::ECS_Component<velocity_tag> >,std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,std::variant<screws::ECS_Receiver<std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,screws::ECS_MessageFilter<std::nullptr_t> >,screws::ECS_Receiver<std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,screws::ECS_MessageFilter<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag> > >,screws::ECS_Receiver<std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,screws::ECS_MessageFilter<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> > >,screws::ECS_Receiver<std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,screws::ECS_MessageFilter<screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag> > > >,std::variant<screws::ECS_Sender<std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,std::variant<screws::ECS_Receiver<std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,screws::ECS_MessageFilter<std::nullptr_t> >,screws::ECS_Receiver<std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,screws::ECS_MessageFilter<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag> > >,screws::ECS_Receiver<std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,screws::ECS_MessageFilter<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> > >,screws::ECS_Receiver<std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,screws::ECS_MessageFilter<screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag> > > > > > >,screws::ECS_Entity<enemy_tag,std::variant<screws::ECS_Component<damage_tag>,screws::ECS_Component<dimension_tag>,screws::ECS_Component<health_tag>,screws::ECS_Component<orientation_tag>,screws::ECS_Component<position_tag>,screws::ECS_Component<shape_tag>,screws::ECS_Component<shield_tag>,screws::ECS_Component<velocity_tag> >,std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,std::variant<screws::ECS_Receiver<std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,screws::ECS_MessageFilter<std::nullptr_t> >,screws::ECS_Receiver<std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,screws::ECS_MessageFilter<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag> > >,screws::ECS_Receiver<std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,screws::ECS_MessageFilter<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> > >,screws::ECS_Receiver<std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,screws::ECS_MessageFilter<screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag> > > >,std::variant<screws::ECS_Sender<std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,std::variant<screws::ECS_Receiver<std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,screws::ECS_MessageFilter<std::nullptr_t> >,screws::ECS_Receiver<std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,screws::ECS_MessageFilter<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag> > >,screws::ECS_Receiver<std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,screws::ECS_MessageFilter<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> > >,screws::ECS_Receiver<std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,screws::ECS_MessageFilter<screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag> > > > > > >,screws::ECS_Entity<wall_tag,std::variant<screws::ECS_Component<damage_tag>,screws::ECS_Component<dimension_tag>,screws::ECS_Component<health_tag>,screws::ECS_Component<orientation_tag>,screws::ECS_Component<position_tag>,screws::ECS_Component<shape_tag>,screws::ECS_Component<shield_tag>,screws::ECS_Component<velocity_tag> >,std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,std::variant<screws::ECS_Receiver<std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,screws::ECS_MessageFilter<std::nullptr_t> >,screws::ECS_Receiver<std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,screws::ECS_MessageFilter<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag> > >,screws::ECS_Receiver<std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,screws::ECS_MessageFilter<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> > >,screws::ECS_Receiver<std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,screws::ECS_MessageFilter<screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag> > > >,std::variant<screws::ECS_Sender<std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,std::variant<screws::ECS_Receiver<std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,screws::ECS_MessageFilter<std::nullptr_t> >,screws::ECS_Receiver<std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,screws::ECS_MessageFilter<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag> > >,screws::ECS_Receiver<std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,screws::ECS_MessageFilter<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> > >,screws::ECS_Receiver<std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,screws::ECS_MessageFilter<screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag> > > > > > > >,std::variant<screws::ECS_Receiver<std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,screws::ECS_MessageFilter<std::nullptr_t> >,screws::ECS_Receiver<std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,screws::ECS_MessageFilter<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag> > >,screws::ECS_Receiver<std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,screws::ECS_MessageFilter<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> > >,screws::ECS_Receiver<std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,screws::ECS_MessageFilter<screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag> > > >,std::variant<screws::ECS_Sender<std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,std::variant<screws::ECS_Receiver<std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,screws::ECS_MessageFilter<std::nullptr_t> >,screws::ECS_Receiver<std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,screws::ECS_MessageFilter<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag> > >,screws::ECS_Receiver<std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,screws::ECS_MessageFilter<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> > >,screws::ECS_Receiver<std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,screws::ECS_MessageFilter<screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag> > > > > >,std::variant<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag>,screws::ECS_Message<systemAdded_tag>,screws::ECS_Message<systemRemoved_tag>,screws::ECS_Message<key_press_tag>,screws::ECS_Message<key_release_tag> >,screws::ECS_MessageFilter<screws::ECS_Message<componentAdded_tag>,screws::ECS_Message<componentRemoved_tag>,screws::ECS_Message<entityAdded_tag>,screws::ECS_Message<entityRemoved_tag> > >,screws::ECS_Component<position_tag>,screws::ECS_Component<velocity_tag> >' is not a base or member Engine c:\dropbox\source\repos\ecs_ts\engine\systemmovable.cpp 29
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com
-
- Posts: 4373
- Joined: February 28th, 2013, 3:23 am
- Location: Oklahoma, United States
Re: Working so far, VariantECS progress
That's just one error message by the way. Luckily, the important part is near the top.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com
-
- Posts: 432
- Joined: September 26th, 2013, 4:57 pm
- Location: Kentucky
- Contact:
Re: Working so far, VariantECS progress
Terrifying error message.
PM me if you need to contact me. Thanks to all the helpful people on this forum especially to Chili.
-
- Posts: 4373
- Joined: February 28th, 2013, 3:23 am
- Location: Oklahoma, United States
Re: Working so far, VariantECS progress
Yeah, I was pretty shocked. I've heard the horror stories about template error messages, but this isn't quite the same I don't think.
This is just one type, abbreviated the message is:
The thing that makes it so scary is the fact that my classes are templated for various reasons, one of which is storing an
std::vector<std::variant<SomeTypes...>>, while another is because some of these classes inherit from the ECS_Mailbox class, so
the derived class parameter list needs to hold the arguments to pass to the base class.
The hierarchy is something like: ok, I tried a few times, but is very complicated lol.
Basically, World, System and Entity all inherit from Mailbox.
Each mailbox class stores a Sender variant and a Receiver variant
Each receiver class "stores" a MessageFilter so it can accept or reject incoming messages, which are stored as a vector of message variants
Each sender class stores a vector of receiver variants
Each world class stores a vector of system variants
Each system class holds a vector of entity variants
Each entity class holds a vector of component variants
The reason "stores" is in quotes is because I don't actually store an object of MessageFilter anywhere. It's a template parameter, so it's
just extra type information that I can use to "store" a list of accepted message types. I use a template utility class and function
to unwrap the list of types and compare a message type to the list of accepted types.
A lot of this could probably have been simplified if I had chosen a runtime approach to message filtering and maybe some polymorphic
approach, but I'm glad I went this route. I am learning a lot about using templates and some other language and library features.
This is just one type, abbreviated the message is:
Code: Select all
Error C2614 'MovableMessageDispatcher':
illegal member initialization: 'SystemMessageDispatchBase<...>' is not a base or member
std::vector<std::variant<SomeTypes...>>, while another is because some of these classes inherit from the ECS_Mailbox class, so
the derived class parameter list needs to hold the arguments to pass to the base class.
The hierarchy is something like: ok, I tried a few times, but is very complicated lol.
Basically, World, System and Entity all inherit from Mailbox.
Each mailbox class stores a Sender variant and a Receiver variant
Each receiver class "stores" a MessageFilter so it can accept or reject incoming messages, which are stored as a vector of message variants
Each sender class stores a vector of receiver variants
Each world class stores a vector of system variants
Each system class holds a vector of entity variants
Each entity class holds a vector of component variants
The reason "stores" is in quotes is because I don't actually store an object of MessageFilter anywhere. It's a template parameter, so it's
just extra type information that I can use to "store" a list of accepted message types. I use a template utility class and function
to unwrap the list of types and compare a message type to the list of accepted types.
A lot of this could probably have been simplified if I had chosen a runtime approach to message filtering and maybe some polymorphic
approach, but I'm glad I went this route. I am learning a lot about using templates and some other language and library features.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com
Re: Working so far, VariantECS progress
The error message that broke the forum
This is the kind of thing that concepts is going to really help with.
This is the kind of thing that concepts is going to really help with.
Chili
-
- Posts: 4373
- Joined: February 28th, 2013, 3:23 am
- Location: Oklahoma, United States
Re: Working so far, VariantECS progress
LOL, yeah, didn't realize the page would expand so much. I gotta zoom out quite a bit to even see how wide the message is.
Yeah, defining a "requires" of the different variant types might be a little nicer.
Yeah, defining a "requires" of the different variant types might be a little nicer.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com