What type of actions/actors uses the most resources
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,
Constraining attributes, random numbers, multiple nested actor spawns,
Comments
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...
-shane
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?
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
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!
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? ;-)
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.