garbage collection? Do items auto destroy if they go to far off screen?
I am doing a game where a log of objects come down. and pass by.. however once they leave the screen i do nothing with them.. they leave and i assume contine down into infinity?
should i put some kind of timer and destroy behavior after x time passes to insure they are removed from memory?
I'm just wondering if it's worthwhile to only spawn a fixed number of items and just move them around, or is the work involved in doing that about the same as simply spawning a new actor..
platforms like flash who struggle to keep performance good on iPhone encourage making "pools" of items and just working from those. is this a beneficial design in GameSalad?
Thanks!
Caleb
should i put some kind of timer and destroy behavior after x time passes to insure they are removed from memory?
I'm just wondering if it's worthwhile to only spawn a fixed number of items and just move them around, or is the work involved in doing that about the same as simply spawning a new actor..
platforms like flash who struggle to keep performance good on iPhone encourage making "pools" of items and just working from those. is this a beneficial design in GameSalad?
Thanks!
Caleb
Comments
RULE
- When collides with ACTOR Wall
- Destroy this actor
Or you can make a rule in your actor by position
RULE
- ATTRIBUTE self.Position.Y is < 0
- Destroy this Actor
But that's what happens now (or so I learned from this Forum a while back; can't ever remember it being an added feature mentioned in an official update); so no worries about your actors sailing off eating up valuable RAM....
---------------------------------------------
http://www.davidgriffinapps.co.uk/
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
And yes, it's better to have a "pool" of actors offscreen that change location when needed, and when they are done, move again offscreen somewhere.
And Gyroscope, thanks for validating. I was pretty sure there must be some kind of auto destroy going on because the performance issues i'm having felt more like speed / accuracy than cpu overload from too many objects on screen at once.
Thanks!
Caleb