Hi, I'm doing a spaceship game, and on the screen there will be a lot of enemies positioned in a rectangle (well sort of). What's the best way to keep the enemies? In an CCArray (all of them), in a matrix?
Enemies in CCArray, matrix?
(4 posts) (3 voices)-
Posted 5 months ago #
-
The short answer: CCArray.
The long answer: Probably CCArray.Posted 5 months ago # -
Some kind of streange question. What you mean by "best way"?
You mey store pointers in any way, even implementing own mechanism to manage this. Of couse CCArray/NSArray/NSMuttableArray are ready solutions, but they are slower from constant arrays "[]". So maybe for you easiest way and, what is most important, quicker way is a creating maximum amount of object in constant array and them manage them. All depends on you preference, and needed level of access.
So I'm afraid, you must chose by yourself:DPosted 5 months ago # -
hmm, ok. I'll make a constant array such as:
id enemies[x][x];
Posted 5 months ago #
Reply
You must log in to post.