What type of actions/actors uses the most resources

PortymanPortyman Member, PRO Posts: 409
edited November -1 in Working with GS (Mac)
I am trying to increase framerate and lower overhead. What sort of actions use the most over head.

Constraining attributes, random numbers, multiple nested actor spawns,

Comments

  • firemaplegamesfiremaplegames Member Posts: 3,211
    Too many actors with heavy rulesets
    Too many animations
    Timers
    Spawning Actors with heavy rulesets
    Constrain Attributes
    Too many actors with collisions
    Artwork that isn't optimized
    Sound Effects that aren't optimized
    Music that isn't optimized

    Those are the heavy hitters...
  • TouchTiltGamesTouchTiltGames Member Posts: 1,162
    Thanks for this Joe...By the way, with GS, do we need to have images power of 2 ready? Or does GS convert them?

    -shane
  • firemaplegamesfiremaplegames Member Posts: 3,211
    Your images can be any size you want.

    2 things to be aware of:

    1. Make sure all of the dimensions of your graphics are even numbers: i.e. 24x144 instead of 23x144 or they will blur. GS centers everything, and if your graphic has an odd dimension, that odd pixel will get split, causing a blur.

    2. All of your graphics will be placed into "containers" in memory. The "containers" are in sizes that are the power of two.

    So, in my example above, a 24x144 graphic will need a 32x256 chuck of memory reserved for it. This doesn't need to dictate your design, but you should be aware of it. Memory on mobile devices is precious. So if you arbitrarily made your graphic 66x124, you might want to size it down a bit so it fits into a 64x128 chunk of memory instead of needing a 128x128 chunk. Does that make sense?
  • TouchTiltGamesTouchTiltGames Member Posts: 1,162
    Wow I did not know this stuff, I wondered why some of my images were blurry, I thought because the size i had it on the scene was different from in the layers.

    I guess then it's just best to build your graphics in the * 2 from the get-go.

    Thanks a lot for this valuable piece of info.

    -shane
  • nulonulo Member Posts: 315
    OOOOOOOOOOOOOOOOOOOOOOOOOOOO
    joe your awesome. i had no idea about how images went into memory!
    so that means that containers go for(AxB) 2x2 / 4x4 / 8x8 / 16x16 / 32x32 / 64x64 / 128x128 and so on
    this way, images go into the next higher container? for example a 65x65 would need a 128x128? and a 64x65 would need a 64x128?

    NICE!
  • fuzzeemicfuzzeemic Member Posts: 47
    kudos to firemaplegames.
    I just want to point out that this kind of info is already in the wiki (perhaps not as well explained though)
    http://gamesalad.com/wiki/optimizing_for_iphone

    I guess most people don't know how to find it? ;-)
  • firemaplegamesfiremaplegames Member Posts: 3,211
    Glad I can help!

    Also, a third thing, images can't have a dimension larger than 1024. If you need a bigger image, you'll need to place actors next to each other.

    And just so it is here, the powers of two are:

    2,4,8,16,32,64,128,256,512,1024

    And they don't have to be squares, either. So 32x1024 is fine, etc..

    Also, GameSalad has some cool tiling capabilities which are located in the Graphics section for each Actor. You can make a smaller, tiled graphic, and stretch it out and it will repeat.

    I used this trick for the space backgrounds in the bonus levels of my game, Stunt Squirrels!. The background graphic is only 512x512, but I am stretching it over a 2048x2048 Scene.

    This trick will help you cut down on file size.
  • IcedBIcedB Member, PRO Posts: 384
    Does reducing the bit rate of audio reduce memory usage. Or is the bit-rate set by gs when an audio file is resampled to .ogg ?
Sign In or Register to comment.