I've had a similar experience. What I've done is to divide my game (Event.ENTER_FRAME) and my render logic - stage element access (Event.RENDER) loops, and on 3G update only every other frame.

You can do that by filtering on Capabilities.os, and then based on which model you detect, set a toggle to run at the end of ENTER_FRAME handler, that will invalidate the screen (I think it's root.invalidate()) either every frame for high end devices, or every other frame for iPhone 3G, iPod 2nd gen, and lower.

// set useFrameSkip in init based on Capabilities.os
if (useFrameSkip && !skipFrame) {
    skipFrame = true;
    root.invalidate();
}
else {
    skipFrame = false;
}

Also, make sure you are setting those cacheAsBitmap and cacheAsBitmapMatrix flags when appropriate, or else you aren't properly utilizing the GPU.

Seems to help. :-)

Kevin N.

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/system/Capabilities.html?filter_flex=4.1&filter_flashplayer=10.1&filter_air=2#os


On 10/12/10 6:29 AM, Paul Steven wrote:
Be sure to check your creations on an iPhone 3G as my tests so far have not
been great in terms of performance on these devices and that is with highly
optimised code.

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to