Spawn destroy vs recycle

KiwiLeeKiwiLee Member Posts: 181
edited August 2012 in Working with GS (Mac)
I've seen some videos on this - tick.
I've read posts that say that the performance hit of destroy/spawn is better now!

As a relative noob I wanted to get an idea of what is the best method! I will be spawning or pre populating around 50 of the same actor in any given scene!!!

I assume that you'll have your reasons why and why not so I'd been keen to hear the current views on this ;-)

Thanks

Comments

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    I think recycling is the best option...period. Since you'll be having 50+ actors spawned, that will give the Ram a hard time...You'll be able to notice it for sure...

    Recycling would be much better performance wise, I believe.

    Just my two cents.
  • AcceleratedGamesAcceleratedGames Member Posts: 201
    edited August 2012
    I have actually tested out to see if spawning is worse for memory than recycling, and RECYCLING is much worse because of the extra "code" you have to put in each actor to tell it to recycle.
    http://forums.gamesalad.com/discussion/46652/31-optimization-tips#latest
  • ORBZORBZ Member Posts: 1,304
    edited August 2012
    It depends on the situation... if an actor is never going to be used again, destroy it. if it's used infrequently destroy/spawn it. If it's used often then recycle it.
  • KiwiLeeKiwiLee Member Posts: 181
    It's a one level puzzle type game and all 50 actors get used each time at some stage during the level! But when done the solution you put forward is scored and then you have the chance to repeat or move on to next puzzle! The game is thinking paced and not a shooter!

    My concern is not FPS at this stage but progressive play and consuming chunks of ram.
  • KangavarkKangavark Member Posts: 62
    I'm curious about this as well. I'm making a one-scene shooter game kinda like missile defense. Would it be better to just recycle recurring enemies or bullets or both?
Sign In or Register to comment.