Archived

This topic is now archived and is closed to further replies.

Fallen_Angel

How to keep track of enemies?

Recommended Posts

I''m just about to start my second game (a side-scroller) and wondering what would be the best way to keep track of enemies. I''m only planning on having one level, maybe 10-20 screens wide and just making the enemies harder for each difficulty. What I''m wondering is whether it would be feasible to create every enemy at the start of the level and keep track of all of them at once, or would that use up too much resources. If so, I''m guessing the way to go would be to load either a set amount of enemies at a time or either to load all the enemies present in say the next 2-3 screens. Any help would be appreciated, thanks.

Share this post


Link to post
Share on other sites
If your game only has a few enemies per level, you might as well keep them active during the whole level. This might also give the user a feeling of them not just popping up when he/she arrives at aparticular place, but every time you visit a place, the enemy might have walked somewhere else.

As your enemies increases in quantity you should consider another solution, perhaps to activate enemies as the player has travelled a specific length or steps on a certain tile. This would be more efficiant, memory-wise.

Share this post


Link to post
Share on other sites