STARLING DEEP DIVE
Starling Deep Dive
LEE BRIMELOW




 Developer Evangelist
www.leebrimelow.com
    @leebrimelow
LEE BRIMELOW           THIBAULT IMBERT




 Developer Evangelist    Sr. Product Manager
www.leebrimelow.com      www.bytearray.org
    @leebrimelow          @thibault_imbert
Starling Deep Dive
Sparrow is a pure Objective-C library created by
Gamua that allows developers to build native iOS
games using an API similar to Flash.
Sparrow is a pure Objective-C library created by
Gamua that allows developers to build native iOS
games using an API similar to Flash.




Starling is based on Sparrow and is a pure AS3
library that mimics the conventional Flash display
list and all content is rendered by the GPU.
Starling Deep Dive
DANIEL SPERL




Creator of Sparrow and Starling
        www.gamua.com
Starling Deep Dive
OFFICIAL ADOBE SUPPORT
Starling Deep Dive
EXAMPLE STARLING CODE
EXAMPLE STARLING CODE
EXAMPLE STARLING CODE


import starling.display.Sprite;
EXAMPLE STARLING CODE


import starling.display.Sprite;

var hero:Sprite = new Sprite();
EXAMPLE STARLING CODE


import starling.display.Sprite;

var hero:Sprite = new Sprite();
hero.x = 200;
EXAMPLE STARLING CODE


import starling.display.Sprite;

var hero:Sprite = new Sprite();
hero.x = 200;
hero.y = 200;
EXAMPLE STARLING CODE


import starling.display.Sprite;

var hero:Sprite = new Sprite();
hero.x = 200;
hero.y = 200;
addChild(hero);
Starling Deep Dive
STARLING API
STARLING API
STARLING API
STARLING API
STARLING API
STARLING API
STARLING API
Starling Deep Dive
WORKING WITH ASSETS
Starling Deep Dive
FULL SUPPORT FOR SPRITE SHEETS
Starling Deep Dive
Starling Deep Dive
Starling Deep Dive
Starling Deep Dive
Starling Deep Dive
Starling Deep Dive
Starling Deep Dive
Starling Deep Dive
Starling Deep Dive
TEXTURE ATLAS
 Easily access different textures and animations




myTextureAtlas.getTextures(“fly”);
Starling Deep Dive
ADOBE TEXTURE FORMAT
A new compressed texture format created specifically for Stage3D




   We will be releasing tooling soon for creating ATF textures
Starling Deep Dive
DYNAMIC TEXTURE ATLAS
Converts vector MovieClip to texture atlas at runtime




            https://github.com/emibap
Starling Deep Dive
PRO TIP
Pack as many of your graphics into texture atlases as possible to
limit the number textures that need to be uploaded to the GPU.
Starling Deep Dive
STARLING DISPLAY OBJECTS
STARLING DISPLAY OBJECTS




Quad
STARLING DISPLAY OBJECTS




Quad      Image
STARLING DISPLAY OBJECTS




Quad      Image        Sprite
                      (container)
STARLING DISPLAY OBJECTS




Quad      Image        Sprite       MovieClip
                      (container)   (container)
Starling Deep Dive
PRO TIP
Set the blend mode property to BlendMode.NONE on background
display objects that don’t require alpha to speed up performance.
Starling Deep Dive
WORKING WITH TEXT
Displaying text in Starling is done using the TextField class
WORKING WITH TEXT
Displaying text in Starling is done using the TextField class




  True-type fonts
WORKING WITH TEXT
Displaying text in Starling is done using the TextField class




  True-type fonts                      Bitmap fonts
Starling Deep Dive
ANIMATION IN STARLING
The enter frame event behaves more like a real game timer
ANIMATION IN STARLING
The enter frame event behaves more like a real game timer
ANIMATION IN STARLING
 The enter frame event behaves more like a real game timer



this.addEventListener(EnterFrameEvent.ENTER_FRAME, loop);
ANIMATION IN STARLING
 The enter frame event behaves more like a real game timer



this.addEventListener(EnterFrameEvent.ENTER_FRAME, loop);

private function loop(event:EnterFrameEvent):void
ANIMATION IN STARLING
 The enter frame event behaves more like a real game timer



this.addEventListener(EnterFrameEvent.ENTER_FRAME, loop);

private function loop(event:EnterFrameEvent):void
{
ANIMATION IN STARLING
 The enter frame event behaves more like a real game timer



this.addEventListener(EnterFrameEvent.ENTER_FRAME, loop);

private function loop(event:EnterFrameEvent):void
{
    trace("Time since last frame: " + event.passedTime);
ANIMATION IN STARLING
 The enter frame event behaves more like a real game timer



this.addEventListener(EnterFrameEvent.ENTER_FRAME, loop);

private function loop(event:EnterFrameEvent):void
{
    trace("Time since last frame: " + event.passedTime);
    enemy.moveBy(event.passedTime * enemy.velocity);
ANIMATION IN STARLING
 The enter frame event behaves more like a real game timer



this.addEventListener(EnterFrameEvent.ENTER_FRAME, loop);

private function loop(event:EnterFrameEvent):void
{
    trace("Time since last frame: " + event.passedTime);
    enemy.moveBy(event.passedTime * enemy.velocity);
}
Starling Deep Dive
STARLING OPTIMIZATION TIPS
Starling Deep Dive
EXPORT A RELEASE BUILD

The speed difference between the debug and release builds in
Starling are huge. Don’t make any assumptions on performance
until you export a release build.
Starling Deep Dive
FLATTEN NON-CHANGING SPRITES

Calling flatten on a sprite is similar to cacheAsBitmap in the regular
display list. It reduces the number of draw calls dramatically.


                    mySprite.flatten();
Starling Deep Dive
MAKE CONTAINERS UNTOUCHABLE
 If a container and its children do not need to be
 interactive with touch set its touchable property to false.


 container.touchable = false;
Starling Deep Dive
USE OBJECT POOLS




pool.getSprite();   pool.returnSprite(s);
Starling Deep Dive
MINIMIZE STATE CHANGES
MINIMIZE STATE CHANGES

Starling batches draw calls whenever possible. Changing the state
of a display object will force a new draw call to the GPU. Properties
that change the state include:
MINIMIZE STATE CHANGES

Starling batches draw calls whenever possible. Changing the state
of a display object will force a new draw call to the GPU. Properties
that change the state include:

 • The texture (textures from the same atlas are fine)
MINIMIZE STATE CHANGES

Starling batches draw calls whenever possible. Changing the state
of a display object will force a new draw call to the GPU. Properties
that change the state include:

 • The texture (textures from the same atlas are fine)
 • The blendMode of display objects
MINIMIZE STATE CHANGES

Starling batches draw calls whenever possible. Changing the state
of a display object will force a new draw call to the GPU. Properties
that change the state include:

 • The texture (textures from the same atlas are fine)
 • The blendMode of display objects
 • The smoothing value of images
MINIMIZE STATE CHANGES

Starling batches draw calls whenever possible. Changing the state
of a display object will force a new draw call to the GPU. Properties
that change the state include:

 •   The texture (textures from the same atlas are fine)
 •   The blendMode of display objects
 •   The smoothing value of images
 •   The repeat mode of textures
MINIMIZE STATE CHANGES

Starling batches draw calls whenever possible. Changing the state
of a display object will force a new draw call to the GPU. Properties
that change the state include:

 •   The texture (textures from the same atlas are fine)
 •   The blendMode of display objects
 •   The smoothing value of images
 •   The repeat mode of textures
 •   The tinted property of quads
Starling Deep Dive
THE QUADBATCH CLASS
THE QUADBATCH CLASS

QuadBatch is a low-level class that Starling uses to batch draw
calls. It is lighter weight than a flattened Sprite.
THE QUADBATCH CLASS

QuadBatch is a low-level class that Starling uses to batch draw
calls. It is lighter weight than a flattened Sprite.

  • All the objects you add must have the same state (i.e. use
    textures from the same atlas).
THE QUADBATCH CLASS

QuadBatch is a low-level class that Starling uses to batch draw
calls. It is lighter weight than a flattened Sprite.

  • All the objects you add must have the same state (i.e. use
    textures from the same atlas).

  • You can only add instances of the Image, Quad, or
    QuadBatch class.
THE QUADBATCH CLASS

QuadBatch is a low-level class that Starling uses to batch draw
calls. It is lighter weight than a flattened Sprite.

  • All the objects you add must have the same state (i.e. use
    textures from the same atlas).

  • You can only add instances of the Image, Quad, or
    QuadBatch class.

  • It's a one-way road: you can only add objects.
Starling Deep Dive
MULTI-SCREEN DEVELOPMENT
Starling Deep Dive
USE SEPARATE SET OF HD TEXTURES
USE SEPARATE SET OF HD TEXTURES




SD texture
iPhone 3G
USE SEPARATE SET OF HD TEXTURES




SD texture
iPhone 3G
                    HD texture
                    iPhone 4S
Starling Deep Dive
CONTENT SCALE FACTOR

    Use this value to scale textures appropriately


var scale:Number = starling.contentScaleFactor;

var texture:Texture = Texture.fromBitmap(bmp,
true, false, scale);
Starling Deep Dive
STARLING EXTENSIONS
wiki.starling-framework.org/extensions/start
Starling Deep Dive
PARTICLE SYSTEM
Easily add particle effects to your games
Starling Deep Dive
FOXHOLE
UI component set particularly suited for mobile
Starling Deep Dive
FRAMEWORKS USING STARLING
Starling Deep Dive
CITRUS ENGINE
Platformer game engine built on top of Starling
Starling Deep Dive
STARLING PUNK
Framework based on the popular Flash Punk engine
Starling Deep Dive
ADOBE NOW SUPPORTS AWAY3D
Starling Deep Dive
COMBINING AWAY3D AND STARLING
Starling Deep Dive
STARLING MOBILE DEMOS
Starling Deep Dive
QUESTIONS?

More Related Content

PPTX
Relic's FX System
PDF
Unreal Engine Basics 03 - Gameplay
PPTX
Creative Coders March 2013 - Introducing Starling Framework
PPT
Adobe AIR Seminar
KEY
Starling Framework
PDF
Intro To Starling Framework for ActionScript 3.0
PDF
Adobe AIR Programming to Desktop and Mobile
KEY
Mobile Gaming: Corona SDK & Adobe AIR RIA Unleashed 2011
Relic's FX System
Unreal Engine Basics 03 - Gameplay
Creative Coders March 2013 - Introducing Starling Framework
Adobe AIR Seminar
Starling Framework
Intro To Starling Framework for ActionScript 3.0
Adobe AIR Programming to Desktop and Mobile
Mobile Gaming: Corona SDK & Adobe AIR RIA Unleashed 2011

Similar to Starling Deep Dive (20)

PDF
The Road to Starling 2
PPTX
Going Mobile with AIR+Starling
PPTX
Presentasi Adobe Camp 2012
PPTX
Mobile game development using Starling
PDF
The tech. behind RoboBlastPlanet
PDF
2D Game Development with Starling
PPTX
Sergey Gonchar - Fast rendering with Starling
PPT
Fast rendering with starling
PDF
Neurotech Solutions Ltd: Рекомендации по Stage3D: выбор наиболее подходящего ...
PPTX
Adobe MAX Recap
PPTX
Penn graphics
PPT
Brewing Your Own Game Engie eng
PDF
Monogame and xna
PDF
Unite2013-gavilan-pdf
PPTX
Developing Next-Generation Games with Stage3D (Molehill)
PDF
Developing games for Series 40 full-touch UI
PDF
XNA L09–2D Graphics and Particle Engines
PPTX
ARCore 101: A Hands-on Workshop
PDF
Whats new in Feathers 3.0?
PDF
Adobe: Changing the game
The Road to Starling 2
Going Mobile with AIR+Starling
Presentasi Adobe Camp 2012
Mobile game development using Starling
The tech. behind RoboBlastPlanet
2D Game Development with Starling
Sergey Gonchar - Fast rendering with Starling
Fast rendering with starling
Neurotech Solutions Ltd: Рекомендации по Stage3D: выбор наиболее подходящего ...
Adobe MAX Recap
Penn graphics
Brewing Your Own Game Engie eng
Monogame and xna
Unite2013-gavilan-pdf
Developing Next-Generation Games with Stage3D (Molehill)
Developing games for Series 40 full-touch UI
XNA L09–2D Graphics and Particle Engines
ARCore 101: A Hands-on Workshop
Whats new in Feathers 3.0?
Adobe: Changing the game
Ad

Recently uploaded (20)

PPTX
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
PPT
Module 1.ppt Iot fundamentals and Architecture
PPTX
Custom Battery Pack Design Considerations for Performance and Safety
PDF
CloudStack 4.21: First Look Webinar slides
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
Flame analysis and combustion estimation using large language and vision assi...
PDF
sbt 2.0: go big (Scala Days 2025 edition)
PDF
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
DOCX
search engine optimization ppt fir known well about this
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PDF
A proposed approach for plagiarism detection in Myanmar Unicode text
PDF
Consumable AI The What, Why & How for Small Teams.pdf
PDF
Convolutional neural network based encoder-decoder for efficient real-time ob...
PPT
What is a Computer? Input Devices /output devices
PPT
Geologic Time for studying geology for geologist
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PDF
sustainability-14-14877-v2.pddhzftheheeeee
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
Module 1.ppt Iot fundamentals and Architecture
Custom Battery Pack Design Considerations for Performance and Safety
CloudStack 4.21: First Look Webinar slides
Final SEM Unit 1 for mit wpu at pune .pptx
Taming the Chaos: How to Turn Unstructured Data into Decisions
Enhancing emotion recognition model for a student engagement use case through...
Flame analysis and combustion estimation using large language and vision assi...
sbt 2.0: go big (Scala Days 2025 edition)
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
search engine optimization ppt fir known well about this
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
A contest of sentiment analysis: k-nearest neighbor versus neural network
A proposed approach for plagiarism detection in Myanmar Unicode text
Consumable AI The What, Why & How for Small Teams.pdf
Convolutional neural network based encoder-decoder for efficient real-time ob...
What is a Computer? Input Devices /output devices
Geologic Time for studying geology for geologist
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
sustainability-14-14877-v2.pddhzftheheeeee
Ad

Starling Deep Dive