How to make a SMOOTH platformer?

juzcookjuzcook Member Posts: 259
edited November -1 in Working with GS (Mac)
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?

Comments

  • UtopianGamesLtdUtopianGamesLtd Member Posts: 120
    Turning off movable will help, try using a standard font also helps.

    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.
  • victorkin11victorkin11 Member Posts: 251
    @UtopianGamesLtd

    I like your new icon, is that a new game?
  • juzcookjuzcook Member Posts: 259
    Thanks for the tip Darren! I've actually already made sure that moveable is unchecked on everything except for the 3 bad guys and my main character. I have certain HUD elements that rather than move are interpolated (I have just discovered how wonderful this feature is haha). How many rules do you have happening that allows your game to run so smoothly? I find jumping tends to give my frame rate the biggest drop of about 4-8fps when pressed.

    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!
  • UtopianGamesLtdUtopianGamesLtd Member Posts: 120
    victorkin11 said:
    @UtopianGamesLtd

    I like your new icon, is that a new game?

    No it's part of Bumps, some of the mini games have rocket Bumps where you tilt to control.

    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.
  • juzcookjuzcook Member Posts: 259
    My guess is that could have a lot to do with it, but I shall investigate my code a bit and see what I can simplify if anything at all. If anyone has surpassed this experience let me know :)
Sign In or Register to comment.