Okay, I’m now at the stage where I need to keep track of my game entities for each level. In terms of space-saving and efficiency, whats the best method: -
-
First off, I need to pool some object instances and create them all at the beginning to keep the speed up. How fast is the J2ME implementation of the Vector class? Worth using this, or creating my own doubly-linked list?
-
Should I use seperate data structures for each type of entity or lump everything all together? If the latter, I need a common way of accessing all my entities. Inheritance or Interfaces?
I need things like: -
projectiles
enemies
collectables
player
platforms
So, should all these have say the same base class or implement several interfaces? This wouldn’t really be something I’d ask if I was using J2SE, but since this is mobile development, I think design needs to be really well-thought out.
Advice?