mobile game development with starling

22
Consistent Game Development across all Platforms Mobile Game Development with Starling Daniel Sperl

Upload: flash-gamm

Post on 23-Aug-2014

439 views

Category:

Presentations & Public Speaking


0 download

DESCRIPTION

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

TRANSCRIPT

Page 1: Mobile Game Development with Starling

Consistent Game Developmentacross all Platforms

Mobile Game Developmentwith

StarlingDaniel Sperl

Page 2: Mobile Game Development with Starling

Daniel Sperl

Austria, 1981 Media Design, 1999

Flox, 2012 Gamua, 2009

Starling, 2011 Sparrow, 2010

Photo Play, 2004

iOS Games & Apps, 2009

Page 3: Mobile Game Development with Starling

Topics

• Starling 1.5

• Development for Mobile Devices:

• Performance

• Screen Resolutions

• Memory

• Outlook

Page 4: Mobile Game Development with Starling

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.

Page 5: Mobile Game Development with Starling

Who uses Starling?

Angry Birds (Rovio) Ruby Blast (Zynga) Incredipede

Nyrthos Infectonator:Survivors

Snailboy

Page 6: Mobile Game Development with Starling

Starling 1.5

Page 7: Mobile Game Development with Starling

Starling 1.5

• Currently Available as Release Candidate

• Includes many internal improvements

• Update highly recommended!

Page 8: Mobile Game Development with Starling

Starling 1.5

• Automatic Profile Selection

• More reliable Context Loss handling

• Significantly reduced Start-up Time

• Atlas Textures support Rotation

• SystemUtil class

• …

Features

Page 9: Mobile Game Development with Starling

Developing for Mobile

• Limited Performance (GPU + CPU)

• Multiple Resolutions

• Limited Memory

Page 10: Mobile Game Development with Starling

Performance

tinyurl.com/starling-performance

Page 11: Mobile Game Development with Starling

Screen Resolutions

tinyurl.com/starling-resolutions

Page 12: Mobile Game Development with Starling

Memory

• Mobile Devices have limited RAM

• Mobile Devices have huge Resolutions

• 2D Games need lots of Textures

Watch your Memory Footprint!

Page 13: Mobile Game Development with Starling

MemoryDo 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

Page 14: Mobile Game Development with Starling

MemoryUse 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

Page 15: Mobile Game Development with Starling

MemoryUse 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"

Page 16: Mobile Game Development with Starling

MemoryUse 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

Page 17: Mobile Game Development with Starling

MemoryUse 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 forFont Texture

• Faster to change text + render

Page 18: Mobile Game Development with Starling

MemoryOptimize your Texture Atlas

• Trim transparent Borders

• Activate Rotation

• Use a Tool like TexturePacker

Page 19: Mobile Game Development with Starling

MemoryUse Adobe Scout

• Analyzes TextureMemory Usage

• Shows every single Object Allocation

Page 20: Mobile Game Development with Starling

MemorySummary

• Use the AssetManager

• Use RectangleTextures (profile: auto)

• Use ATF Textures

• Use Bitmap Fonts

• Optimize your Texture Atlases

• Use Adobe Scout

Page 21: Mobile Game Development with Starling

Outlook

• Ongoing Support by Adobe

• Collaborating with Adoberegarding AIR Priorities

• Collaborating with the Starling Community regarding Starling Priorities

• Flash is not dead™ =)

Page 22: Mobile Game Development with Starling

That's it, folks!

Questions?