Help optimizing game performance!

anithmukanithmuk Member Posts: 235
edited November -1 in Working with GS (Mac)
Basically, in any one scene I have 3 actors spawned, 6 destroyed, up to 4 timers and a bunch of constrain attributes. I know its better to start an actor off screen and then move it in when needed instead of spawning, I've also read on the forums thats its better to once again move an actor off screen when not using it instead of destroying it, however here http://gamesalad.com/wiki/faqs it says to destroy actors.

My main questions though is, are there less memory intensive ways to do things like, make an actor move back and forth (I do this using timers and have been told that timers slow the game down), I've also been told to minimize usage of constrain attributes but I need them for my teleporter actors-so is there any way around this?

I would appreciate any help as well as any general tips to improve performance/reducing loading times, thanks!

Comments

  • simo103simo103 Member, PRO Posts: 1,331
    would likely need to see some of your rules to best help. But here's a few things you can see if they apply:

    1. Can you use less timers? For example could you use a timer to set an attribute to true from false or 1 from zero and then have that attribute change trigger other actors rather than putting timers on each of them.

    2. Check all non-moving actors and make sure you have moveable unchecked in Physics

    3. Check all invisible or perminately off screen actors and uncheck visible in physics

    4. Can your moving actors back and forth be achieved by knowing when they arrive at certain X and Y points and using that to trigger the next action?
  • UtopianGamesUtopianGames Member Posts: 5,692
    Spawn and/or destroy is the biggest killer imo it's better to have all you actors on the scene and recycle them.

    Darren.
    ___________________________________________________________________________________________

    GS Project Merger Merge 2 or more projects at the touch of a button.
    GS Project Resizer iPhone to iPad to Mac store and visa versa.
    Platform Template Our most popular template with over 90 sales.
    Mega Pack 31 Templates Amazing value with 31 fantastic templates.
    Shoot Em Up Template Over 30 moving enemies with 0 slow down.

    image
    image
  • anithmukanithmuk Member Posts: 235
    Spawning does seem to take up alot of resources, but in my scene I spawn actors that get shot out of a shooter, like a gun shooting bullets. So to achieve this without spawning I would need to create 2 constrain attributes for the gun's position and then a move to behaviour to move the particle to wherever the gun is in the scene. So will replacing one spawn behaviour with two constrain attributes and one move to behaviour, still improve the performance in any significant way?
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    anithmuk said:
    Spawning does seem to take up alot of resources, but in my scene I spawn actors that get shot out of a shooter, like a gun shooting bullets. So to achieve this without spawning I would need to create 2 constrain attributes for the gun's position and then a move to behaviour to move the particle to wherever the gun is in the scene. So will replacing one spawn behaviour with two constrain attributes and one move to behaviour, still improve the performance in any significant way?

    I think darren actually has a recyling tutorial or demo for shooting.\

    Oh and Darren in the interest of full disclosure I hav finally run into an issue where spawning is killing me but I am spawning like 100 actors almost all in 1 shot. LOL so looks like I will be dropping 2nd gen devices. for this game. :(
Sign In or Register to comment.