Help improve my frame rate and memory usage please
Ok right now I'm trying to improve the frame rate since it averaging 30 on a 3Gs and this game would benefit greatly if it were higher.
On the outside, basically its a "endless runner" (no running though).
Here are my current issues....
1. I have a scrolling background(Portrait mode) that destroys itself and respawns somewhat smoothly. Normal 320x480 size. I'm using move but I know interpolate will help performance. I know about changing speed with interpolate since that's necessary with my game, but the initial startup of the moving background is chunky with interpolate, the image scrolls on top of the image itself and then it starts moving seemless. Anybody know how to implement a simple scrolling background using interpolate in portrait mode?
2. Ok I know unchecking movable helps performance, but what about density, friction, and restitution? If I don't need them, will setting them to 0 for all my actors help performance?
3. Also right now I have an actor off screen that destroys enemies when they go off screen, and then they spawn again. Would it be a big improvement to instead maybe turn the enemies alpha to 0 use a boolen so it wont hurt or help the main actor and then when the enemy goes off screen use "move to" to move the actor back to a random area where it would normally spawn?
Any help given will be greatly appreciated.
On the outside, basically its a "endless runner" (no running though).
Here are my current issues....
1. I have a scrolling background(Portrait mode) that destroys itself and respawns somewhat smoothly. Normal 320x480 size. I'm using move but I know interpolate will help performance. I know about changing speed with interpolate since that's necessary with my game, but the initial startup of the moving background is chunky with interpolate, the image scrolls on top of the image itself and then it starts moving seemless. Anybody know how to implement a simple scrolling background using interpolate in portrait mode?
2. Ok I know unchecking movable helps performance, but what about density, friction, and restitution? If I don't need them, will setting them to 0 for all my actors help performance?
3. Also right now I have an actor off screen that destroys enemies when they go off screen, and then they spawn again. Would it be a big improvement to instead maybe turn the enemies alpha to 0 use a boolen so it wont hurt or help the main actor and then when the enemy goes off screen use "move to" to move the actor back to a random area where it would normally spawn?
Any help given will be greatly appreciated.
Website ∞ Twitter ∞ My apps are available on: Apple iOS App Store ∞ Google Play App Store ∞ Amazon App Store
Comments
2. Not sure, but that makes sense. You could test in in viewer to see if performance improves.
3. I wouldn't even use 'move to'. just 'change attribute' self.x and self.y to offscreen, then back on when you want it to 'spawn'.
Here's the easiest thing. Everything I ever needed to learn about endless runners i learned from Deep Blue Apps free Seamless Runner template. Check it out. It'll show you how to spawn bad guys, paralax scrolling background, etc. http://www.deepblueapps.com/Deep_Blue_Ideas_Ltd./GSTemplateSLR.html
Good luck! Making a endless runner will change everything you think you know about GS game design.
Please read more about graphic chips, old and current. Also, read as much info as you can about OpenGL. Those two will help you understand how games should be made.
Just because you are using a game editor, doesn't mean it has thought of and optimized everything for you.
If and when GameSalad offers sprite sheets, they will make a huge difference.