I just recycled my actors and the performance is awesome
Portyman
Member, PRO Posts: 409
Instead of spawn and destroy a missile, I start the level out with 15 missiles offscreen and move them when needed. The mb stay low and do not rise. No slowdowns in fps either. Just had to share.
Comments
I've been trying to make a top down shooter for a year, but was never satisfied with performance - maybe now I'll give it another shot!
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
i'm talking about 5 plus enemies on screen (up to 10). you just "move to" them to a certain spot (x and y) offscreen?
DL
Then when you're done with it, just set Self.Position.Y to 500 or something that'll put it off screen. You can do stuff like put that on a timer so you can Interpolate the alpha to 0 first, in order to have it fade out before it moves away.
http://www.mediafire.com/?05cxj3h1l3h7k85
Click the square to move it around!
Crap, my game destroy like... 1 actor by second. bad bad ?
http://gamesalad.com/wiki/optimizing_for_iphone
that being said GS team has indicated they are working on a number of known issues and I'd have to think this is a priority issue.
Thanks
Cheers,
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
THRSTN, unfortunately I can't give those other one away for free (I sweated a lot on those, especially the canabalt one xD), but if it's for things like these, expect more free stuff (like it always was, but I have to eat now xP)
"Does spawning/destroying actors slow my performance down? I'm having new actors spawn every 0.1 second. They float up to the top of the screen, and when at the top I destroy them. So in 10 seconds I've spawned 100 of the same actors with different attributes (Sizes/Speed), and in 10 seconds I've destroyed approximately 100 actors also. So does this slow everything down? I've heard people talk about recycling?"
I'm guessing playing my game for 1 minute will rape the phone up wont it?
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
< a tear slowly falls from portyman's eye>
here's a question - what about particles? are they automatically recycled, or does that slow things down also?