Copy link to clipboard
Copied
i have an air app running on iphone and ipad which works great. Runs at 60fps
when i run it on an android tablet like a nook it performs really badly. Anyone know any direct causes i can look at?
i dont do animation tweens, all my tweens are using tweenlite from greensock
Copy link to clipboard
Copied
what is the spec of the Android device?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Some things to try / places to look:
- Make sure the stage quality is set to medium ( stage.quality = StageQuality.MEDIUM ).
I would also try low ( stage.quality = StageQuality.LOW ). If you still want the fonts to look ok with the low setting, for all your text fields, try antiAliasType = AntiAliasType.ADVANCED.
- Unless you absolutely need full-color, I suggest in the Android app manifest to use: <android><colorDepth>16bit</colorDepth></android>. Usually one can't tell the difference, and you will gain a few fps.
- If you are using the GPU render mode, try reducing the resolution of your textures in half and see what it does ( cacheAsBitmapMatrix = new Matrix( 0.5, 0, 0, 0.5 ) ).
- If you are using the Direct render mode + Stage3D, there are a lot of things you can do to maximize performance. Here are a few:
- As a general policy, once the device's dimensions are known, it is usually best to turn all your static vector art into bitmaps, wherever you can. I personally like to do it manually with BitmapData.drawWithQuality(). Otherwise, be very careful with the regular cacheAsBitmap if you are going to rotate or scale things, as it will force the re-caching every frame -- though that should be somewhat obvious.
- You should also install and run Adobe Scout ( free ), to profile what is going on in your app. Graphics is the usually the biggest hurdle, but you might find that some functions are taking too long, maybe.
Note: the Nook Color is the very lowest end, and I use it as a benchmark for optimizing for the worst case scenario on Android. Fill-rate on that device is attrocious, but there is a GPU, fortunately, so overall performance is not as bad as it could have been. I don't think this is the case with the Nook HD in the link, though.
Copy link to clipboard
Copied
thanks this helped a lot and its working now