Spawn or not?

EagleoneEagleone Member Posts: 97
edited March 2012 in Working with GS (Mac)
In my game, I have quite a few actors which continuously fall from top of the screen towards the bottom of the screen (all at different times and speeds). Should I just make these actors spawn one after another or put a bunch of actors above the screen and have them all set to fall at certain times/speeds? I'm just not sure which way is better in terms of performance?

Any help is appreciated.

Thanks!

Comments

  • RPRP Member Posts: 1,990
    Here check this out. This may help and will certainly help on performance.

  • EagleoneEagleone Member Posts: 97
    Thank you very much, not quite familiar with all the code he has for the actors but I'll certainly look into it a bit more.

    Thanks again, and if anyone else has any other suggestions please comment.
  • EagleoneEagleone Member Posts: 97
    Also, just another quick question... when having multiple actors spawn quite often, is this generally bad for performance?
  • CloudsClouds Member Posts: 1,599
    edited March 2012
    Thank you very much, not quite familiar with all the code he has for the actors but I'll certainly look into it a bit more.

    Thanks again, and if anyone else has any other suggestions please comment.


    Try this, it's some snowballs going from right to left, but all you have to do is change the direction.

    http://www.mediafire.com/?mnmpe3fkcr2ji4c

    When they go off the screen at the far left they are immediately moved back to the far right (recycled) - which avoids spawning and destroying.
  • EagleoneEagleone Member Posts: 97
    Thank you!
  • RPRP Member Posts: 1,990
    Also, just another quick question... when having multiple actors spawn quite often, is this generally bad for performance?
    The game I'm working on right now has a lot of enemy types spawning as well. I've tried the method shown in the vid in addition to normal spawn and destroy. Honestly thus far, I'm not seeing much of a difference, then again I have not tested it on the iphone simulator/GS viewer in a while. I will say that intermittently some things like point-collect items that spawn once an enemy dies do not spawn properly when in preview mode, but work fine in the editor. Performance related? Not sure, it could be a bug I need to weed out.

    That's kinda the weird thing with GS, you can use a certain basic road types to get where you need to, but if it does not work, there are detours that will get you to the same place and oddly enough faster. Traffic maybe? hmmmm.
  • EagleoneEagleone Member Posts: 97
    RP,

    I've actually experienced the same thing (actors not spawning properly) even though it hasn't happened for a while. Also not quite sure why this occurs. I'm just hoping I won't have any performance issues once tested on the device.

    Thanks for your input and good luck with your project!
  • RPRP Member Posts: 1,990
    @Eagleone
    Thanks! You too bud!
Sign In or Register to comment.