{"id":625,"date":"2010-01-07T09:50:50","date_gmt":"2010-01-07T09:50:50","guid":{"rendered":"http:\/\/nextwavemultimedia.com\/blog\/?p=625"},"modified":"2010-01-07T09:58:47","modified_gmt":"2010-01-07T09:58:47","slug":"performance-optimization-checklist-for-flash-lite-game-application-development","status":"publish","type":"post","link":"https:\/\/www.nextwavemultimedia.com\/blog\/gamedev\/performance-optimization-checklist-for-flash-lite-game-application-development\/","title":{"rendered":"Performance optimization checklist for Flash Lite game \/ application development"},"content":{"rendered":"<p><strong>Tips for optimizing ActionScript<\/strong><\/p>\n<li>Spread out initialization across movie and not all on Frame 1, doing to much in the first frame like slowdown the start of the application<\/li>\n<li>Using gotoAndPlay() still loads content in the frames you skip, so use separate movie clips and link it via Actionscript<\/li>\n<li>Garbage collection should occur every 60 seconds or on 20% memory spike, so manually remove objects and variables when they are no longer required, like clearing setIntervals, listeners etc., before removing movie clips for which it is assigned.<\/li>\n<li>Variables local to functions are processed faster than global variables, so use the var keyword wherever possible.\n<\/li>\n<li>Pre-calculate values using Math and store for access later, so try and minimize the use of Math and floating point numbers\n<\/li>\n<li>Remove smaller loops and write each iteration separately<\/li>\n<li>Use XML carefully and in small chunks, if possible, use simple name\/value pairs for data. But light-weight data is good for your application and costs users less\n<\/li>\n<li>Avoid using _alpha = 0, _visiblity = 0, instead hide remove MovieClips<\/li>\n<li>Experiment with frame rates, starting with 10, 16, 24 or 32. Calibrate device profiles in Device Central CS4. Testing in Device Central CS4 gives 80% realistic performance as per the targeted device\n<\/li>\n<li>Always test on a real device<\/li>\n<p><strong>Tips for optimizing visual assets<\/strong><\/p>\n<li>Optimize artwork prior to bringing it into Flash<\/li>\n<li>Import gradients as bitmaps rather than vectors. Linear gradients easier to render than radial<\/li>\n<li>JPG\u00e2\u20ac\u2122s decompression can slowdown performance, so consider PNG\u00e2\u20ac\u2122s wherever possible<\/li>\n<li>Minimize areas of transparency inside PNG\u00e2\u20ac\u2122s<\/li>\n<li>Avoid rotating or scaling of bitmaps, Flash lite doesn\u00e2\u20ac\u2122t support bitmap smoothing<\/li>\n<li>If you are using vector shapes, try to keep simple as possible. Use Modify -&gt; Shape -&gt; Optimize<\/li>\n<li>Corners and straight lines are easier to render than curves<\/li>\n<li>Convert vector strokes and outlines to fills<\/li>\n<li>Consider replacing small vector graphics with bitmaps<\/li>\n<li>Use Graphic symbols over Movie clips where possible<\/li>\n","protected":false},"excerpt":{"rendered":"<p>Tips for optimizing ActionScript Spread out initialization across movie and not all on Frame 1, doing to much in the first frame like slowdown the <span class=\"ellipsis\">&hellip;<\/span> <span class=\"entry-more-link-wrapper\"><a href=\"https:\/\/www.nextwavemultimedia.com\/blog\/gamedev\/performance-optimization-checklist-for-flash-lite-game-application-development\/\" class=\"entry-more-link entry-more-link-excerpt btn btn-primary\"><span>Read More<\/span><\/a><\/span><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[14,40],"tags":[120,121,122,123,888,125],"_links":{"self":[{"href":"https:\/\/www.nextwavemultimedia.com\/blog\/wp-json\/wp\/v2\/posts\/625"}],"collection":[{"href":"https:\/\/www.nextwavemultimedia.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nextwavemultimedia.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nextwavemultimedia.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nextwavemultimedia.com\/blog\/wp-json\/wp\/v2\/comments?post=625"}],"version-history":[{"count":2,"href":"https:\/\/www.nextwavemultimedia.com\/blog\/wp-json\/wp\/v2\/posts\/625\/revisions"}],"predecessor-version":[{"id":628,"href":"https:\/\/www.nextwavemultimedia.com\/blog\/wp-json\/wp\/v2\/posts\/625\/revisions\/628"}],"wp:attachment":[{"href":"https:\/\/www.nextwavemultimedia.com\/blog\/wp-json\/wp\/v2\/media?parent=625"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nextwavemultimedia.com\/blog\/wp-json\/wp\/v2\/categories?post=625"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nextwavemultimedia.com\/blog\/wp-json\/wp\/v2\/tags?post=625"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}