RE: [Flashcoders] Flash CS5 iPhone development question
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. -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Sajid Saiyed Sent: 12 October 2010 04:08 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Flash CS5 iPhone development question Hi, Have'nt seem much discussion on this subject yet. I am starting to experiment with the iPhone packager and had few questions. Any idea how to store data locally? For example Game Levels or Application data etc.? Can Flash CS5 make use of SqLite database? Any tutorials available? Thanks and I will keep posting my experiment results here. So far, it seems to work smoothly. I am going to try more intensive apps to explore the limits. -Sajid ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flash CS5 iPhone development question
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.1filter_flashplayer=10.1filter_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
RE: [Flashcoders] Flash CS5 iPhone development question
Thanks for the tips Kevin - I am trying anything and everything to improve performance. I only have 8 balls moving with collision detection and reactions using vector maths and what works so smoothly on the PC is really sluggish on the iPhone. I have written the same code in Corona and it works well on the iPhone. However I am determined to get it working with the Flash version. -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Kevin Newman Sent: 12 October 2010 17:07 To: Flash Coders List Subject: Re: [Flashcoders] Flash CS5 iPhone development question 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/sys tem/Capabilities.html?filter_flex=4.1filter_flashplayer=10.1filter_air=2#o s 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 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flash CS5 iPhone development question
Optimizing for GPU is what helps most on iPhone - make sure every item on your display list is getting cached on the GPU (even ones you update, but minimize updates). Additionally, avoid addChild and removeChild (and the timeline, since it uses those a lot) - they are expensive - use visible property instead. Maybe draw your background as a big shape, and set cacheAsBitmap, and cacheAsBitmapMatrix = new Matrix there as well. I'm not sure if that helps, but after I did that my app got faster (I don't do things as micro iteratively as I'd like, because the iPhone compile time is so horrendous - so I'm not always certain about which things helped or not - though I am sure that if I forget to set the GPU flags, it slows everything down, even if it's just the background display object). 8 objects should be no problem at all. View the PDF here for more: http://labs.adobe.com/technologies/packagerforiphone/ http://download.macromedia.com/pub/labs/packagerforiphone/packagerforiphone_devguide.pdf Kevin N. On 10/12/10 12:54 PM, Paul Steven wrote: nce. I only have 8 balls moving with collision detection and reactions using vector maths and what works so smoothly on the PC is really sluggish on the iPhone. I have written the same code in Corona and it works well on the iPhone. However I am determined to get it working with the Flash version. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flash CS5 iPhone development question
Hi, the air 2 package works with flex 3? someone knows that, because since I have a ppc with Cs4 I don't think I can have a transition to Cs5 yet. gustavo On Oct 12, 2010, at 2:04 PM, Kevin Newman wrote: Optimizing for GPU is what helps most on iPhone - make sure every item on your display list is getting cached on the GPU (even ones you update, but minimize updates). Additionally, avoid addChild and removeChild (and the timeline, since it uses those a lot) - they are expensive - use visible property instead. Maybe draw your background as a big shape, and set cacheAsBitmap, and cacheAsBitmapMatrix = new Matrix there as well. I'm not sure if that helps, but after I did that my app got faster (I don't do things as micro iteratively as I'd like, because the iPhone compile time is so horrendous - so I'm not always certain about which things helped or not - though I am sure that if I forget to set the GPU flags, it slows everything down, even if it's just the background display object). 8 objects should be no problem at all. View the PDF here for more: http://labs.adobe.com/technologies/packagerforiphone/ http://download.macromedia.com/pub/labs/packagerforiphone/packagerforiphone_devguide.pdf Kevin N. On 10/12/10 12:54 PM, Paul Steven wrote: nce. I only have 8 balls moving with collision detection and reactions using vector maths and what works so smoothly on the PC is really sluggish on the iPhone. I have written the same code in Corona and it works well on the iPhone. However I am determined to get it working with the Flash version. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Flash CS5 iPhone development question
Hi, Have'nt seem much discussion on this subject yet. I am starting to experiment with the iPhone packager and had few questions. Any idea how to store data locally? For example Game Levels or Application data etc.? Can Flash CS5 make use of SqLite database? Any tutorials available? Thanks and I will keep posting my experiment results here. So far, it seems to work smoothly. I am going to try more intensive apps to explore the limits. -Sajid ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders