intro to starling framework for actionscript 3.0

Post on 09-May-2015

5.003 Views

Category:

Career

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

TM & © 2012 Rivello Multimedia Consulting

info@RivelloMultimediaConsulting.com

Starling Framework

Samuel Asher Rivello

Principal, Rivello Multimedia Consulting

An Introduction

TM & © 2012 Rivello Multimedia Consulting

info@RivelloMultimediaConsulting.com

Speaker•Samuel Asher Rivello is the principal of Rivello Multmedia Consultng (RMC). Rivello Multmedia Consultng (RMC) provides sofware consultng services for Adobe’s Flash and Flex as well as HTML5 standards.

•We consult on sofware architecture for apps and for games, advergames, and monetzed virtual worlds targetng browsers, desktop, and cross-device mobile.

•We champion best practces, setup efcient team workfows, and provide corporate technical training.

Agenda•Learn the benefts and syntax of Starling for gaming

Audience•Intermediate to Advanced ActionScript 3.0 Developers

Take-Away•All source code and documentation will be available to attendees

Topic

TM & © 2012 Rivello Multimedia Consulting

info@RivelloMultimediaConsulting.com

Notice

1. Stage3D is new

2. Starling is new

3. I am new

So... features and syntax may change and my code may not show the 'best' solutions.

Topic

TM & © 2012 Rivello Multimedia Consulting

info@RivelloMultimediaConsulting.com

Three Sections

1. What is Stage3D?

• Benefits & Challenges

• Frameworks

2. What is Starling?

• Overview

• Implementation (Code Samples!)

3. Conclusion

• Q&A

• References

Agenda

TM & © 2012 Rivello Multimedia Consulting

info@RivelloMultimediaConsulting.com

SECTION 1What is Stage3D?

TM & © 2012 Rivello Multimedia Consulting

info@RivelloMultimediaConsulting.com

What is Stage3D

● Stage 3D, previously codenamed "Molehill," is a method of 2D and 3D rendering with a set of low-level GPU-accelerated APIs● Available for Flash Player 11.x and AIR 3.2 (iOS/Android)● Runs on a unique layer under the display list (See Figure 1.)

Stage3D

Figure 1

Today, you can publish the fastest Flash games ever on the widest array of devices including iPad 3!

TM & © 2012 Rivello Multimedia Consulting

info@RivelloMultimediaConsulting.com

Benefits

● With Stage3D – Render hundreds of thousands of z-bufered triangles to be rendered at HD resoluton in full screen at 60 Hz (instead of just 'thousands' at 30 Hz without Stage3D).● GPU not CPU now handles rendering so rendering is more performant and you have more CPU power for your coding.

Stage3D

TM & © 2012 Rivello Multimedia Consulting

info@RivelloMultimediaConsulting.com

Challenges

● The language is very low-level (difcult* to read and write)● All 'sprites' must be patched together from triangles (triangles are the 'pixel' of 3D graphics)● Sprites handling mouse gestures and using vector graphics is not supported

Stage3D

* Especially compared to the (non-Stage3D) traditonal Display List

TM & © 2012 Rivello Multimedia Consulting

info@RivelloMultimediaConsulting.com

Sounds powerful, but hard to use...

●True. ●Luckily, we have some help.●Many frameworks exist to make our lives easier.

Stage3D

TM & © 2012 Rivello Multimedia Consulting

info@RivelloMultimediaConsulting.com

Frameworks

AS3 frameworks with Stage3D for 2D gaming;● Starling● ND2D● Citrus Engine (Recently Upgraded To Stage3D)

AS3 frameworks for Stage3D for 3D gaming;● Flare3D● Alternatva3D (Recently Open-Source)

Stage3D

TM & © 2012 Rivello Multimedia Consulting

info@RivelloMultimediaConsulting.com

SECTION 2What is Starling?

TM & © 2012 Rivello Multimedia Consulting

info@RivelloMultimediaConsulting.com

What is Starling? – A 2D AS3 Framework for Stage3D● Free & Open Source – Easy to use so you can focus on your games!● Platorm independent – Browser, Desktop, iOS, Android, Blackberry Tablet.● Amazing Performance & Familiar API -Starling is a pure ActonScript 3 library that mimics the conventonal Flash display list architecture.● Embraced* by Adobe – Adobe supports the development of Starling and plans to integrate it tghtly into its tools. You get the best of both worlds: corporate commitment and a vivid community.

Starling

* Very Interestng – This means tghter integraton with Flash Player / AIR improvements and bigger marketng muscle

for the framework. The 2D Framework with the biggest community has a distnct advantage.

TM & © 2012 Rivello Multimedia Consulting

info@RivelloMultimediaConsulting.com

Core Classes

Starling

TM & © 2012 Rivello Multimedia Consulting

info@RivelloMultimediaConsulting.com

Assets● TextureAtlas – An instance is required for each 'asset' you want to render. Its defned by a SpriteSheet and XML info about it. You cannot directly use vector source assets such as Flash tmeline animaton.● I don't use TextureAtlas or SpriteSheets – I use a Starling extension DynamicTextureAtlasGenerator that allows for full vector source assets.

Starling

Core Concepts

●Setup - The Startup.as document-class extends Sprite and composes an instance of Game.as. ● Starling.juggler.add (displayObject) - Required to have 'enterFrame'.

Vector (FLA) SpriteSheet (JPG)

TM & © 2012 Rivello Multimedia Consulting

info@RivelloMultimediaConsulting.com

DEMOLet's See Starling In Action!

1. The Official Demo - http://gamua.com/starling/demo/2. My Hello World3. My Flyer Game (Simple Version)4. My Flyer Game (OOP Version)

TM & © 2012 Rivello Multimedia Consulting

info@RivelloMultimediaConsulting.com

Starling

Extensions

●Allow for additonal functonality within Starling projects. My favorites;●PartcleSystem – Generate efects like smoke & fre●DynamicTextureAtlas Generator – Use vector source assets

ParticleSystem Designer Particle System In Game (FlyerGame)

TM & © 2012 Rivello Multimedia Consulting

info@RivelloMultimediaConsulting.com

Three Sections

1. What is Stage3D?

• Benefits & Challenges

• Frameworks

2. What is Starling?

• Overview

• Implementation (Code Samples!)

3. Conclusion

• Q&A

• References

Q&A!

TM & © 2012 Rivello Multimedia Consulting

info@RivelloMultimediaConsulting.com

SECTION 3Conclusion

TM & © 2012 Rivello Multimedia Consulting

info@RivelloMultimediaConsulting.com

Starling Framework

References

Today's Presentation (Includes All Other Links)

http://bit.ly/IntroStarling

TM & © 2012 Rivello Multimedia Consulting

info@RivelloMultimediaConsulting.com

Thanks!

Presentation Questions

Send Questions & Comments

info@RivelloMultimediaConsulting.com

Consulting Inquiries (RivelloMultimediaConsulting.com)

Software Architecture, Consulting, Development, & Training.

info@RivelloMultimediaConsulting.com

TM & © 2012 Rivello Multimedia Consulting

info@RivelloMultimediaConsulting.com

Thanks!

Presentation Questions

Send Questions & Comments

info@RivelloMultimediaConsulting.com

Consulting Inquiries (RivelloMultimediaConsulting.com)

Software Architecture, Consulting, Development, & Training.

info@RivelloMultimediaConsulting.com

top related