How to make a SMOOTH platformer?
juzcook
Member Posts: 259
I abandoned working on a platformer a few weeks ago when I first got started on GS, purely because of framerate issues on my devices. The levels weren't terribly big, but they did include quite a few actors. So now I've begun working on a new one, but decided to implement puzzle styled gameplay in much smaller levels (960x640).
ALL my graphics have been shrunk to 4kb files, except for the background graphic which takes up the entire scene. They are also ALL even numbered dimensions. On an iPhone 4 I'm getting the full 60fps, but on an iPod Touch 2nd gen, I'm getting between 45-50. I don't honestly have much happening in the level yet, although I do have a custom timer in the corner which updates every second by "change image" with numbers 0-9. Only 3 bad guys are in the level at this stage, constantly walking back and forth, with 10 collectable "coins", and a few little doodads to spice the level up. I then have 2 lots of images for the ground, which involves a tiled grass actor and a tiled "dirt" actor, so that I can make platforms and walls whatever size I want. In such a small level... I don't have many of those being used.
I've seen some people on here have made some very nicely running sidescrollers on here with what looks to be alot more detail than I have, yet I'm getting the same frame rate problem each time. I don't consider my actors very rule heavy either. Does anyone have any tips they could suggest?
ALL my graphics have been shrunk to 4kb files, except for the background graphic which takes up the entire scene. They are also ALL even numbered dimensions. On an iPhone 4 I'm getting the full 60fps, but on an iPod Touch 2nd gen, I'm getting between 45-50. I don't honestly have much happening in the level yet, although I do have a custom timer in the corner which updates every second by "change image" with numbers 0-9. Only 3 bad guys are in the level at this stage, constantly walking back and forth, with 10 collectable "coins", and a few little doodads to spice the level up. I then have 2 lots of images for the ground, which involves a tiled grass actor and a tiled "dirt" actor, so that I can make platforms and walls whatever size I want. In such a small level... I don't have many of those being used.
I've seen some people on here have made some very nicely running sidescrollers on here with what looks to be alot more detail than I have, yet I'm getting the same frame rate problem each time. I don't consider my actors very rule heavy either. Does anyone have any tips they could suggest?
Comments
I'm making a platform type game and seeing a frame rate of 55 fps on a 2nd gen ipod touch with 100+ actors on screen, some movable some not but i use "Interpolate" to move most of them with movable off.
Darren.
I like your new icon, is that a new game?
EDIT: This might be useful to anyone who can give me a hand with this. Here's my memory usage.
Images: 3.1mb
Sounds: 34kb
Game Engine: 11.6mb
Other: 7.8mb
Total: 22.5mb
The fps idles at around 53-54fps and when moving drops by 4fps. Jumping drops by 4fps also, and when combined they double to drop by 8fps. It doesn't drop below 44ish yet, but I'd love to keep a fairly high one to keep this game playable on more than just the newer devices!
Umm it might be because in my game its a none stop running game with no jump, i would try and rework the code maybe if it's dropping that low something might be wrong?
Darren.