So my performance is horrible on ipod touch.

ErisedErised Member Posts: 21
edited November -1 in Working with GS (Mac)
I'm developing a platform game. this game has

a) many collectable items in each level (each one has to be an actor of course)
b) large multi screen levels that scroll horizontally and vertically.
c) players can jump and shoot
d) enemies can move back and forth, seek the player, and shoot (thoguh usually not all three at once)
e) pits, moving platforms, invisible platforms, climbable things.

Game plays fine inside previewer.
on preview to the ipod touch.. 15 frames per second, and jump physics breaks and i can't jump high enough.

The boss levels (much smaller) run at 60 fps.

I am already using interpolate and non movable actors whenever i can find a way to.

Clearly, something has to be done. What would help??

A) Break up levels into smaller segments, to reduce actor count (but lose the ability to remember progress on level and move between parts)
B) fix all images to be at even powers of 2. most of them are not currently, though they are fairly small.
C) unspawn all enemy actors that are not near the player. spawn them when they are needed. keep track of which ones are dead somehow.
D) create clever system to re-use actors, and somehow keep track of which ones have been killed.
E) do some serious rule economizing, though i'm not sure how.
F) give up on ipod touch, the platform is too weak. I do have an ipad and was working on it at first, but decided it needs to work on smaller devices, and currently it has a small screen instead of an ipad sized one.
G) give up on gamesalad, it simply can't handle a platformer of this scope yet.

The first level runs mostly at 15 frames per second on device. removing all collectables and all enemies brings it up to 30. moving platforms are still there. removing animation from the collectables didn't seem to make much of a difference. With everything but the shooting enemies removed, it was 20. with them removed too (they were all already non movable) it jumped to 30 fps.

Every platform is an actor. every ladder is an actor. every pit causes a new actor. every enemy and shot is an actor. every collectible is an actor. and those are very quickly adding up. It seems to me that total actors in scene matters.

If you are wondering how big the levels actually are, think Super Mario World sized (the size of the larger individual levels).

Comments

  • calvin9403calvin9403 Member Posts: 3,186
    A
    will work, you can use save load attributes to save it(but it wll slow the game down too)
    B
    nothing, it just makes the graphic looks nicer
    C
    that will be hard work, don't know if that is good
    D
    awesome
    E
    it depends on your game
    F
    ipod touch "Can" be as fast as an iphone, but I think it still has a different
    G
    ...

    _________________________________________________
    http://www.gamesaladforum.com/
    http://gshelper.com/
    http://www.youtube.com/user/GameSaladCookbook#p/
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    First thing I would so is figure out the problem. I do this by removing things and checking the FPS. So I would start be leaving the actors in but disable certain rules. For example if you have actors that shoot at you you can have a rule that checks the x position of the hero and only spawn bullets when the hero and baddy are on the screen together. Basically go through one by one to figure out what your biggest culprits are. Then you need to either come up with some clever solutions to keep everything or make some compromises. But identifying the things that are hurting the most is the place to start.

    Look for:

    large images
    constrains
    timers
    moveable actors (very important to keep low)
    trig
  • ErisedErised Member Posts: 21
    The main issue seems to be actor count. The following tasks I have no idea how to perform without a movable actor.

    1) actor that walks towards the player. You know how to do this and not be movable, let me know.
    2) actor that walks back and forth with additional actors retracing it's steps.
    3) actor that walks back and forth on a platform and doesn't start at the edge. I can use interpolate for one at the left and one at the right.

    Even stripping the level of enemies and the collectible coins barely reached 30. That's just the moving platforms, none of which are movable! Breaking the level into parts seems to be working. This means more checkpoints. There's way too much data to even try to save status of everything that happened to allow backtracking. I can get a pretty stable framerate by breaking up the levels. I decided that was the easiest thing to try. Oh and the level had two large graphics. one was the background (1024x1024) and the other was a piece of background art.

    C and D would have to be combined, and I really don't know how to do it.
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    when you test with the viewer, what are the memory levels displayed in the creator?
  • outasiteoutasite Member Posts: 417
    I'd hate to steal the thread, but I'm in the same boat for a simple game, and hopefully some might find it useful.

    A) Actor count: 33- 12 are movable (Tested with interpolate, this way ran better)
    B) Images are power of 2: Mostly and are sized for retina
    C) unspawn actors: none of my actors are spawned or destroyed. loaded as is
    D) Recycle actors: everything is recycled nicely
    E) rule economizing: it is pretty smooth as it is

    Performance
    FPS: 24-49

    Memory Usage
    Images: 5.4 MB
    Sounds: 157 KB
    Game Engine: 7.4 MB
    Other: 6.0 Mb
    Total: 19.0 MB

    Project Size: 862 KB
    Tested on a 2ng Gen Touch
Sign In or Register to comment.