I use in Java Artemis(entity system library) and Slick2D(graphics library) for a game.
Now I wonder me, how I should handle graphics(sprites, textures...).
In the demos of the page from Artemis it was made so:
I hope the diagram is good enough. So someone asks now "Whats the problem ?": The Problem is, that this method is not very efficient and it feels not very good, because:
- The spatial forms are created and initialized at run time
- The spatial forms are created individually for every entity(Load textures or create a shape...)
I think there a better ways, so I hope someone have a better idea.
And if someone have the idea to make simply a sprite or a texture component, that's not a solution, because some entities have for example more textures than one.
And a supplementary question, how I should handle animated graphics ?
Thanks for reading :) and sorry for my bad English :(