The problem I'm facing now in my C++ port is that I can't enable polymorphic component types for just one system.
For example you could have 2 different render components. But you still want them to fall under one system by doing something like:
(my C++ call in constructor)
setComponentTypes<IRenderComponent, TransformationComponent>();
Currently
IRenderComponent is the interface/base component for all render components.
Since every object creates its own hashcode ( this is how I store my bitsets and retrieve them) The aboves type bits will only work for actual IRenderComponent. Which is Abstract and can not have actual context. Therefor this won't work.
Every derived Component from IRenderComponent will have its own bitset/bit id. Meaning for every render component you would have to create their own system ( or derive from a basic render system)
I don't believe that's possible with the Java version either. Any thoughts on this? Any global ideas on how to solve this? I do think it can come in handy.
Quote:
We added also the concept of EntityTemplate to define Entities
Nice Idea. I should add a EntityTemplate class for my port.
Code:
we move the death entity to the store and if we need a new Orc we reuse that one, we only reset some state but we avoid to create new components and new assets, etc. Stores work over Templates but Templates can be used without Stores.
But this means the Orc is still in your system bag ?
somewhere in your process you do something like:
Code:
if(e.isActive){
//do stuff
}
EntityManager is still in charge of removing actual entities from the systems right?
I apologies for m post. It feels a bit sidetracked.