Mobile Game Development with Starling

1,640 views

Published on

New Features of Starling 1.5. How to develop for devices with limited RAM. Performance Tips. Alternative Frameworks & Platforms

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,640
On SlideShare
0
From Embeds
0
Number of Embeds
398
Actions
Shares
0
Downloads
15
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Mobile Game Development with Starling

  1. 1. Consistent Game Development
 across all Platforms Mobile Game Development
 with Starling Daniel Sperl
  2. 2. Daniel Sperl Austria, 1981 Media Design, 1999 Flox, 2012 Gamua, 2009 Starling, 2011 Sparrow, 2010 Photo Play, 2004 iOS Games & Apps, 2009
  3. 3. Topics • Starling 1.5 • Development for Mobile Devices: • Performance • Screen Resolutions • Memory • Outlook
  4. 4. What is Starling? • A pure AS3 library for Adobe Flash • Recreates the display list architecture ... • ... on the GPU (through Stage3D) • Deploy to:
 Browser / Desktop / iOS / Android
 A very talented bird, if I may say so.
  5. 5. Who uses Starling? Angry Birds (Rovio) Ruby Blast (Zynga) Incredipede Nyrthos
 Infectonator:
 Survivors Snailboy

  6. 6. Starling 1.5
  7. 7. Starling 1.5 • Currently Available as Release Candidate • Includes many internal improvements • Update highly recommended!
  8. 8. Starling 1.5 • Automatic Profile Selection • More reliable Context Loss handling • Significantly reduced Start-up Time • Atlas Textures support Rotation • SystemUtil class • … Features
  9. 9. Developing for Mobile • Limited Performance (GPU + CPU) • Multiple Resolutions • Limited Memory
  10. 10. Performance tinyurl.com/starling-performance
  11. 11. Screen Resolutions tinyurl.com/starling-resolutions
  12. 12. Memory • Mobile Devices have limited RAM • Mobile Devices have huge Resolutions • 2D Games need lots of Textures 
 Watch your Memory Footprint!
  13. 13. Memory Do not Embed Textures // Avoid: ! [Embed(source=“assets/textures/hero.png")] private static var Hero:Class; ! var texture:Texture = Texture.fromBitmap(new Hero()); • Embedded Textures are in Memory twice:
 Class Memory + Texture Memory • Better: use Starling's AssetManager
  14. 14. Memory Use the AssetManager var appDir:File = File.applicationDirectory; var assets:AssetManager = new AssetManager(); assets.enqueue(appDir.resolvePath("assets/textures")); assets.loadQueue(...); ! var texture:Texture = assets.getTexture("hero"); • Takes care of Context Loss • Optimized for minimal Memory Footprint
  15. 15. Memory Use RectangleTextures // init Starling like this: ! ... = new Starling(Game, stage, null, null, "auto", "auto"); • Standard Textures always allocate MipMaps • RectangleTextures do not! • Starling defaults to RectangleTextures
 with profiles "baseline" + "baselineExtended"
  16. 16. Memory Use ATF Textures # Usage example: png2atf -c -r -i texture.png -o texture.atf • Stored compressed 
 in GPU Memory • Reduced Image Quality • Easy to create via 
 Adobe ATF Tools
  17. 17. Memory Use Bitmap Fonts assets.enqueue(appDir.resolvePath("assets/fonts")); assets.loadQueue(...); ! var tf:TextField = new TextField(200, 80, 
 "Hello World", "My-Font", 
 BitmapFont.NATIVE_SIZE); • Requires only Memory for
 Font Texture • Faster to change text + render
  18. 18. Memory Optimize your Texture Atlas • Trim transparent Borders • Activate Rotation • Use a Tool like TexturePacker
  19. 19. Memory Use Adobe Scout • Analyzes Texture
 Memory Usage • Shows every single
 Object Allocation
  20. 20. Memory Summary • Use the AssetManager • Use RectangleTextures (profile: auto) • Use ATF Textures • Use Bitmap Fonts • Optimize your Texture Atlases • Use Adobe Scout
  21. 21. Outlook • Ongoing Support by Adobe • Collaborating with Adobe
 regarding AIR Priorities • Collaborating with the Starling Community
 regarding Starling Priorities • Flash is not dead™ =)
  22. 22. That's it, folks! Questions?

×