SlideShare ist ein Scribd-Unternehmen logo
1 von 32
Downloaden Sie, um offline zu lesen
Flashを使った
                      PC、Android、iOS 向けに
                    GPU アクセラレーション対応の
                          2Dゲーム開発
                                                                              Andy Hall
                                                                              Adobe Japan



© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Andy Hall アンディ ホール
                                       Game Evangelist ゲームエバンジェリスト
                                         Adobe Japan アドビ システムズ 株式会社
                                                       @fenomas

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Agenda

          1.                Flash、ゲームの背景的な話
          2.                Stage3D、AGALについて
          3.                Starlingについて
          4.                開発に飛び込もう




© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Flash and Games




© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Why Flash?

          • パフォーマンス
          • ツール
          • リーチ




© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Why Flash?

          • パフォーマンス
          • ツール       サイレント
                    自動アップデート
          • リーチ       ユーザ数:
                                                                                    4億人 (!!!)




© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Why Flash?

          • パフォーマンス
          • ツール       サイレント
                    自動アップデート
          • リーチ       ユーザ数:
                                                                                           4億人 (!!!)




                                                                                 400M
                                  Wii                                PS3        Xbox 360
                                95.56M                              63.9M        67.2M

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
                                                                                              sales numbers as of April-June 2012. Source: Wikipedia
採用状況




                       9 of 10 top                                            Angry Birds Friends   Ruby Blast
                    Facebook games                                                 (Rovio)           (Zynga)



© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
About Flash
          • Flash is:
                • 柔軟で応用が利く
                • クロスプラットフォーム
                • モバイルに最適(Android、iOS 他)

          • Flash isn’t:
                • 「ドラッグ・ドロップでゲーム!」
                • 完全ネイティブパフォーマンス


© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Why the GPU?

                                                                               Tablets,
                                                                               mobiles,
                                                                               retina displays.

                                                                               Pushing pixels
                                                                               through
                                                                               software isn’t
                                                                               an option.

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Stage3D



                                                                                                  Vector
                                                                                            3D
                                                                                                       Video

                                                                                        Display List




© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Stage3D

                                                               Flash コンテンツ
                                                                (ActionScript)


               シェーダー
                                                               Stage3D (AGAL)
              パイプライン

                                                            OpenGL or DirectX


                                                                              GPU



© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
AGALとは

                                                     m44                      op, va0, vc0
                                                     dp4                      op.x, va0, vc0
                                                     dp4                      op.y, va0, vc1
                                                     dp4                      op.z, va0, vc2
                                                     dp4                      op.w, va0, vc3
                                                     m44                      op, va0, vc0
                                                     mov                      v0, va1

                                                           (ヒトリデハキケンジャ!)

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Starlingの場合


                   import starling.display.Sprite;

                   var hero:Sprite = new Sprite();
                   hero.x = 200;
                   hero.y = 200;
                   addChild(hero);


                                                                 (コレヲ サズケヨウ! )

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Stage3D ライブラリー
          • オフィシャルライブラリー (free, open source):

                                • Starling (2D)

                                • Away3D



          • ニーズによって他にも様々…


               N2D2
                                              Genome2D

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Starling

          Flash Player
       Display List API
                 (AS3)                                                                   Sparrow
                                                                                         フレームワーク
                                                                                         (ObjC)




               Starling
                 (AS3)



© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Starling + Stage3D

                                                               Flash コンテンツ
                                                                (ActionScript)

                                                                              Starling

                                                               Stage3D (AGAL)

                                                            OpenGL or DirectX

                                                                               GPU



© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Starlingが送ること
          • Starling gives you:
                • 生産性
                • 親しみのある習得の早いAPI
                • 拡張性
                • 活発的なコミュニティー
          • Starling doesn’t give you:
                • GPUは何ぞよ、と気にしなくて良いほど
                  の安全性
                • GPUには優しく!

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
コードを見せろってば!




© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Starling core API
                                                                              starling.events.EventDispatcher


       starling.display.*
                                                                                         DisplayObject



                               DisplayObjectContainer                                                Quad


                                                                                                    Image
              Button                                                             Stage
                                 Sprite                               TextField
                                                                                                  MovieClip


© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Starling core API
                                                                              starling.events.EventDispatcher


       starling.display.*
                                                                                         DisplayObject



                               DisplayObjectContainer                                                Quad


                                                                                                    Image
              Button                                                             Stage
                                 Sprite                               TextField
                                                                                                  MovieClip


© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
• Just vertices with a color but no texture
          • Color interpolated on the GPU
                                                                              Quad
          • Simple primitive

          Example :

          q = new Quad(200, 200);
          q.setVertexColor(0, 0x000000);
          q.setVertexColor(1, 0xAA0000);
          q.setVertexColor(2, 0x00FF00);
          q.setVertexColor(3, 0x0000FF);
          addChild (q);

          Solid color :
          q.color = 0x00FF00;

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
• Image is textured quad (extends Quad)
         • Textures should be uploaded and pooled,
                                                                              Image
           rather than created when needed
         • State tracking (setTexture – expensive)
         • Compressed textures

         Example :
         // create a texture, then an image
         var myBitmap:Bitmap = new MyBitmapClass();
         var texture:Texture = Texture.fromBitmap(myBitmap);
         var image:Image = new Image ( texture );
         addChild ( image );

         Tint :
         image.color = 0xFF0000;


© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
• The lightest container available
            (just like with standard Flash display list)
                                                                              Sprite
          • Can be flattened, to display a
            complex tree quickly
          • However, all children’s textures need to be in the same
            texture (or atlas) to see really great performance

          Example :
          // freeze the children
          container.flatten();
          // assign changes to a child
          container.child.scaleX = .5;
          // refresh
          container.flatten(); // or unflatten();
© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Sprite, with a timeline
                                                                              MovieClip
          •
          •       A different texture on each frame
          •       Is not a container.
          •       Does not support scripts on frames.
          •       Completely controllable (custom fps,
                  addFrame, etc).

          Example :
          // retrieve frames from a Flash MC
          var frames:Vector.<Texture> =
          sTextureAtlas.getTextures("running_");

          // creates a MovieClip playing at 40fps
          mMovie = new MovieClip(frames, 40);
© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
TextureAtlas




          • Packaged sets of sprite sheets
          • To optimize, make sure GPU calls each use one Atlas

          Example :
          // get all textures with a common prefix
          myTextureAtlas.getTextures(“fly_”);

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
ではコードを書いてみよう。




© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
拡張の例
          Particle Editor
          http://onebyonedesign.com/flash/particleeditor/




© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Starlingの最適化
       • Flatten containers if their contents won’t change:
         container.flatten();

       • Prevent unnecessary touch event handling:
         container.touchable = false;

       • Use object pools:
         s = pool.getSprite();
         pool.returnSprite(s);


© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
今後のトピック
          Adobe Texture Format (ATF)
          • A compressed texture format created specially
            for Stage3D
          • The player understand ATF
            natively, which brings
            performance benefits

          Tools and libraries are coming.



© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
ご清聴ありがとうございました。




                                                                              andhall@adobe.com
                                                                              @fenomas

© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Weitere ähnliche Inhalte

Was ist angesagt?

JAX2010 Flex Java technical session: interactive dashboard
JAX2010 Flex Java technical session: interactive dashboardJAX2010 Flex Java technical session: interactive dashboard
JAX2010 Flex Java technical session: interactive dashboardMichael Chaize
 
Oop2012 keynote Design Driven Development
Oop2012 keynote Design Driven DevelopmentOop2012 keynote Design Driven Development
Oop2012 keynote Design Driven DevelopmentMichael Chaize
 
Creating Flash Content for Mobile Devices
Creating Flash Content for Mobile DevicesCreating Flash Content for Mobile Devices
Creating Flash Content for Mobile Devicespaultrani
 
Adobe flex at jax london 2011
Adobe flex at  jax london 2011Adobe flex at  jax london 2011
Adobe flex at jax london 2011Michael Chaize
 
Flex and the city in London - Keynote
Flex and the city in London - KeynoteFlex and the city in London - Keynote
Flex and the city in London - KeynoteMichael Chaize
 
Oop2012 mobile workshops
Oop2012 mobile workshopsOop2012 mobile workshops
Oop2012 mobile workshopsMichael Chaize
 
Flash camp portugal - Let's talk about Flex baby
Flash camp portugal - Let's talk about Flex babyFlash camp portugal - Let's talk about Flex baby
Flash camp portugal - Let's talk about Flex babyMichael Chaize
 
Adobe et la stratégie multi-écrans
Adobe et la stratégie multi-écransAdobe et la stratégie multi-écrans
Adobe et la stratégie multi-écransMichael Chaize
 
Back From MAX in London for CQ5 users
Back From MAX in London for CQ5 usersBack From MAX in London for CQ5 users
Back From MAX in London for CQ5 usersMichael Chaize
 
Adobe flash platform java
Adobe flash platform javaAdobe flash platform java
Adobe flash platform javaMichael Chaize
 
Imaginea product-support-offering
Imaginea product-support-offeringImaginea product-support-offering
Imaginea product-support-offeringRajaneeshChandra
 
Adobe Summit EMEA 2012 : 16706 Optimise Mobile Experience
Adobe Summit EMEA 2012 : 16706 Optimise Mobile ExperienceAdobe Summit EMEA 2012 : 16706 Optimise Mobile Experience
Adobe Summit EMEA 2012 : 16706 Optimise Mobile ExperienceBen Seymour
 
Adobe Max 2008 Cross Channel Campaigns
Adobe Max 2008 Cross Channel CampaignsAdobe Max 2008 Cross Channel Campaigns
Adobe Max 2008 Cross Channel CampaignsCharles Duncan jr.
 
Process in the Age of Digital Innovation
Process in the Age of Digital InnovationProcess in the Age of Digital Innovation
Process in the Age of Digital InnovationCharles Duncan jr.
 
Enabling the mobile Web for a Dojo component
Enabling the mobile Web for a Dojo componentEnabling the mobile Web for a Dojo component
Enabling the mobile Web for a Dojo componentcjolif
 

Was ist angesagt? (19)

Jax2001 adobe keynote
Jax2001 adobe keynoteJax2001 adobe keynote
Jax2001 adobe keynote
 
Montpellier - Flex UG
Montpellier - Flex UGMontpellier - Flex UG
Montpellier - Flex UG
 
JAX2010 Flex Java technical session: interactive dashboard
JAX2010 Flex Java technical session: interactive dashboardJAX2010 Flex Java technical session: interactive dashboard
JAX2010 Flex Java technical session: interactive dashboard
 
Jax2010 adobe lcds
Jax2010 adobe lcdsJax2010 adobe lcds
Jax2010 adobe lcds
 
Oop2012 keynote Design Driven Development
Oop2012 keynote Design Driven DevelopmentOop2012 keynote Design Driven Development
Oop2012 keynote Design Driven Development
 
Creating Flash Content for Mobile Devices
Creating Flash Content for Mobile DevicesCreating Flash Content for Mobile Devices
Creating Flash Content for Mobile Devices
 
Adobe flex at jax london 2011
Adobe flex at  jax london 2011Adobe flex at  jax london 2011
Adobe flex at jax london 2011
 
Flex and the city in London - Keynote
Flex and the city in London - KeynoteFlex and the city in London - Keynote
Flex and the city in London - Keynote
 
Oop2012 mobile workshops
Oop2012 mobile workshopsOop2012 mobile workshops
Oop2012 mobile workshops
 
Flash camp portugal - Let's talk about Flex baby
Flash camp portugal - Let's talk about Flex babyFlash camp portugal - Let's talk about Flex baby
Flash camp portugal - Let's talk about Flex baby
 
Adobe et la stratégie multi-écrans
Adobe et la stratégie multi-écransAdobe et la stratégie multi-écrans
Adobe et la stratégie multi-écrans
 
Back From MAX in London for CQ5 users
Back From MAX in London for CQ5 usersBack From MAX in London for CQ5 users
Back From MAX in London for CQ5 users
 
Adobe flash platform java
Adobe flash platform javaAdobe flash platform java
Adobe flash platform java
 
Imaginea product-support-offering
Imaginea product-support-offeringImaginea product-support-offering
Imaginea product-support-offering
 
Adobe Summit EMEA 2012 : 16706 Optimise Mobile Experience
Adobe Summit EMEA 2012 : 16706 Optimise Mobile ExperienceAdobe Summit EMEA 2012 : 16706 Optimise Mobile Experience
Adobe Summit EMEA 2012 : 16706 Optimise Mobile Experience
 
Adobe Max 2008 Cross Channel Campaigns
Adobe Max 2008 Cross Channel CampaignsAdobe Max 2008 Cross Channel Campaigns
Adobe Max 2008 Cross Channel Campaigns
 
Flex User Group breton
Flex User Group bretonFlex User Group breton
Flex User Group breton
 
Process in the Age of Digital Innovation
Process in the Age of Digital InnovationProcess in the Age of Digital Innovation
Process in the Age of Digital Innovation
 
Enabling the mobile Web for a Dojo component
Enabling the mobile Web for a Dojo componentEnabling the mobile Web for a Dojo component
Enabling the mobile Web for a Dojo component
 

Ähnlich wie CEDEC2012 Starling開発

Tom Krcha: Building Games with Adobe Technologies
Tom Krcha: Building Games with Adobe TechnologiesTom Krcha: Building Games with Adobe Technologies
Tom Krcha: Building Games with Adobe TechnologiesDevGAMM Conference
 
Flash performance tuning (EN)
Flash performance tuning (EN)Flash performance tuning (EN)
Flash performance tuning (EN)Andy Hall
 
Adobe Shadow - Amsterdam Adobe Camp
Adobe Shadow - Amsterdam Adobe CampAdobe Shadow - Amsterdam Adobe Camp
Adobe Shadow - Amsterdam Adobe CampMihai Corlan
 
Adobe Flash platform の法人利用
Adobe Flash platform の法人利用Adobe Flash platform の法人利用
Adobe Flash platform の法人利用Keisuke Todoroki
 
Xebia adobe flash mobile applications
Xebia adobe flash mobile applicationsXebia adobe flash mobile applications
Xebia adobe flash mobile applicationsMichael Chaize
 
Node.js and Photoshop Generator - JSConf Asia 2013
Node.js and Photoshop Generator - JSConf Asia 2013Node.js and Photoshop Generator - JSConf Asia 2013
Node.js and Photoshop Generator - JSConf Asia 2013Andy Hall
 
Flash: A call for sanity
Flash: A call for sanityFlash: A call for sanity
Flash: A call for sanityAndrew Dobson
 
Creating Mobile Content Using Flash
Creating Mobile Content Using FlashCreating Mobile Content Using Flash
Creating Mobile Content Using Flashpaultrani
 
Flash Platformアップデート
Flash PlatformアップデートFlash Platformアップデート
Flash PlatformアップデートMariko Nishimura
 
Adobe flash platform java
Adobe flash platform javaAdobe flash platform java
Adobe flash platform javaCh'ti JUG
 
Flash Applications For Mobile
Flash Applications For MobileFlash Applications For Mobile
Flash Applications For MobileSerge Jespers
 
Flex 4.5 and mobile development
Flex 4.5 and mobile developmentFlex 4.5 and mobile development
Flex 4.5 and mobile developmentMichael Chaize
 
Adobe in Technical Communication and Instructional Design
Adobe in Technical Communication and Instructional DesignAdobe in Technical Communication and Instructional Design
Adobe in Technical Communication and Instructional DesignScott Abel
 
Develop multi-screen applications with Flex
Develop multi-screen applications with Flex Develop multi-screen applications with Flex
Develop multi-screen applications with Flex Codemotion
 
The Flash to HTML5 Opportunity
The Flash to HTML5 OpportunityThe Flash to HTML5 Opportunity
The Flash to HTML5 OpportunityThomas Burleson
 
Using Edge Animate to Create a Reusable Component Set
Using Edge Animate to Create a Reusable Component SetUsing Edge Animate to Create a Reusable Component Set
Using Edge Animate to Create a Reusable Component SetJoseph Labrecque
 
Concurrent Programming with ActionScript workers
Concurrent Programming with ActionScript workersConcurrent Programming with ActionScript workers
Concurrent Programming with ActionScript workersPaul Robertson
 

Ähnlich wie CEDEC2012 Starling開発 (20)

Tom Krcha: Building Games with Adobe Technologies
Tom Krcha: Building Games with Adobe TechnologiesTom Krcha: Building Games with Adobe Technologies
Tom Krcha: Building Games with Adobe Technologies
 
MMT 28: Adobe »Edge to the Flash«
MMT 28: Adobe »Edge to the Flash«MMT 28: Adobe »Edge to the Flash«
MMT 28: Adobe »Edge to the Flash«
 
Flash performance tuning (EN)
Flash performance tuning (EN)Flash performance tuning (EN)
Flash performance tuning (EN)
 
Adobe Shadow - Amsterdam Adobe Camp
Adobe Shadow - Amsterdam Adobe CampAdobe Shadow - Amsterdam Adobe Camp
Adobe Shadow - Amsterdam Adobe Camp
 
Adobe Flash platform の法人利用
Adobe Flash platform の法人利用Adobe Flash platform の法人利用
Adobe Flash platform の法人利用
 
Xebia adobe flash mobile applications
Xebia adobe flash mobile applicationsXebia adobe flash mobile applications
Xebia adobe flash mobile applications
 
Node.js and Photoshop Generator - JSConf Asia 2013
Node.js and Photoshop Generator - JSConf Asia 2013Node.js and Photoshop Generator - JSConf Asia 2013
Node.js and Photoshop Generator - JSConf Asia 2013
 
Flash: A call for sanity
Flash: A call for sanityFlash: A call for sanity
Flash: A call for sanity
 
Creating Mobile Content Using Flash
Creating Mobile Content Using FlashCreating Mobile Content Using Flash
Creating Mobile Content Using Flash
 
Flash Platformアップデート
Flash PlatformアップデートFlash Platformアップデート
Flash Platformアップデート
 
Adobe flash platform java
Adobe flash platform javaAdobe flash platform java
Adobe flash platform java
 
Flash Applications For Mobile
Flash Applications For MobileFlash Applications For Mobile
Flash Applications For Mobile
 
Flex 4.5 and mobile development
Flex 4.5 and mobile developmentFlex 4.5 and mobile development
Flex 4.5 and mobile development
 
Adobe in Technical Communication and Instructional Design
Adobe in Technical Communication and Instructional DesignAdobe in Technical Communication and Instructional Design
Adobe in Technical Communication and Instructional Design
 
Develop multi-screen applications with Flex
Develop multi-screen applications with Flex Develop multi-screen applications with Flex
Develop multi-screen applications with Flex
 
The Flash to HTML5 Opportunity
The Flash to HTML5 OpportunityThe Flash to HTML5 Opportunity
The Flash to HTML5 Opportunity
 
Using Edge Animate to Create a Reusable Component Set
Using Edge Animate to Create a Reusable Component SetUsing Edge Animate to Create a Reusable Component Set
Using Edge Animate to Create a Reusable Component Set
 
Concurrent Programming with ActionScript workers
Concurrent Programming with ActionScript workersConcurrent Programming with ActionScript workers
Concurrent Programming with ActionScript workers
 
4 adobe gaming on tv
4 adobe gaming on tv4 adobe gaming on tv
4 adobe gaming on tv
 
Bynet2.3 Adobe Flex builder 4
Bynet2.3 Adobe Flex builder 4Bynet2.3 Adobe Flex builder 4
Bynet2.3 Adobe Flex builder 4
 

Mehr von Andy Hall

FITC2014 モダンなWeb
FITC2014 モダンなWebFITC2014 モダンなWeb
FITC2014 モダンなWebAndy Hall
 
ソーシャルゲーム市場とアドビFlash戦略
ソーシャルゲーム市場とアドビFlash戦略ソーシャルゲーム市場とアドビFlash戦略
ソーシャルゲーム市場とアドビFlash戦略Andy Hall
 
Flashまわりのでっかいゆめを見る
Flashまわりのでっかいゆめを見るFlashまわりのでっかいゆめを見る
Flashまわりのでっかいゆめを見るAndy Hall
 
AIRにおけるゲーム創り
AIRにおけるゲーム創りAIRにおけるゲーム創り
AIRにおけるゲーム創りAndy Hall
 
Flash/AIRの最新情報及びARMとの協業
Flash/AIRの最新情報及びARMとの協業Flash/AIRの最新情報及びARMとの協業
Flash/AIRの最新情報及びARMとの協業Andy Hall
 
ごはんとFlash 2010
ごはんとFlash 2010ごはんとFlash 2010
ごはんとFlash 2010Andy Hall
 
PhoneGapとハイブリッド開発
PhoneGapとハイブリッド開発PhoneGapとハイブリッド開発
PhoneGapとハイブリッド開発Andy Hall
 
PhoneGapでハイブリッド開発 for Firefox OS
PhoneGapでハイブリッド開発 for Firefox OSPhoneGapでハイブリッド開発 for Firefox OS
PhoneGapでハイブリッド開発 for Firefox OSAndy Hall
 
PhoneGap クイック スタート ガイド
PhoneGap クイック スタート ガイドPhoneGap クイック スタート ガイド
PhoneGap クイック スタート ガイドAndy Hall
 
Adobe&HTML 札幌 - HTML5 Caravan
Adobe&HTML 札幌 - HTML5 CaravanAdobe&HTML 札幌 - HTML5 Caravan
Adobe&HTML 札幌 - HTML5 CaravanAndy Hall
 
モダンなWebとモダンな開発ツールの新ネタ
モダンなWebとモダンな開発ツールの新ネタモダンなWebとモダンな開発ツールの新ネタ
モダンなWebとモダンな開発ツールの新ネタAndy Hall
 
HTML5 Caravan 福岡・Adobe&HTMLのスライド
HTML5 Caravan 福岡・Adobe&HTMLのスライドHTML5 Caravan 福岡・Adobe&HTMLのスライド
HTML5 Caravan 福岡・Adobe&HTMLのスライドAndy Hall
 
dotFes - Web標準にEdgeを利かそう
dotFes - Web標準にEdgeを利かそうdotFes - Web標準にEdgeを利かそう
dotFes - Web標準にEdgeを利かそうAndy Hall
 
dotFes KYOTO - スマホ開発にAIR & PhoneGapを勧める5つの理由
dotFes KYOTO - スマホ開発にAIR & PhoneGapを勧める5つの理由dotFes KYOTO - スマホ開発にAIR & PhoneGapを勧める5つの理由
dotFes KYOTO - スマホ開発にAIR & PhoneGapを勧める5つの理由Andy Hall
 
モダンなウェブをモダンなツールで創ろう!
モダンなウェブをモダンなツールで創ろう!モダンなウェブをモダンなツールで創ろう!
モダンなウェブをモダンなツールで創ろう!Andy Hall
 
CEDEC 2013 - FlashによるアセットワークフローのHTML5やネイティブアプリへのうまい持ち込み方
CEDEC 2013 - FlashによるアセットワークフローのHTML5やネイティブアプリへのうまい持ち込み方CEDEC 2013 - FlashによるアセットワークフローのHTML5やネイティブアプリへのうまい持ち込み方
CEDEC 2013 - FlashによるアセットワークフローのHTML5やネイティブアプリへのうまい持ち込み方Andy Hall
 
Link test mac
Link test macLink test mac
Link test macAndy Hall
 
Link test win
Link test winLink test win
Link test winAndy Hall
 
Adobe & HTML5
Adobe & HTML5Adobe & HTML5
Adobe & HTML5Andy Hall
 
Dragon bones ボーンアニメーション紹介&v2.0アップデート
Dragon bones ボーンアニメーション紹介&v2.0アップデートDragon bones ボーンアニメーション紹介&v2.0アップデート
Dragon bones ボーンアニメーション紹介&v2.0アップデートAndy Hall
 

Mehr von Andy Hall (20)

FITC2014 モダンなWeb
FITC2014 モダンなWebFITC2014 モダンなWeb
FITC2014 モダンなWeb
 
ソーシャルゲーム市場とアドビFlash戦略
ソーシャルゲーム市場とアドビFlash戦略ソーシャルゲーム市場とアドビFlash戦略
ソーシャルゲーム市場とアドビFlash戦略
 
Flashまわりのでっかいゆめを見る
Flashまわりのでっかいゆめを見るFlashまわりのでっかいゆめを見る
Flashまわりのでっかいゆめを見る
 
AIRにおけるゲーム創り
AIRにおけるゲーム創りAIRにおけるゲーム創り
AIRにおけるゲーム創り
 
Flash/AIRの最新情報及びARMとの協業
Flash/AIRの最新情報及びARMとの協業Flash/AIRの最新情報及びARMとの協業
Flash/AIRの最新情報及びARMとの協業
 
ごはんとFlash 2010
ごはんとFlash 2010ごはんとFlash 2010
ごはんとFlash 2010
 
PhoneGapとハイブリッド開発
PhoneGapとハイブリッド開発PhoneGapとハイブリッド開発
PhoneGapとハイブリッド開発
 
PhoneGapでハイブリッド開発 for Firefox OS
PhoneGapでハイブリッド開発 for Firefox OSPhoneGapでハイブリッド開発 for Firefox OS
PhoneGapでハイブリッド開発 for Firefox OS
 
PhoneGap クイック スタート ガイド
PhoneGap クイック スタート ガイドPhoneGap クイック スタート ガイド
PhoneGap クイック スタート ガイド
 
Adobe&HTML 札幌 - HTML5 Caravan
Adobe&HTML 札幌 - HTML5 CaravanAdobe&HTML 札幌 - HTML5 Caravan
Adobe&HTML 札幌 - HTML5 Caravan
 
モダンなWebとモダンな開発ツールの新ネタ
モダンなWebとモダンな開発ツールの新ネタモダンなWebとモダンな開発ツールの新ネタ
モダンなWebとモダンな開発ツールの新ネタ
 
HTML5 Caravan 福岡・Adobe&HTMLのスライド
HTML5 Caravan 福岡・Adobe&HTMLのスライドHTML5 Caravan 福岡・Adobe&HTMLのスライド
HTML5 Caravan 福岡・Adobe&HTMLのスライド
 
dotFes - Web標準にEdgeを利かそう
dotFes - Web標準にEdgeを利かそうdotFes - Web標準にEdgeを利かそう
dotFes - Web標準にEdgeを利かそう
 
dotFes KYOTO - スマホ開発にAIR & PhoneGapを勧める5つの理由
dotFes KYOTO - スマホ開発にAIR & PhoneGapを勧める5つの理由dotFes KYOTO - スマホ開発にAIR & PhoneGapを勧める5つの理由
dotFes KYOTO - スマホ開発にAIR & PhoneGapを勧める5つの理由
 
モダンなウェブをモダンなツールで創ろう!
モダンなウェブをモダンなツールで創ろう!モダンなウェブをモダンなツールで創ろう!
モダンなウェブをモダンなツールで創ろう!
 
CEDEC 2013 - FlashによるアセットワークフローのHTML5やネイティブアプリへのうまい持ち込み方
CEDEC 2013 - FlashによるアセットワークフローのHTML5やネイティブアプリへのうまい持ち込み方CEDEC 2013 - FlashによるアセットワークフローのHTML5やネイティブアプリへのうまい持ち込み方
CEDEC 2013 - FlashによるアセットワークフローのHTML5やネイティブアプリへのうまい持ち込み方
 
Link test mac
Link test macLink test mac
Link test mac
 
Link test win
Link test winLink test win
Link test win
 
Adobe & HTML5
Adobe & HTML5Adobe & HTML5
Adobe & HTML5
 
Dragon bones ボーンアニメーション紹介&v2.0アップデート
Dragon bones ボーンアニメーション紹介&v2.0アップデートDragon bones ボーンアニメーション紹介&v2.0アップデート
Dragon bones ボーンアニメーション紹介&v2.0アップデート
 

Kürzlich hochgeladen

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 

Kürzlich hochgeladen (20)

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 

CEDEC2012 Starling開発

  • 1. Flashを使った PC、Android、iOS 向けに GPU アクセラレーション対応の 2Dゲーム開発 Andy Hall Adobe Japan © 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • 2. Andy Hall アンディ ホール Game Evangelist ゲームエバンジェリスト Adobe Japan アドビ システムズ 株式会社 @fenomas © 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • 3. Agenda 1. Flash、ゲームの背景的な話 2. Stage3D、AGALについて 3. Starlingについて 4. 開発に飛び込もう © 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • 4. Flash and Games © 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • 5. Why Flash? • パフォーマンス • ツール • リーチ © 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • 6. Why Flash? • パフォーマンス • ツール サイレント 自動アップデート • リーチ ユーザ数: 4億人 (!!!) © 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • 7. Why Flash? • パフォーマンス • ツール サイレント 自動アップデート • リーチ ユーザ数: 4億人 (!!!) 400M Wii PS3 Xbox 360 95.56M 63.9M 67.2M © 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. sales numbers as of April-June 2012. Source: Wikipedia
  • 8. 採用状況 9 of 10 top Angry Birds Friends Ruby Blast Facebook games (Rovio) (Zynga) © 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • 9. About Flash • Flash is: • 柔軟で応用が利く • クロスプラットフォーム • モバイルに最適(Android、iOS 他) • Flash isn’t: • 「ドラッグ・ドロップでゲーム!」 • 完全ネイティブパフォーマンス © 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • 10. Why the GPU? Tablets, mobiles, retina displays. Pushing pixels through software isn’t an option. © 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • 11. Stage3D Vector 3D Video Display List © 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • 12. Stage3D Flash コンテンツ (ActionScript) シェーダー Stage3D (AGAL) パイプライン OpenGL or DirectX GPU © 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • 13. AGALとは m44 op, va0, vc0 dp4 op.x, va0, vc0 dp4 op.y, va0, vc1 dp4 op.z, va0, vc2 dp4 op.w, va0, vc3 m44 op, va0, vc0 mov v0, va1 (ヒトリデハキケンジャ!) © 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • 14. Starlingの場合 import starling.display.Sprite; var hero:Sprite = new Sprite(); hero.x = 200; hero.y = 200; addChild(hero); (コレヲ サズケヨウ! ) © 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • 15. Stage3D ライブラリー • オフィシャルライブラリー (free, open source): • Starling (2D) • Away3D • ニーズによって他にも様々… N2D2 Genome2D © 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • 16. Starling Flash Player Display List API (AS3) Sparrow フレームワーク (ObjC) Starling (AS3) © 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • 17. Starling + Stage3D Flash コンテンツ (ActionScript) Starling Stage3D (AGAL) OpenGL or DirectX GPU © 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • 18. Starlingが送ること • Starling gives you: • 生産性 • 親しみのある習得の早いAPI • 拡張性 • 活発的なコミュニティー • Starling doesn’t give you: • GPUは何ぞよ、と気にしなくて良いほど の安全性 • GPUには優しく! © 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • 19. コードを見せろってば! © 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • 20. Starling core API starling.events.EventDispatcher starling.display.* DisplayObject DisplayObjectContainer Quad Image Button Stage Sprite TextField MovieClip © 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • 21. Starling core API starling.events.EventDispatcher starling.display.* DisplayObject DisplayObjectContainer Quad Image Button Stage Sprite TextField MovieClip © 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • 22. • Just vertices with a color but no texture • Color interpolated on the GPU Quad • Simple primitive Example : q = new Quad(200, 200); q.setVertexColor(0, 0x000000); q.setVertexColor(1, 0xAA0000); q.setVertexColor(2, 0x00FF00); q.setVertexColor(3, 0x0000FF); addChild (q); Solid color : q.color = 0x00FF00; © 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • 23. • Image is textured quad (extends Quad) • Textures should be uploaded and pooled, Image rather than created when needed • State tracking (setTexture – expensive) • Compressed textures Example : // create a texture, then an image var myBitmap:Bitmap = new MyBitmapClass(); var texture:Texture = Texture.fromBitmap(myBitmap); var image:Image = new Image ( texture ); addChild ( image ); Tint : image.color = 0xFF0000; © 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • 24. • The lightest container available (just like with standard Flash display list) Sprite • Can be flattened, to display a complex tree quickly • However, all children’s textures need to be in the same texture (or atlas) to see really great performance Example : // freeze the children container.flatten(); // assign changes to a child container.child.scaleX = .5; // refresh container.flatten(); // or unflatten(); © 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • 25. Sprite, with a timeline MovieClip • • A different texture on each frame • Is not a container. • Does not support scripts on frames. • Completely controllable (custom fps, addFrame, etc). Example : // retrieve frames from a Flash MC var frames:Vector.<Texture> = sTextureAtlas.getTextures("running_"); // creates a MovieClip playing at 40fps mMovie = new MovieClip(frames, 40); © 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • 26. TextureAtlas • Packaged sets of sprite sheets • To optimize, make sure GPU calls each use one Atlas Example : // get all textures with a common prefix myTextureAtlas.getTextures(“fly_”); © 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • 27. ではコードを書いてみよう。 © 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • 28. 拡張の例 Particle Editor http://onebyonedesign.com/flash/particleeditor/ © 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • 29. Starlingの最適化 • Flatten containers if their contents won’t change: container.flatten(); • Prevent unnecessary touch event handling: container.touchable = false; • Use object pools: s = pool.getSprite(); pool.returnSprite(s); © 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • 30. 今後のトピック Adobe Texture Format (ATF) • A compressed texture format created specially for Stage3D • The player understand ATF natively, which brings performance benefits Tools and libraries are coming. © 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • 31. ご清聴ありがとうございました。 andhall@adobe.com @fenomas © 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • 32. © 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.