Trying to make game work without spawning, but...

SinequanonSinequanon Member Posts: 35
edited February 2012 in Working with GS (Mac)
I need a little help.

I'm using recycling methods to make my game run faster, but I'm having an issue.

I have a rule where I'd normally spawn 3 different things at the same time, as in:

When (conditions), then
Spawn actor (actor1) at rotation 0
Spawn actor (actor1) at rotation 15
Spawn actor (actor1) at rotation -15

However, now it looks like

When (conditions), then
Change attribute (game.spawnCounter) to (game.spawnCounter+1)%game.numberSpawned
Change attribute (game.spawnCounter) to (game.spawnCounter+1)%game.numberSpawned
Change attribute (game.spawnCounter) to (game.spawnCounter+1)%game.numberSpawned

The problem is when stacked like this, I only end up spawning the third actor. I guess the engine isn't in the state where only 1 is added long enough for the actor to see it's its time to shine. I want to get this working (where 3 would be spawned or moved simultaneously) without using timers. Is this possible?

Thanks in advance.

Comments

  • ozboybrianozboybrian PRO Posts: 2,102
    Make the game with spawns first and try it out I reckon, the hardware in the i4S and iPad 2 these days are remarkable.

    I heard the i4S has more ram then an xbox 360.

  • SinequanonSinequanon Member Posts: 35
    Hmm, no...

    I already know this game will be more or less a "bullet hell" sort of game, and want to code smart from the beginning, rather than having to go back in and salvage it when the memory bogs down. I test on an iPhone 4S and an iPad 2, but I've also seen how poorly those types of games can run on 3GS's, which are still under support.
Sign In or Register to comment.