Let me know how it goes. I can't foresee all design issues and will try to make changes when it's warranted.
I'm trying to separate the public API from the internals of the framework. If I don't hide the internals, then some guys might affect something they don't know what side effects it will have. E.g., creating a new Entity instance is not permitted, the constructor is protected, and the class is final, disallowing extending. I want the framework API to guide the programmer in it's usage, not offer lots of things to do he should not be allowed to do.
Groupmanager should have an isInGroup(String, Entity) function.
Reuse of entities is great, but I need everincreasing ids to identify them uniquely in time, any reason id cant be long, and just go ++?
Edit: Poking around abit I see that not reusing ids has the unfortunate effect of increasing the bagsizes quite unnecessarily. Perhaps some sort of entity sequence number in addition to id, coupled with an Entity.equals which uses said sequence number?
Sounds nice. I've worked on a data driven game like that, using XML for entity definition. I was using Spring
Was quite powerful, but too slow for my taste. I had to have a thread instancing entities in the background because it wasn't fast enough to do realtime. You'll be surprised how many entities you need to create in a space battle of 20-30 ships. Bullets, explosions, lasers, etc. Artemis will handle that stuff nicely.
I preload everything into a DataElement class, which basically is a giant EntityFactory: I can handle 4-6k entities with about 10 components each on my 3 year old powerbook. The bottleneck right now is collision detection, which is an art and a hassle in its own right.
ImmutableBag<Component> components = world.getComponents(entity);
Would that help?
That would help. I guess my design is especially hard to deal with however, as I have entities linked to entities, quickly making EntityManager browsing a pain.
Thanks for catching that, clearly a serious bug. Easy to fix however, will make the changes in svn and deploy.
Fixing it locally opened up somewhat of a can of nullpointer exceptions. Hopefully you have a better overview and implementation.
Btw, IntervalEntitiyProcessingManager does not actually call begin and end in intervalProcess.
On that note, porting is basically complete. I'm now running Artemis
Really digging grouping and tagging, finally getting rid of empty component. JProfiler shows good hotspot improvments!
Edit: I'm in love with the speeeeeed (entity counter is wrong off but still, all those ships are fireing 10 beams a second):