SlideShare a Scribd company logo
Making a game with Molehill:
      Zombie Tycoon
            Luc Beaulieu
          CTO – Frima Studio

         Jean-Philippe Auclair
      Lead R&D Software Architect
Session Overview

• State of Flash
• Molehill’s API presentation
• Digging deeper into Molehill
State of Flash

• Is Flash Dead?
   • FB: Top 10 = 250M MAU
   • Desktops: Flash 10 installed on 99%+
   • SmartPhones: Flash/Air 200+M, 100 devices
   • Streaming: 120 petabytes per month

• Advances in Flash for 3D games
   • AS3
   • 10.1, 10.2 …
   • Molehill
Molehill’s API Presentation

• Pros:
   – GPU Accelerated API
   – Relies on DirectX 9 and OpenGL ES 2.0
   – Native Software fallback

• Cons:
   – No point sprite support, branching, MRT, depth buffer
   – No CPU threading support
   – Native Software fallback
This Page Intentionally Left Green
Digging deeper into Molehill
• Assuming a basic knowledge of 3D development terminology

•   Display Layers
•   Model/Animation File Format
•   Character Animation: Matrix vs Quaternion
•   Texturing
•   Optimizing the Particle System
•   Fast Lights & Shadows
•   CPU Post-Processing effects
•   Profiling & Debugging tools

• Bonus!
   – 3D GameDev Lexicon
   – The math explaining all the numbers I’m going to talk about
   – Cheat sheets
Display Layers
Frima 3D File Format

•   Many 3D engines for flash try to support multiple input format
•   …Or support only generic format such as ColladaXML

•   Using a format optimized for 3D game made in Flash
     – Small File Size
     – Small Memory footprint
     – No processing required

             Model & Animation File Processing on low-end computer
    6000
                   5250
    5000
    4000
    3000
    2000                                                      Time to process (ms)
    1000
                                             15
       0

               Collada XML          Frima Binary Format
Frima 3D File Format
• Export pipeline


              3DS Max Scene

                                                       Build Tool


                                 Max Script Exporter
                                    Collada XML
Frima 3D File Format
• Export pipeline




    Build Tool



                                        Game     Serialize (AMF)   Game
                    Model / Animation
                                        Object     Compress         File
Frima 3D File Format
• In-Game usage


   Game           Uncompress    Game
                                         Add To Scene
    File          Unserialize   Object
Zombie Re-Animation
• Techniques
   – Matrix linear blending
   – DualQuaternion linear blending
• Molehill Constraint
   – Vertex Shader constants limits: 128 Float4

                           Zombie:
                           24 bones
Animation techniques
•   Matrix linear blending can cause loss of volume when joints are twisted or
    extremely bent
•   When using matrix, each bone take 3 constants
     – Maximum number of bones is 40
•   When using DualQuats, each bone take only 2 constants
     – Maximum number of bones is 60
                         Matrix (left) / Dual Quaternion (Right)
Transitions & interpolation
•     Animation transition require two sets of bones
       • Idle blending to walk
•     Same thing for frame interpolation (ex: Bullet time Animation)



    DualQuaternion             48

            matrix                       72

                     0              32              64                 96                128

             VertexShader constant required for animating a character (24 bones)


    DualQuaternion          Anim1 (48)               Anim2 (48)

            matrix                  Anim1 (72)                              Anim2 (72)     Too Much


                     0              32              64                 96                128

                         Constant for anim 1     Constant for anim 2
File size? Performance?
                               Animation file size (k)

DualQuaternion                                 60


        matrix                           50




DualQuaternion                    136

        matrix        54


                 0     32        64      96         128   160   192    224   256

            VertexShader assembler instructions for animation processing


                           Vertex Shader processing time

DualQuaternion                                 130%


        matrix                          100%
Texturing in Molehill
Texturing in Molehill
• The first version of the engine was only using PNGs
• Adobe Texture Format (ATF)
   – Texture are kept compressed in Video Memory
   – Native support for multi-device publishing
   – One file containing 3 encoding: DXT1, ETC1 and PVRTC
   – 1.3x bigger than original PNG
   – Contain the MipMapping of the texture
   – Does not support transparency
Texturing in Molehill
• Transparency
   – Use PNGs with indexed color
   – Sample a “alpha mask texture” in the pixel shader


                ATF                           PNG
          Avatar = opaque              Fence = Transparent
Texturing in Molehill
• Many effects can use ATF when using the good blend modes
• No need for transparency
    Splatter = Multiply                      Fire = Additive
Particle System
•   Using a divided workload (CPU/GPU) for better performance
     – Each particle property update is computed on the CPU at each frame
          • Alpha, Color, Direction, Rotation, frame(If SpriteSheet), etc.
     – On the GPU
          • Applying theses properties
          • Expending billboard vertex to face the screen
Particle System : Optimization
•   How many particle?
     – Due to the VertexBuffer and IndexBuffer limits,
     – In ZombieTycoon we were limited to around 16383 particles per draw call
•   Using Fast ByteArray (also known as Alchemy memory or DomainMemory)
     – Using Azoth, properties updates were 10 times faster
•   Batching draw calls using the same texture
•   Using a 100% GPU particle system
     – It’s expensive on the GPU
     – Support only linear transformation
     – Zero CPU required
Particle System
Lights & shadows
• Techniques
   – ShadowMap & LightMap
   – Dynamic lighting
   – Fake Volumetric lights
   – Fake projected shadows
Lights & shadows
•   ShadowMap & LightMap
     – We used two textures, a “multiplied” ShadowMap and an “additive” LightMap

                                                                       Diffuse
                                                               *     ShadowMap
                                                               +      Lightmap
                                                               =     Composite
Lights & shadows
•   Dynamic lighting
     – Lighting required expensive pixel shader, currently limited to 256 instructions
     – Zombie Tycoon support up to 7-9 lights (spot or points) per object.
Lights & shadows

•   Pixel Shader assembly code
     – Per light, without Normal/Specular mapping.
Lights & shadows
•   Fake Volumetric Lights
     – Using a few billboard particles, it’s easy to fake a nice and lightweight volumetric lighting
     – All object are sampling Shadow and light maps, and since the light particles are “additive”, if
         an object is behind the lights, it will look brighter
Lights & shadows
Lights & shadows
•   Fake projected shadows
     – We created a particle of a gradient black spot aligned to the ground
     – Orientation and scale of the particle depends on light position and intensity
CPU Post-Processing
•   Possibility of reading the BackBuffer
     – Strongly recommended not to use Readback
     – Fast pipeline for data from the System memory to Video memory
     – VERY slow pipeline from video to system memory

•   Effects: Bloom, Blur, Depth of Field, etc.
                                                 Motion Blur
CPU Post-Processing



Normal              Bloom post-processing
Profiling and Debugging tools (CPU)
•   FlashDevelop (O.S.S.)
     – Most of the production is using FlashDevelop
     – Now with a profiler and a debugger, it’s very easy to work with it
Profiling and Debugging tools (CPU)
•   Adobe Flash Builder Profiler
     – Profile Function calls
     – Profile Memory allocation
Profiling and Debugging tools (CPU)
•   FlashPreloadProfiler (O.S.S.)
     – Profile Function calls
     – Profile Memory allocation
     – Profile Loaders status
     – Can be used in Debug/Release & browser/Projector
Profiling and Debugging tools (GPU)
•   Pix for windows
     – List of API calls
     – Shaders assembly code
     – Pixel debugger
     – Texture viewer
Profiling and Debugging tools (GPU)
•   Intel® Graphics Performance Analyzers (GPA)
      – Render in wireframe
      – Profile Vertex and Pixel shader performance
      – Visualize overdraw and draw call sequence
      – Save a frame, and make real-time experiment
      – Identification of bottlenecks
Sources & References
•   Geometric Skinning with Approximate Dual Quaternion Blending         •   TD-Matt blog
      – http://isg.cs.tcd.ie/kavanl/papers/sdq-tog08.pdf                      •      http://td-matt.blogspot.com/
•   Intel® Graphics Performance Analyzers (GPA)                          •   FlashPreloadProfiler
      – http://software.intel.com/en-us/articles/intel-gpa/                   •      http://jpauclair.net/flashpreloadprofiler/
•   Pix for windows                                                      •   Azoth
      – http://msdn.microsoft.com/en-us/library/ee417072(v=VS.85).aspx        •      http://www.buraks.com/azoth/
                                                                         •   Flash in Facebook
                                                                              •      AppData.com
                                                                         •   Flash Stats

                              Contact                                         •
                                                                              •
                                                                                     http://adobe.ly/rwXU
                                                                                     http://adobe.ly/gnlUEH
                                Luc Beaulieu
                                    luc@frimastudio.com

                                Jean-Philippe Auclair
                                    jpauclair@frimastudio.com
                                 @jpauclair
                                 jpauclair.net
What it means?
•   VertexBuffer
•   IndexBuffer
•   Vertex Constants
•   MipMapping
•   Quaternion
•   Billboard
Bonus Slide: The maths!
•   Character animation:
     –   Matrix linear blending:
           • 128 Float4 VertexConstant – WorldMatrix – ViewProj matrix = 120Float4
           • 120Float4 / / 3Float4 per bone = 40 bones in the constants
           • Bullet time and transitions require two sets of bones: 40/2 = 20 bones per character max
     –   DualQuaternion linear blending:
           • 128 Float4 VertexConstant – WorldMatrix – ViewProj matrix = 120Float4
           • 120Float4 / / 2Float4 per bone = 60 bones in the constants
           • Bullet time and transitions require two sets of bones: 60/2 = 30 bones per character max
•   Max Particle Count
     –   The VertexBuffer is limited to 65536 vertex, the IndexBuffer is limited to 983040 index of type SHORT
     –   In theory, you could have up to 327680 triangle in one draw call
     –   In practice, with no vertex re-use between particles and using quads (4 vertex): 65536/6 = 16383 particle max per
         draw call
•   Lighting
     –   With the PixelShader limit of 256 instructions, we were able to fit around 7 to 9 dynamic lights per object (point or
         spot light)
Achievement: Geek

• Cheat Sheet
Achievement: Super Geek!
Thank You!
                Questions?


Contact
 Luc Beaulieu
     luc@frimastudio.com

 Jean-Philippe Auclair
     jpauclair@frimastudio.com
    @jpauclair
    jpauclair.net

More Related Content

What's hot

[UniteKorea2013] The Unity Rendering Pipeline
[UniteKorea2013] The Unity Rendering Pipeline[UniteKorea2013] The Unity Rendering Pipeline
[UniteKorea2013] The Unity Rendering Pipeline
William Hugo Yang
 
Mantle for Developers
Mantle for DevelopersMantle for Developers
Mantle for Developers
Electronic Arts / DICE
 
Game Engine Architecture
Game Engine ArchitectureGame Engine Architecture
Game Engine Architecture
Attila Jenei
 
Advanced Timeline and Cinemachine
Advanced Timeline and CinemachineAdvanced Timeline and Cinemachine
Advanced Timeline and Cinemachine
Unity Technologies
 
Authoring of procedural rocks in The Blacksmith realtime short
Authoring of procedural rocks in The Blacksmith realtime shortAuthoring of procedural rocks in The Blacksmith realtime short
Authoring of procedural rocks in The Blacksmith realtime short
Vesselin Efremov
 
Developing Next-Generation Games with Stage3D (Molehill)
Developing Next-Generation Games with Stage3D (Molehill) Developing Next-Generation Games with Stage3D (Molehill)
Developing Next-Generation Games with Stage3D (Molehill)
Jean-Philippe Doiron
 
Optimizing Unity games for mobile devices
Optimizing Unity games for mobile devicesOptimizing Unity games for mobile devices
Optimizing Unity games for mobile devices
Bruno Cicanci
 
A Certain Slant of Light - Past, Present and Future Challenges of Global Illu...
A Certain Slant of Light - Past, Present and Future Challenges of Global Illu...A Certain Slant of Light - Past, Present and Future Challenges of Global Illu...
A Certain Slant of Light - Past, Present and Future Challenges of Global Illu...
Electronic Arts / DICE
 
Modern Graphics Pipeline Overview
Modern Graphics Pipeline OverviewModern Graphics Pipeline Overview
Modern Graphics Pipeline Overview
slantsixgames
 
4,000 Adams at 90 Frames Per Second | Yi Fei Boon
4,000 Adams at 90 Frames Per Second | Yi Fei Boon4,000 Adams at 90 Frames Per Second | Yi Fei Boon
4,000 Adams at 90 Frames Per Second | Yi Fei Boon
Jessica Tams
 
The Next Generation of PhyreEngine
The Next Generation of PhyreEngineThe Next Generation of PhyreEngine
The Next Generation of PhyreEngine
Slide_N
 
Relic's FX System
Relic's FX SystemRelic's FX System
Relic's FX System
Daniel Barrero
 
【Unite 2017 Tokyo】スクリプタブル・レンダーパイプラインのカスタマイズと拡張
【Unite 2017 Tokyo】スクリプタブル・レンダーパイプラインのカスタマイズと拡張【Unite 2017 Tokyo】スクリプタブル・レンダーパイプラインのカスタマイズと拡張
【Unite 2017 Tokyo】スクリプタブル・レンダーパイプラインのカスタマイズと拡張
Unite2017Tokyo
 
Book of the Dead: Environmental Design, Tools, and Techniques for Photo-Real ...
Book of the Dead: Environmental Design, Tools, and Techniques for Photo-Real ...Book of the Dead: Environmental Design, Tools, and Techniques for Photo-Real ...
Book of the Dead: Environmental Design, Tools, and Techniques for Photo-Real ...
Unity Technologies
 
【Unite 2018 Tokyo】スクリプタブルレンダーパイプライン入門
【Unite 2018 Tokyo】スクリプタブルレンダーパイプライン入門【Unite 2018 Tokyo】スクリプタブルレンダーパイプライン入門
【Unite 2018 Tokyo】スクリプタブルレンダーパイプライン入門
Unity Technologies Japan K.K.
 
[Harvard CS264] 08a - Cloud Computing, Amazon EC2, MIT StarCluster (Justin Ri...
[Harvard CS264] 08a - Cloud Computing, Amazon EC2, MIT StarCluster (Justin Ri...[Harvard CS264] 08a - Cloud Computing, Amazon EC2, MIT StarCluster (Justin Ri...
[Harvard CS264] 08a - Cloud Computing, Amazon EC2, MIT StarCluster (Justin Ri...
npinto
 
Using Imagery in ArcGIS
Using Imagery in ArcGISUsing Imagery in ArcGIS
Using Imagery in ArcGIS
Esri
 
Smedberg niklas bringing_aaa_graphics
Smedberg niklas bringing_aaa_graphicsSmedberg niklas bringing_aaa_graphics
Smedberg niklas bringing_aaa_graphics
changehee lee
 

What's hot (18)

[UniteKorea2013] The Unity Rendering Pipeline
[UniteKorea2013] The Unity Rendering Pipeline[UniteKorea2013] The Unity Rendering Pipeline
[UniteKorea2013] The Unity Rendering Pipeline
 
Mantle for Developers
Mantle for DevelopersMantle for Developers
Mantle for Developers
 
Game Engine Architecture
Game Engine ArchitectureGame Engine Architecture
Game Engine Architecture
 
Advanced Timeline and Cinemachine
Advanced Timeline and CinemachineAdvanced Timeline and Cinemachine
Advanced Timeline and Cinemachine
 
Authoring of procedural rocks in The Blacksmith realtime short
Authoring of procedural rocks in The Blacksmith realtime shortAuthoring of procedural rocks in The Blacksmith realtime short
Authoring of procedural rocks in The Blacksmith realtime short
 
Developing Next-Generation Games with Stage3D (Molehill)
Developing Next-Generation Games with Stage3D (Molehill) Developing Next-Generation Games with Stage3D (Molehill)
Developing Next-Generation Games with Stage3D (Molehill)
 
Optimizing Unity games for mobile devices
Optimizing Unity games for mobile devicesOptimizing Unity games for mobile devices
Optimizing Unity games for mobile devices
 
A Certain Slant of Light - Past, Present and Future Challenges of Global Illu...
A Certain Slant of Light - Past, Present and Future Challenges of Global Illu...A Certain Slant of Light - Past, Present and Future Challenges of Global Illu...
A Certain Slant of Light - Past, Present and Future Challenges of Global Illu...
 
Modern Graphics Pipeline Overview
Modern Graphics Pipeline OverviewModern Graphics Pipeline Overview
Modern Graphics Pipeline Overview
 
4,000 Adams at 90 Frames Per Second | Yi Fei Boon
4,000 Adams at 90 Frames Per Second | Yi Fei Boon4,000 Adams at 90 Frames Per Second | Yi Fei Boon
4,000 Adams at 90 Frames Per Second | Yi Fei Boon
 
The Next Generation of PhyreEngine
The Next Generation of PhyreEngineThe Next Generation of PhyreEngine
The Next Generation of PhyreEngine
 
Relic's FX System
Relic's FX SystemRelic's FX System
Relic's FX System
 
【Unite 2017 Tokyo】スクリプタブル・レンダーパイプラインのカスタマイズと拡張
【Unite 2017 Tokyo】スクリプタブル・レンダーパイプラインのカスタマイズと拡張【Unite 2017 Tokyo】スクリプタブル・レンダーパイプラインのカスタマイズと拡張
【Unite 2017 Tokyo】スクリプタブル・レンダーパイプラインのカスタマイズと拡張
 
Book of the Dead: Environmental Design, Tools, and Techniques for Photo-Real ...
Book of the Dead: Environmental Design, Tools, and Techniques for Photo-Real ...Book of the Dead: Environmental Design, Tools, and Techniques for Photo-Real ...
Book of the Dead: Environmental Design, Tools, and Techniques for Photo-Real ...
 
【Unite 2018 Tokyo】スクリプタブルレンダーパイプライン入門
【Unite 2018 Tokyo】スクリプタブルレンダーパイプライン入門【Unite 2018 Tokyo】スクリプタブルレンダーパイプライン入門
【Unite 2018 Tokyo】スクリプタブルレンダーパイプライン入門
 
[Harvard CS264] 08a - Cloud Computing, Amazon EC2, MIT StarCluster (Justin Ri...
[Harvard CS264] 08a - Cloud Computing, Amazon EC2, MIT StarCluster (Justin Ri...[Harvard CS264] 08a - Cloud Computing, Amazon EC2, MIT StarCluster (Justin Ri...
[Harvard CS264] 08a - Cloud Computing, Amazon EC2, MIT StarCluster (Justin Ri...
 
Using Imagery in ArcGIS
Using Imagery in ArcGISUsing Imagery in ArcGIS
Using Imagery in ArcGIS
 
Smedberg niklas bringing_aaa_graphics
Smedberg niklas bringing_aaa_graphicsSmedberg niklas bringing_aaa_graphics
Smedberg niklas bringing_aaa_graphics
 

Viewers also liked

Minko - Targeting Flash/Stage3D with C++ and GLSL
Minko - Targeting Flash/Stage3D with C++ and GLSLMinko - Targeting Flash/Stage3D with C++ and GLSL
Minko - Targeting Flash/Stage3D with C++ and GLSL
Minko3D
 
From Web to Mobile with Stage 3D
From Web to Mobile with Stage 3DFrom Web to Mobile with Stage 3D
From Web to Mobile with Stage 3D
Jean-Philippe Doiron
 
Unite2015 frima lab
Unite2015 frima labUnite2015 frima lab
Unite2015 frima lab
Jean-Philippe Doiron
 
Mastering Multiplayer Stage3d and AIR game development for mobile devices
Mastering Multiplayer Stage3d and AIR game development for mobile devicesMastering Multiplayer Stage3d and AIR game development for mobile devices
Mastering Multiplayer Stage3d and AIR game development for mobile devices
Jean-Philippe Doiron
 
Porting games from ps3 or web to shield and ouya [final]
Porting games from ps3 or web to shield and ouya [final]Porting games from ps3 or web to shield and ouya [final]
Porting games from ps3 or web to shield and ouya [final]
Jean-Philippe Doiron
 
FGS 2011: Making A Game With Molehill: Zombie Tycoon
FGS 2011: Making A Game With Molehill: Zombie TycoonFGS 2011: Making A Game With Molehill: Zombie Tycoon
FGS 2011: Making A Game With Molehill: Zombie Tycoon
mochimedia
 

Viewers also liked (6)

Minko - Targeting Flash/Stage3D with C++ and GLSL
Minko - Targeting Flash/Stage3D with C++ and GLSLMinko - Targeting Flash/Stage3D with C++ and GLSL
Minko - Targeting Flash/Stage3D with C++ and GLSL
 
From Web to Mobile with Stage 3D
From Web to Mobile with Stage 3DFrom Web to Mobile with Stage 3D
From Web to Mobile with Stage 3D
 
Unite2015 frima lab
Unite2015 frima labUnite2015 frima lab
Unite2015 frima lab
 
Mastering Multiplayer Stage3d and AIR game development for mobile devices
Mastering Multiplayer Stage3d and AIR game development for mobile devicesMastering Multiplayer Stage3d and AIR game development for mobile devices
Mastering Multiplayer Stage3d and AIR game development for mobile devices
 
Porting games from ps3 or web to shield and ouya [final]
Porting games from ps3 or web to shield and ouya [final]Porting games from ps3 or web to shield and ouya [final]
Porting games from ps3 or web to shield and ouya [final]
 
FGS 2011: Making A Game With Molehill: Zombie Tycoon
FGS 2011: Making A Game With Molehill: Zombie TycoonFGS 2011: Making A Game With Molehill: Zombie Tycoon
FGS 2011: Making A Game With Molehill: Zombie Tycoon
 

Similar to Making a game with Molehill: Zombie Tycoon

Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
Daosheng Mu
 
Benoit fouletier guillaume martin unity day- modern 2 d techniques-gce2014
Benoit fouletier guillaume martin   unity day- modern 2 d techniques-gce2014Benoit fouletier guillaume martin   unity day- modern 2 d techniques-gce2014
Benoit fouletier guillaume martin unity day- modern 2 d techniques-gce2014
Mary Chan
 
Unity - Internals: memory and performance
Unity - Internals: memory and performanceUnity - Internals: memory and performance
Unity - Internals: memory and performance
Codemotion
 
Developing and optimizing a procedural game: The Elder Scrolls Blades- Unite ...
Developing and optimizing a procedural game: The Elder Scrolls Blades- Unite ...Developing and optimizing a procedural game: The Elder Scrolls Blades- Unite ...
Developing and optimizing a procedural game: The Elder Scrolls Blades- Unite ...
Unity Technologies
 
Adding more visuals without affecting performance
Adding more visuals without affecting performanceAdding more visuals without affecting performance
Adding more visuals without affecting performance
St1X
 
【Unite Tokyo 2018】実践的なパフォーマンス分析と最適化
【Unite Tokyo 2018】実践的なパフォーマンス分析と最適化【Unite Tokyo 2018】実践的なパフォーマンス分析と最適化
【Unite Tokyo 2018】実践的なパフォーマンス分析と最適化
Unity Technologies Japan K.K.
 
Sivp presentation
Sivp presentationSivp presentation
Sivp presentation
Frans Caisar Ramadhan
 
Animation Programming Techniques
Animation Programming TechniquesAnimation Programming Techniques
Animation Programming Techniques
Amir H. Fassihi
 
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
Unite2017Tokyo
 
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
Unity Technologies Japan K.K.
 
Gpu with cuda architecture
Gpu with cuda architectureGpu with cuda architecture
Gpu with cuda architecture
Dhaval Kaneria
 
De Re PlayStation Vita
De Re PlayStation VitaDe Re PlayStation Vita
De Re PlayStation Vita
Slide_N
 
[Unite Seoul 2020] Mobile Graphics Best Practices for Artists
[Unite Seoul 2020] Mobile Graphics Best Practices for Artists[Unite Seoul 2020] Mobile Graphics Best Practices for Artists
[Unite Seoul 2020] Mobile Graphics Best Practices for Artists
Owen Wu
 
Cocos2d programming
Cocos2d programmingCocos2d programming
Cocos2d programming
Changwon National University
 
Unite Berlin 2018 - Book of the Dead Optimizing Performance for High End Cons...
Unite Berlin 2018 - Book of the Dead Optimizing Performance for High End Cons...Unite Berlin 2018 - Book of the Dead Optimizing Performance for High End Cons...
Unite Berlin 2018 - Book of the Dead Optimizing Performance for High End Cons...
Unity Technologies
 
Battle of the Codecs
Battle of the CodecsBattle of the Codecs
Battle of the Codecs
James Uren
 
Optimisation and Compression Intro
Optimisation and Compression IntroOptimisation and Compression Intro
Optimisation and Compression Intro
James Uren
 
3526192.ppt
3526192.ppt3526192.ppt
3526192.ppt
ssuseraf60311
 
Axceleon Presentation at Siggraph 2009
Axceleon Presentation at Siggraph 2009Axceleon Presentation at Siggraph 2009
Axceleon Presentation at Siggraph 2009
Axceleon Inc
 
Ximea - the pc camera, 90 gflps smart camera
Ximea  - the pc camera, 90 gflps smart cameraXimea  - the pc camera, 90 gflps smart camera
Ximea - the pc camera, 90 gflps smart camera
XIMEA
 

Similar to Making a game with Molehill: Zombie Tycoon (20)

Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
 
Benoit fouletier guillaume martin unity day- modern 2 d techniques-gce2014
Benoit fouletier guillaume martin   unity day- modern 2 d techniques-gce2014Benoit fouletier guillaume martin   unity day- modern 2 d techniques-gce2014
Benoit fouletier guillaume martin unity day- modern 2 d techniques-gce2014
 
Unity - Internals: memory and performance
Unity - Internals: memory and performanceUnity - Internals: memory and performance
Unity - Internals: memory and performance
 
Developing and optimizing a procedural game: The Elder Scrolls Blades- Unite ...
Developing and optimizing a procedural game: The Elder Scrolls Blades- Unite ...Developing and optimizing a procedural game: The Elder Scrolls Blades- Unite ...
Developing and optimizing a procedural game: The Elder Scrolls Blades- Unite ...
 
Adding more visuals without affecting performance
Adding more visuals without affecting performanceAdding more visuals without affecting performance
Adding more visuals without affecting performance
 
【Unite Tokyo 2018】実践的なパフォーマンス分析と最適化
【Unite Tokyo 2018】実践的なパフォーマンス分析と最適化【Unite Tokyo 2018】実践的なパフォーマンス分析と最適化
【Unite Tokyo 2018】実践的なパフォーマンス分析と最適化
 
Sivp presentation
Sivp presentationSivp presentation
Sivp presentation
 
Animation Programming Techniques
Animation Programming TechniquesAnimation Programming Techniques
Animation Programming Techniques
 
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
 
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
 
Gpu with cuda architecture
Gpu with cuda architectureGpu with cuda architecture
Gpu with cuda architecture
 
De Re PlayStation Vita
De Re PlayStation VitaDe Re PlayStation Vita
De Re PlayStation Vita
 
[Unite Seoul 2020] Mobile Graphics Best Practices for Artists
[Unite Seoul 2020] Mobile Graphics Best Practices for Artists[Unite Seoul 2020] Mobile Graphics Best Practices for Artists
[Unite Seoul 2020] Mobile Graphics Best Practices for Artists
 
Cocos2d programming
Cocos2d programmingCocos2d programming
Cocos2d programming
 
Unite Berlin 2018 - Book of the Dead Optimizing Performance for High End Cons...
Unite Berlin 2018 - Book of the Dead Optimizing Performance for High End Cons...Unite Berlin 2018 - Book of the Dead Optimizing Performance for High End Cons...
Unite Berlin 2018 - Book of the Dead Optimizing Performance for High End Cons...
 
Battle of the Codecs
Battle of the CodecsBattle of the Codecs
Battle of the Codecs
 
Optimisation and Compression Intro
Optimisation and Compression IntroOptimisation and Compression Intro
Optimisation and Compression Intro
 
3526192.ppt
3526192.ppt3526192.ppt
3526192.ppt
 
Axceleon Presentation at Siggraph 2009
Axceleon Presentation at Siggraph 2009Axceleon Presentation at Siggraph 2009
Axceleon Presentation at Siggraph 2009
 
Ximea - the pc camera, 90 gflps smart camera
Ximea  - the pc camera, 90 gflps smart cameraXimea  - the pc camera, 90 gflps smart camera
Ximea - the pc camera, 90 gflps smart camera
 

Recently uploaded

Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 

Recently uploaded (20)

Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 

Making a game with Molehill: Zombie Tycoon

  • 1.
  • 2. Making a game with Molehill: Zombie Tycoon Luc Beaulieu CTO – Frima Studio Jean-Philippe Auclair Lead R&D Software Architect
  • 3. Session Overview • State of Flash • Molehill’s API presentation • Digging deeper into Molehill
  • 4. State of Flash • Is Flash Dead? • FB: Top 10 = 250M MAU • Desktops: Flash 10 installed on 99%+ • SmartPhones: Flash/Air 200+M, 100 devices • Streaming: 120 petabytes per month • Advances in Flash for 3D games • AS3 • 10.1, 10.2 … • Molehill
  • 5. Molehill’s API Presentation • Pros: – GPU Accelerated API – Relies on DirectX 9 and OpenGL ES 2.0 – Native Software fallback • Cons: – No point sprite support, branching, MRT, depth buffer – No CPU threading support – Native Software fallback
  • 6.
  • 8. Digging deeper into Molehill • Assuming a basic knowledge of 3D development terminology • Display Layers • Model/Animation File Format • Character Animation: Matrix vs Quaternion • Texturing • Optimizing the Particle System • Fast Lights & Shadows • CPU Post-Processing effects • Profiling & Debugging tools • Bonus! – 3D GameDev Lexicon – The math explaining all the numbers I’m going to talk about – Cheat sheets
  • 10. Frima 3D File Format • Many 3D engines for flash try to support multiple input format • …Or support only generic format such as ColladaXML • Using a format optimized for 3D game made in Flash – Small File Size – Small Memory footprint – No processing required Model & Animation File Processing on low-end computer 6000 5250 5000 4000 3000 2000 Time to process (ms) 1000 15 0 Collada XML Frima Binary Format
  • 11. Frima 3D File Format • Export pipeline 3DS Max Scene Build Tool Max Script Exporter Collada XML
  • 12. Frima 3D File Format • Export pipeline Build Tool Game Serialize (AMF) Game Model / Animation Object Compress File
  • 13. Frima 3D File Format • In-Game usage Game Uncompress Game Add To Scene File Unserialize Object
  • 14. Zombie Re-Animation • Techniques – Matrix linear blending – DualQuaternion linear blending • Molehill Constraint – Vertex Shader constants limits: 128 Float4 Zombie: 24 bones
  • 15. Animation techniques • Matrix linear blending can cause loss of volume when joints are twisted or extremely bent • When using matrix, each bone take 3 constants – Maximum number of bones is 40 • When using DualQuats, each bone take only 2 constants – Maximum number of bones is 60 Matrix (left) / Dual Quaternion (Right)
  • 16.
  • 17. Transitions & interpolation • Animation transition require two sets of bones • Idle blending to walk • Same thing for frame interpolation (ex: Bullet time Animation) DualQuaternion 48 matrix 72 0 32 64 96 128 VertexShader constant required for animating a character (24 bones) DualQuaternion Anim1 (48) Anim2 (48) matrix Anim1 (72) Anim2 (72) Too Much 0 32 64 96 128 Constant for anim 1 Constant for anim 2
  • 18. File size? Performance? Animation file size (k) DualQuaternion 60 matrix 50 DualQuaternion 136 matrix 54 0 32 64 96 128 160 192 224 256 VertexShader assembler instructions for animation processing Vertex Shader processing time DualQuaternion 130% matrix 100%
  • 20. Texturing in Molehill • The first version of the engine was only using PNGs • Adobe Texture Format (ATF) – Texture are kept compressed in Video Memory – Native support for multi-device publishing – One file containing 3 encoding: DXT1, ETC1 and PVRTC – 1.3x bigger than original PNG – Contain the MipMapping of the texture – Does not support transparency
  • 21. Texturing in Molehill • Transparency – Use PNGs with indexed color – Sample a “alpha mask texture” in the pixel shader ATF PNG Avatar = opaque Fence = Transparent
  • 22. Texturing in Molehill • Many effects can use ATF when using the good blend modes • No need for transparency Splatter = Multiply Fire = Additive
  • 23.
  • 24. Particle System • Using a divided workload (CPU/GPU) for better performance – Each particle property update is computed on the CPU at each frame • Alpha, Color, Direction, Rotation, frame(If SpriteSheet), etc. – On the GPU • Applying theses properties • Expending billboard vertex to face the screen
  • 25. Particle System : Optimization • How many particle? – Due to the VertexBuffer and IndexBuffer limits, – In ZombieTycoon we were limited to around 16383 particles per draw call • Using Fast ByteArray (also known as Alchemy memory or DomainMemory) – Using Azoth, properties updates were 10 times faster • Batching draw calls using the same texture • Using a 100% GPU particle system – It’s expensive on the GPU – Support only linear transformation – Zero CPU required
  • 27.
  • 28. Lights & shadows • Techniques – ShadowMap & LightMap – Dynamic lighting – Fake Volumetric lights – Fake projected shadows
  • 29. Lights & shadows • ShadowMap & LightMap – We used two textures, a “multiplied” ShadowMap and an “additive” LightMap Diffuse * ShadowMap + Lightmap = Composite
  • 30. Lights & shadows • Dynamic lighting – Lighting required expensive pixel shader, currently limited to 256 instructions – Zombie Tycoon support up to 7-9 lights (spot or points) per object.
  • 31.
  • 32. Lights & shadows • Pixel Shader assembly code – Per light, without Normal/Specular mapping.
  • 33. Lights & shadows • Fake Volumetric Lights – Using a few billboard particles, it’s easy to fake a nice and lightweight volumetric lighting – All object are sampling Shadow and light maps, and since the light particles are “additive”, if an object is behind the lights, it will look brighter
  • 35.
  • 36. Lights & shadows • Fake projected shadows – We created a particle of a gradient black spot aligned to the ground – Orientation and scale of the particle depends on light position and intensity
  • 37.
  • 38. CPU Post-Processing • Possibility of reading the BackBuffer – Strongly recommended not to use Readback – Fast pipeline for data from the System memory to Video memory – VERY slow pipeline from video to system memory • Effects: Bloom, Blur, Depth of Field, etc. Motion Blur
  • 39. CPU Post-Processing Normal Bloom post-processing
  • 40. Profiling and Debugging tools (CPU) • FlashDevelop (O.S.S.) – Most of the production is using FlashDevelop – Now with a profiler and a debugger, it’s very easy to work with it
  • 41. Profiling and Debugging tools (CPU) • Adobe Flash Builder Profiler – Profile Function calls – Profile Memory allocation
  • 42. Profiling and Debugging tools (CPU) • FlashPreloadProfiler (O.S.S.) – Profile Function calls – Profile Memory allocation – Profile Loaders status – Can be used in Debug/Release & browser/Projector
  • 43. Profiling and Debugging tools (GPU) • Pix for windows – List of API calls – Shaders assembly code – Pixel debugger – Texture viewer
  • 44. Profiling and Debugging tools (GPU) • Intel® Graphics Performance Analyzers (GPA) – Render in wireframe – Profile Vertex and Pixel shader performance – Visualize overdraw and draw call sequence – Save a frame, and make real-time experiment – Identification of bottlenecks
  • 45. Sources & References • Geometric Skinning with Approximate Dual Quaternion Blending • TD-Matt blog – http://isg.cs.tcd.ie/kavanl/papers/sdq-tog08.pdf • http://td-matt.blogspot.com/ • Intel® Graphics Performance Analyzers (GPA) • FlashPreloadProfiler – http://software.intel.com/en-us/articles/intel-gpa/ • http://jpauclair.net/flashpreloadprofiler/ • Pix for windows • Azoth – http://msdn.microsoft.com/en-us/library/ee417072(v=VS.85).aspx • http://www.buraks.com/azoth/ • Flash in Facebook • AppData.com • Flash Stats Contact • • http://adobe.ly/rwXU http://adobe.ly/gnlUEH Luc Beaulieu luc@frimastudio.com Jean-Philippe Auclair jpauclair@frimastudio.com  @jpauclair  jpauclair.net
  • 46. What it means? • VertexBuffer • IndexBuffer • Vertex Constants • MipMapping • Quaternion • Billboard
  • 47. Bonus Slide: The maths! • Character animation: – Matrix linear blending: • 128 Float4 VertexConstant – WorldMatrix – ViewProj matrix = 120Float4 • 120Float4 / / 3Float4 per bone = 40 bones in the constants • Bullet time and transitions require two sets of bones: 40/2 = 20 bones per character max – DualQuaternion linear blending: • 128 Float4 VertexConstant – WorldMatrix – ViewProj matrix = 120Float4 • 120Float4 / / 2Float4 per bone = 60 bones in the constants • Bullet time and transitions require two sets of bones: 60/2 = 30 bones per character max • Max Particle Count – The VertexBuffer is limited to 65536 vertex, the IndexBuffer is limited to 983040 index of type SHORT – In theory, you could have up to 327680 triangle in one draw call – In practice, with no vertex re-use between particles and using quads (4 vertex): 65536/6 = 16383 particle max per draw call • Lighting – With the PixelShader limit of 256 instructions, we were able to fit around 7 to 9 dynamic lights per object (point or spot light)
  • 50. Thank You! Questions? Contact Luc Beaulieu luc@frimastudio.com Jean-Philippe Auclair jpauclair@frimastudio.com  @jpauclair  jpauclair.net

Editor's Notes

  1. GameplayVideo
  2. Here is a quick overview of what we will go through in this session. I will start by looking at the current state of Flash and I will present the Molehill API that Adobe is offering us. JP will then take over and dig deeper in the technical aspects of it all.
  3. Is Flash Dead? Look this up in Google and you’ll find many interesting discussions. I have no intention on going into the politics of it, so here are some facts.According to AppData, the top two FB apps attracts close to 150M MAU. Both are Flash games. From known metrics, this amounts to a conservative 30M $ per month, all going to the same company, but still WebGL = Final draft was done a month ago.The Flash player provided advances that « helped » 3D based applications. AS3 was a big one, providing a much faster Virtual Machine, but it’s still non-native software rendering. Molehill provides the jump ahead to real 3D on the browser.35 devices by 2010 – Close to 100 deviceswillshipwithit in 2011Flash Stats based on : http://www.adobe.com/products/player_census/flashplayer/version_penetration.html (December 2010)http://tv.adobe.com/watch/industry-trends/strong-mobile-adoption-of-flash-platform-in-2011/
  4. Molehill opens a low-level API to access the GPU. Adobe decided to limit this API to a lowest supported denominator. This decision has been made to keep a consistent experience across all supported platforms.Those are some Pros and Cons, you can probably draw your own list after playing with it No CPU threading API yet on the Flash player. Adobe has been using it more internally and I’m sure they are working on something for us to use soon One thing to note, is the software fallback. Be careful when designing Molehill games, decide if you can afford the software renderer as soon as possible. If you don’t support it, always validate that hardware is used and show a prompt otherwise.I will now let JP discuss the technical aspects of all of this 
  5. Starting with the base, the file formatAnd the I Will cover some of the system that we have in ZombieTycoon
  6. Starting with the base, the file formatAnd the I Will cover some of the system that we have in ZombieTycoon
  7. If you have 1000 quad particles, itmeansyou have to update around 6000 vertex to update, and witharound 10 values soAt the end it’s 60 000 update on yourbytearray.VB: of 64 DWORD
  8. If you have 1000 quad particles, itmeansyou have to update around 6000 vertex to update, and witharound 10 values soAt the end it’s 60 000 update on yourbytearray.VB: of 64 DWORD
  9. If you have 1000 quad particles, itmeansyou have to update around 6000 vertex to update, and witharound 10 values soAt the end it’s 60 000 update on yourbytearray.VB: of 64 DWORD
  10. If you have 1000 quad particles, itmeansyou have to update around 6000 vertex to update, and witharound 10 values soAt the end it’s 60 000 update on yourbytearray.VB: of 64 DWORD
  11. If you have 1000 quad particles, itmeansyou have to update around 6000 vertex to update, and witharound 10 values soAt the end it’s 60 000 update on yourbytearray.VB: of 64 DWORD