User talk:Mamoniem

The fastest way to Optimize IOS game performance & size
hey everyone ;

as we all know, there is lots & lots obout optimization specially for IOS devices because it is so limited devices. i put here the main couple of steps you may need to get your app faster & smaller. when i used this method, i got : - A framerate between 15-20 instead of >35 ! - APP file smaller with 20MB - Better performance on the complex levels - Less Bugs !

lets start over to discus the main steps i used for this game & then i`ll dicus what is the meaning of each of the last points.

Step 1 : when you are going to build you project, you need to choose form the player settings : - Stripping Level : Use micro mscorlib - Script Call Optimization : Fast but no Exceptions

i found with lots of trial & error that, this two choices working great for me (actionly for sevral projects) & no matter which arm6 or 7 i use from the TargetPlatform or even ehich ApiCompatibilityLevel i use as well. this was the main two choices i need to choose evertime to have better performance & little smaller size & less lag.

Step2 : when you have the XCODE project, you need to roll down to the classes folder & open the AppController.mm file & edit the current lines :

- #define kFPS 60.0 (instead of 30.0) - #define kAccelerometerFrequency 0  (instead of 1 ) - [self setMultipleTouchEnabled:NO]; (instead on YES )

you should know that : - the first line we changed to have better performance and you can easily feel it - second line we disabled the Acceleometer (if we are not using in the game ) and this one as well will give the game better performance and less memory usage as the game will never calculate any acceleration of the device..when you turn it on & not using in the game, this is memory and performance waste. - third line we disabled multi touch ( if we dont need in the game, but if we need we can enable instid the game it self via C# , JS or Boo & the disable again from the game script ), and we diabled this one to less the calculation + less the bugs...OOOh you said bugs ! YEA.., while working in several Unity projects i found something very interesting :), if there is a GUIButton in the screen in any place and you pressed at the same time" with two fingers ön on the left side of the button "and the other "in the right side of the button ", on the same vertical or horizontal line , you will find the button pressed , but in face , you pressed to far from the butto& you can try it your self

So, this is the main stuff, in another article we can discuss how to use the internal profiler to understand and figure out where is the lag & how to solve it. Try this method and any comments are welcomed

Muhammad