SlideShare a Scribd company logo
Luc Beaulieu
CTO, Frima Studio

Jean-Philippe Doiron
Principal Software Architect
R&D, Frima Studio
•   What is Adobe Stage3D?
    •   It is an API in Flash 11 that enables hardware
        acceleration (GPU).

•   What is Adobe AIR?
    •   Enables developers to package the same Flash
        code into native apps for multiplatform, including
        over 500 million smart devices.
•   Why Stage 3D is a valid option for mobile
    games (and multiplatform).


•   How to make your Web games also work on
    mobile devices.

•   What you can do to optimize performance
    along the way.
From Web to Mobile with Stage 3D
From Web to Mobile with Stage 3D
MPSCMPHSDD
Multiplatform, Synchronous Cooperative Multiplayer Hack-n-Slash with Support for
Drop-in Drop-out
From Web to Mobile with Stage 3D
•   Fun
•   Multiplayer
     •   Drop-in Drop-out
•   Multiplatform
     •   Facebook
     •   Mobile
From Web to Mobile with Stage 3D
•   Facebook
•   Mobile interaction
•   More screens = more attraction
•   An emerging trend
From Web to Mobile with Stage 3D
–
From Web to Mobile with Stage 3D
From Web to Mobile with Stage 3D
From Web to Mobile with Stage 3D
•   Flash Player still owns the Web (1.3 billion)*
     •   500,000+ on mobile*
     •   Development on Windows (even for iOS)
     •   Faster development time
     •   ActionScript versus Objective C
     •   Same code base
     •   GUI
* http://www.adobe.com/ca/products/flashruntimes/statistics.html
•   MMO Engine
     •   Skylanders Universe
     •   Yu-Gi-Oh! BAM
     •   Bearville
•   Air 3.x: It works…
From Web to Mobile with Stage 3D
From Web to Mobile with Stage 3D
•   Focus on gameplay
     •   Scripting in AS3
     •   Aim for Touch First*
     •   Most development on PC
     •   Working game editor
         •   Art, design, programming
         •   Collaborative features
* This technique can also be used at your local bar**
** Results may vary
•   Artist   Designer   Programmer
•   Don’t:
        •   Let programmers do art integration
        •   Move files manually


•   Do:
    •   Streamlined 3ds Max -> game
    •   WYSIWYG
From Web to Mobile with Stage 3D
•   Don’t:
    •   Let a programmer do the designer’s work
        •   Spawn points
        •   Minion life and attack
        •   Character speed
•   Do:
    •   Offer them the toolset
        •   Tweak values
        •   Place triggers
From Web to Mobile with Stage 3D
•   Don’t:
    •   Let them integrate art and design
    •   Let them wait for a build


•   Do:
    •   Ease iteration for gameplay
    •   Scripting
From Web to Mobile with Stage 3D
•   Don’t let a programmer do art
From Web to Mobile with Stage 3D
From Web to Mobile with Stage 3D
From Web to Mobile with Stage 3D
•   app-store                             •   Debug-interpreter
    •   Awesome final release                 •   Compiles lighting-fast
    •   Fastest code execution                •   Slowest code execution
    •   Takes forever to compile              •   Doesn’t crash on all
                                                  errors
*See last slide for complete definition
•   #1 - Don’t do QA using debug-interpreter

•   #2 - Use debug-interpreter for fast iteration

•   #3 - Don’t load SWF with code at runtime

•   #4 - Use compiler constants
•   # 5 - Pool objects
     •   # 6 - Use ATF, but strip it down*
     •   # 7 - Test early, test often
         •   On your target platforms
         •   Continuous integration

* This technique can also be used at your local bar**
** Use at your own risk
…
…or are you?
From Web to Mobile with Stage 3D
From Web to Mobile with Stage 3D
From Web to Mobile with Stage 3D
From Web to Mobile with Stage 3D
•   Interpreter worked
•   Painfully slow
•   Optimize using simple collision
•   A mess to debug
•   Still not released
•   Weight compared to native (AS3)
      • Neverending compilation (Older Alchemy version)
Good habit #1
  Don’t test using debug-interpreter
Good habit #7
  Test on target platform with app-store
•   Use native code in your app
    •   No royalties
    •   Can use this for:
        •   Physics (Bullet)
        •   Pathfinding
        •   Particles
    •   Looks like a silver bullet*
* No pun intended
From Web to Mobile with Stage 3D
•   Physics            •   Navigation system
     •   Ray picking        •   Only rewrite the game logic
     •   Collision     •   Particle system
     •   Tweening           •   GPU-based
•   On mobile:
       •   Alchemy didn’t work for us
       •   Native extensions didn’t work for us


   •   AS3 version worked, even on mobile
       •   Same code base
       •   Debug-friendly
       •   ActionScript
Good habit #4
      Use compiler constants
From Web to Mobile with Stage 3D
•   Problems
    • Pathfinding on mobile (20% of budget)
    • Particle system heavy on CPU
    • Object instantiations

•   Optimizations
    • Azoth for Optimized Opcode (5% of budget)
    • Use GPU-based particles
    • Pool objects and pre-instantiate
•   Problems
    • Draw calls (state change)
    • Overdraw
    • GPU-based particle system (damn it!)

•   Optimization
    • Draw call batching
    • Sort by display order, reduce transparency
    • None - Live with it!
• Draw calls
• Alpha blending
• Polygon count
• Normal mapping
• Specular mapping
• GPU particles
• Features
Mobile
   •   Adobe Monocle
   •   Caveman debugging
   •   Guess with Web profiling results
   •   Real-time stats and toggles
Web
   •   Adobe Monocle
   •   Intel GPA
   •   Real-time stats and toggles
   •   The Miner
Demo Time!
It might look funny, but it does the job!
From Web to Mobile with Stage 3D
•   Unreal
•   Unity




http://unity3d.com/unity/publishing/flash
http://gamasutra.com/view/news/37678/Epic_Games_Unreal_Engine_Heads_To_Flash.php
’

•   SmartTV
•   Constrained mode (11.4)
•   Multithreaded (11.4)
•   Stage 3D 2.0
•   AS4
•   Advanced devices
• Stage3D
• Interface
• Sounds
• Network
• Consistency
Jean-Philippe Doiron
  jpd@frimastudio.com
  @jphildoiron


Luc Beaulieu
  luc@frimastudio.com
  @LucDOA
•   ipa-ad-hoc — an iOS package for ad hoc distribution.
•   ipa-app-store — an iOS package for Apple App Store distribution.
•   ipa-debug — an iOS package with extra debugging information. (The SWF files in the
    application must also be compiled with debugging support.)
•   ipa-test — an iOS package compiled without optimization or debugging information.
•   ipa-debug-interpreter — functionally equivalent to a debug package, but compiles more
    quickly. However, the ActionScript bytecode is interpreted and not translated to machine code.
    As a result, code execution is slower in an interpreter package.
•   ipa-debug-interpreter-simulator — functionally equivalent to ipa-debug-interpreter, but
    packaged for the iOS simulator. Macintosh-only. If you use this option, you must also include
    the -platformsdk option, specifying the path to the iOS Simulator SDK.
•   ipa-test-interpreter — functionally equivalent to a test package, but compiles more quickly.
    However, the ActionScript bytecode is interpreted and not translated to machine code. As a
    result, code execution is slower in an interpreter package.
•   ipa-test-interpreter-simulator — functionally equivalent to ipa-test-interpreter, but packaged
    for the iOS simulator. Macintosh-only. If you use this option, you must also include the -
    platformsdk option, specifying the path to the iOS Simulator SDK.
Ad

More Related Content

What's hot (20)

Improved development workflows using vagrant
Improved development workflows using vagrantImproved development workflows using vagrant
Improved development workflows using vagrant
Makis Asimidis
 
Java script programming language
Java script programming language Java script programming language
Java script programming language
Asif H Tamim
 
Introduction to Phaser.js
Introduction to Phaser.jsIntroduction to Phaser.js
Introduction to Phaser.js
Francesco Raimondo
 
Chef + AWS + CodeIgniter
Chef + AWS + CodeIgniterChef + AWS + CodeIgniter
Chef + AWS + CodeIgniter
ciconf
 
Phaser presentation
Phaser presentationPhaser presentation
Phaser presentation
Patrick John Pacaña
 
Cross-Platform Desktop Apps with Electron (CodeStock Edition)
Cross-Platform Desktop Apps with Electron (CodeStock Edition)Cross-Platform Desktop Apps with Electron (CodeStock Edition)
Cross-Platform Desktop Apps with Electron (CodeStock Edition)
David Neal
 
Ansible for Automation
Ansible for AutomationAnsible for Automation
Ansible for Automation
Jaykishan mutkawoa
 
The Architect Way - JSCamp.asia 2012
The Architect Way - JSCamp.asia 2012The Architect Way - JSCamp.asia 2012
The Architect Way - JSCamp.asia 2012
Jan Jongboom
 
SharePoint Saturday Twin Cities - SharePoint Framework, Angular & Azure Funct...
SharePoint Saturday Twin Cities - SharePoint Framework, Angular & Azure Funct...SharePoint Saturday Twin Cities - SharePoint Framework, Angular & Azure Funct...
SharePoint Saturday Twin Cities - SharePoint Framework, Angular & Azure Funct...
Sébastien Levert
 
OGDC2012 Cross-Platform Development On Mobile Devices_Mr.Takaaki Mizuno_DeNA
OGDC2012 Cross-Platform Development On Mobile Devices_Mr.Takaaki Mizuno_DeNAOGDC2012 Cross-Platform Development On Mobile Devices_Mr.Takaaki Mizuno_DeNA
OGDC2012 Cross-Platform Development On Mobile Devices_Mr.Takaaki Mizuno_DeNA
Buff Nguyen
 
Brewing ALE with Pi
Brewing ALE with PiBrewing ALE with Pi
Brewing ALE with Pi
Kristian Kristensen
 
SharePoint Saturday Vancouver - SharePoint Framework, Angular and Azure Funct...
SharePoint Saturday Vancouver - SharePoint Framework, Angular and Azure Funct...SharePoint Saturday Vancouver - SharePoint Framework, Angular and Azure Funct...
SharePoint Saturday Vancouver - SharePoint Framework, Angular and Azure Funct...
Sébastien Levert
 
20 x Tips to better Optimize your Flash content
20 x Tips to better Optimize your Flash content20 x Tips to better Optimize your Flash content
20 x Tips to better Optimize your Flash content
Elad Elrom
 
Now is the time to create your own (m)Ruby computer
Now is the time to create your own (m)Ruby computerNow is the time to create your own (m)Ruby computer
Now is the time to create your own (m)Ruby computer
kishima7
 
SharePoint Fest DC - SharePoint Framework, Angular and Azure Functions
SharePoint Fest DC - SharePoint Framework, Angular and Azure FunctionsSharePoint Fest DC - SharePoint Framework, Angular and Azure Functions
SharePoint Fest DC - SharePoint Framework, Angular and Azure Functions
Sébastien Levert
 
West Coast DevCon 2014: The Slate UI Framework (Part 1) - Introduction
West Coast DevCon 2014: The Slate UI Framework (Part 1) - IntroductionWest Coast DevCon 2014: The Slate UI Framework (Part 1) - Introduction
West Coast DevCon 2014: The Slate UI Framework (Part 1) - Introduction
Gerke Max Preussner
 
Xamarin - Victim of Phonegap’s horrible reputation
Xamarin - Victim of Phonegap’s horrible reputationXamarin - Victim of Phonegap’s horrible reputation
Xamarin - Victim of Phonegap’s horrible reputation
Gabor Wnuk
 
A Raspberry Pi cloud
A Raspberry Pi cloudA Raspberry Pi cloud
A Raspberry Pi cloud
Richard Downer
 
Core Java
Core JavaCore Java
Core Java
Piyukornule
 
Cross-Platform Desktop Apps with Electron
Cross-Platform Desktop Apps with ElectronCross-Platform Desktop Apps with Electron
Cross-Platform Desktop Apps with Electron
David Neal
 
Improved development workflows using vagrant
Improved development workflows using vagrantImproved development workflows using vagrant
Improved development workflows using vagrant
Makis Asimidis
 
Java script programming language
Java script programming language Java script programming language
Java script programming language
Asif H Tamim
 
Chef + AWS + CodeIgniter
Chef + AWS + CodeIgniterChef + AWS + CodeIgniter
Chef + AWS + CodeIgniter
ciconf
 
Cross-Platform Desktop Apps with Electron (CodeStock Edition)
Cross-Platform Desktop Apps with Electron (CodeStock Edition)Cross-Platform Desktop Apps with Electron (CodeStock Edition)
Cross-Platform Desktop Apps with Electron (CodeStock Edition)
David Neal
 
The Architect Way - JSCamp.asia 2012
The Architect Way - JSCamp.asia 2012The Architect Way - JSCamp.asia 2012
The Architect Way - JSCamp.asia 2012
Jan Jongboom
 
SharePoint Saturday Twin Cities - SharePoint Framework, Angular & Azure Funct...
SharePoint Saturday Twin Cities - SharePoint Framework, Angular & Azure Funct...SharePoint Saturday Twin Cities - SharePoint Framework, Angular & Azure Funct...
SharePoint Saturday Twin Cities - SharePoint Framework, Angular & Azure Funct...
Sébastien Levert
 
OGDC2012 Cross-Platform Development On Mobile Devices_Mr.Takaaki Mizuno_DeNA
OGDC2012 Cross-Platform Development On Mobile Devices_Mr.Takaaki Mizuno_DeNAOGDC2012 Cross-Platform Development On Mobile Devices_Mr.Takaaki Mizuno_DeNA
OGDC2012 Cross-Platform Development On Mobile Devices_Mr.Takaaki Mizuno_DeNA
Buff Nguyen
 
SharePoint Saturday Vancouver - SharePoint Framework, Angular and Azure Funct...
SharePoint Saturday Vancouver - SharePoint Framework, Angular and Azure Funct...SharePoint Saturday Vancouver - SharePoint Framework, Angular and Azure Funct...
SharePoint Saturday Vancouver - SharePoint Framework, Angular and Azure Funct...
Sébastien Levert
 
20 x Tips to better Optimize your Flash content
20 x Tips to better Optimize your Flash content20 x Tips to better Optimize your Flash content
20 x Tips to better Optimize your Flash content
Elad Elrom
 
Now is the time to create your own (m)Ruby computer
Now is the time to create your own (m)Ruby computerNow is the time to create your own (m)Ruby computer
Now is the time to create your own (m)Ruby computer
kishima7
 
SharePoint Fest DC - SharePoint Framework, Angular and Azure Functions
SharePoint Fest DC - SharePoint Framework, Angular and Azure FunctionsSharePoint Fest DC - SharePoint Framework, Angular and Azure Functions
SharePoint Fest DC - SharePoint Framework, Angular and Azure Functions
Sébastien Levert
 
West Coast DevCon 2014: The Slate UI Framework (Part 1) - Introduction
West Coast DevCon 2014: The Slate UI Framework (Part 1) - IntroductionWest Coast DevCon 2014: The Slate UI Framework (Part 1) - Introduction
West Coast DevCon 2014: The Slate UI Framework (Part 1) - Introduction
Gerke Max Preussner
 
Xamarin - Victim of Phonegap’s horrible reputation
Xamarin - Victim of Phonegap’s horrible reputationXamarin - Victim of Phonegap’s horrible reputation
Xamarin - Victim of Phonegap’s horrible reputation
Gabor Wnuk
 
Cross-Platform Desktop Apps with Electron
Cross-Platform Desktop Apps with ElectronCross-Platform Desktop Apps with Electron
Cross-Platform Desktop Apps with Electron
David Neal
 

Similar to From Web to Mobile with Stage 3D (20)

Brewing Your Own Game Engie eng
Brewing Your Own Game Engie engBrewing Your Own Game Engie eng
Brewing Your Own Game Engie eng
Coconut Island
 
Шлигін Олександр “Розробка ігор в Unity загальні помилки” GameDev Conference ...
Шлигін Олександр “Розробка ігор в Unity загальні помилки” GameDev Conference ...Шлигін Олександр “Розробка ігор в Unity загальні помилки” GameDev Conference ...
Шлигін Олександр “Розробка ігор в Unity загальні помилки” GameDev Conference ...
Lviv Startup Club
 
Enterprise iPad Development Without Notes
Enterprise iPad Development Without NotesEnterprise iPad Development Without Notes
Enterprise iPad Development Without Notes
jaxarcsig
 
[HUN] Unity alapú mobil játékok hekkelése
[HUN] Unity alapú mobil játékok hekkelése[HUN] Unity alapú mobil játékok hekkelése
[HUN] Unity alapú mobil játékok hekkelése
hackersuli
 
Making A Game Engine Is Easier Than You Think
Making A Game Engine Is Easier Than You ThinkMaking A Game Engine Is Easier Than You Think
Making A Game Engine Is Easier Than You Think
Gorm Lai
 
Mobile native-hacks
Mobile native-hacksMobile native-hacks
Mobile native-hacks
DevelopmentArc LLC
 
Phonegap for Engineers
Phonegap for EngineersPhonegap for Engineers
Phonegap for Engineers
Brian LeRoux
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
Howard Greenberg
 
Phonegap - An Introduction
Phonegap - An IntroductionPhonegap - An Introduction
Phonegap - An Introduction
Tyler Johnston
 
20120306 dublin js
20120306 dublin js20120306 dublin js
20120306 dublin js
Richard Rodger
 
Expert JavaScript Programming
Expert JavaScript ProgrammingExpert JavaScript Programming
Expert JavaScript Programming
Yoshiki Shibukawa
 
Developing a mobile cross-platform library
Developing a mobile cross-platform libraryDeveloping a mobile cross-platform library
Developing a mobile cross-platform library
Kostis Dadamis
 
Selenium Camp 2016 - Kiev, Ukraine
Selenium Camp 2016 -  Kiev, UkraineSelenium Camp 2016 -  Kiev, Ukraine
Selenium Camp 2016 - Kiev, Ukraine
Justin Ison
 
Head first android apps dev tools
Head first android apps dev toolsHead first android apps dev tools
Head first android apps dev tools
Shaka Huang
 
Rapid Game Development with RUby and Gosu – Ruby Manor 4
Rapid Game Development with RUby and Gosu – Ruby Manor 4Rapid Game Development with RUby and Gosu – Ruby Manor 4
Rapid Game Development with RUby and Gosu – Ruby Manor 4
benko
 
Xamarin v.Now
Xamarin v.NowXamarin v.Now
Xamarin v.Now
Craig Dunn
 
W3C HTML5 KIG-The near future of the web platform
 W3C HTML5 KIG-The near future of the web platform W3C HTML5 KIG-The near future of the web platform
W3C HTML5 KIG-The near future of the web platform
Changhwan Yi
 
DevOpsCon 2015 - DevOps in Mobile Games
DevOpsCon 2015 - DevOps in Mobile GamesDevOpsCon 2015 - DevOps in Mobile Games
DevOpsCon 2015 - DevOps in Mobile Games
Andreas Katzig
 
Monkey space 2013
Monkey space 2013Monkey space 2013
Monkey space 2013
Miguel de Icaza
 
Continuous integration by Rémy Virin
Continuous integration by Rémy VirinContinuous integration by Rémy Virin
Continuous integration by Rémy Virin
CocoaHeads France
 
Brewing Your Own Game Engie eng
Brewing Your Own Game Engie engBrewing Your Own Game Engie eng
Brewing Your Own Game Engie eng
Coconut Island
 
Шлигін Олександр “Розробка ігор в Unity загальні помилки” GameDev Conference ...
Шлигін Олександр “Розробка ігор в Unity загальні помилки” GameDev Conference ...Шлигін Олександр “Розробка ігор в Unity загальні помилки” GameDev Conference ...
Шлигін Олександр “Розробка ігор в Unity загальні помилки” GameDev Conference ...
Lviv Startup Club
 
Enterprise iPad Development Without Notes
Enterprise iPad Development Without NotesEnterprise iPad Development Without Notes
Enterprise iPad Development Without Notes
jaxarcsig
 
[HUN] Unity alapú mobil játékok hekkelése
[HUN] Unity alapú mobil játékok hekkelése[HUN] Unity alapú mobil játékok hekkelése
[HUN] Unity alapú mobil játékok hekkelése
hackersuli
 
Making A Game Engine Is Easier Than You Think
Making A Game Engine Is Easier Than You ThinkMaking A Game Engine Is Easier Than You Think
Making A Game Engine Is Easier Than You Think
Gorm Lai
 
Phonegap for Engineers
Phonegap for EngineersPhonegap for Engineers
Phonegap for Engineers
Brian LeRoux
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
Howard Greenberg
 
Phonegap - An Introduction
Phonegap - An IntroductionPhonegap - An Introduction
Phonegap - An Introduction
Tyler Johnston
 
Expert JavaScript Programming
Expert JavaScript ProgrammingExpert JavaScript Programming
Expert JavaScript Programming
Yoshiki Shibukawa
 
Developing a mobile cross-platform library
Developing a mobile cross-platform libraryDeveloping a mobile cross-platform library
Developing a mobile cross-platform library
Kostis Dadamis
 
Selenium Camp 2016 - Kiev, Ukraine
Selenium Camp 2016 -  Kiev, UkraineSelenium Camp 2016 -  Kiev, Ukraine
Selenium Camp 2016 - Kiev, Ukraine
Justin Ison
 
Head first android apps dev tools
Head first android apps dev toolsHead first android apps dev tools
Head first android apps dev tools
Shaka Huang
 
Rapid Game Development with RUby and Gosu – Ruby Manor 4
Rapid Game Development with RUby and Gosu – Ruby Manor 4Rapid Game Development with RUby and Gosu – Ruby Manor 4
Rapid Game Development with RUby and Gosu – Ruby Manor 4
benko
 
W3C HTML5 KIG-The near future of the web platform
 W3C HTML5 KIG-The near future of the web platform W3C HTML5 KIG-The near future of the web platform
W3C HTML5 KIG-The near future of the web platform
Changhwan Yi
 
DevOpsCon 2015 - DevOps in Mobile Games
DevOpsCon 2015 - DevOps in Mobile GamesDevOpsCon 2015 - DevOps in Mobile Games
DevOpsCon 2015 - DevOps in Mobile Games
Andreas Katzig
 
Continuous integration by Rémy Virin
Continuous integration by Rémy VirinContinuous integration by Rémy Virin
Continuous integration by Rémy Virin
CocoaHeads France
 
Ad

Recently uploaded (20)

TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Ad

From Web to Mobile with Stage 3D

  • 1. Luc Beaulieu CTO, Frima Studio Jean-Philippe Doiron Principal Software Architect R&D, Frima Studio
  • 2. What is Adobe Stage3D? • It is an API in Flash 11 that enables hardware acceleration (GPU). • What is Adobe AIR? • Enables developers to package the same Flash code into native apps for multiplatform, including over 500 million smart devices.
  • 3. Why Stage 3D is a valid option for mobile games (and multiplatform). • How to make your Web games also work on mobile devices. • What you can do to optimize performance along the way.
  • 6. MPSCMPHSDD Multiplatform, Synchronous Cooperative Multiplayer Hack-n-Slash with Support for Drop-in Drop-out
  • 8. Fun • Multiplayer • Drop-in Drop-out • Multiplatform • Facebook • Mobile
  • 10. Facebook • Mobile interaction • More screens = more attraction • An emerging trend
  • 12.
  • 16. Flash Player still owns the Web (1.3 billion)* • 500,000+ on mobile* • Development on Windows (even for iOS) • Faster development time • ActionScript versus Objective C • Same code base • GUI * http://www.adobe.com/ca/products/flashruntimes/statistics.html
  • 17. MMO Engine • Skylanders Universe • Yu-Gi-Oh! BAM • Bearville • Air 3.x: It works…
  • 20. Focus on gameplay • Scripting in AS3 • Aim for Touch First* • Most development on PC • Working game editor • Art, design, programming • Collaborative features * This technique can also be used at your local bar** ** Results may vary
  • 21. Artist Designer Programmer
  • 22. Don’t: • Let programmers do art integration • Move files manually • Do: • Streamlined 3ds Max -> game • WYSIWYG
  • 24. Don’t: • Let a programmer do the designer’s work • Spawn points • Minion life and attack • Character speed • Do: • Offer them the toolset • Tweak values • Place triggers
  • 26. Don’t: • Let them integrate art and design • Let them wait for a build • Do: • Ease iteration for gameplay • Scripting
  • 28. Don’t let a programmer do art
  • 32. app-store • Debug-interpreter • Awesome final release • Compiles lighting-fast • Fastest code execution • Slowest code execution • Takes forever to compile • Doesn’t crash on all errors *See last slide for complete definition
  • 33. #1 - Don’t do QA using debug-interpreter • #2 - Use debug-interpreter for fast iteration • #3 - Don’t load SWF with code at runtime • #4 - Use compiler constants
  • 34. # 5 - Pool objects • # 6 - Use ATF, but strip it down* • # 7 - Test early, test often • On your target platforms • Continuous integration * This technique can also be used at your local bar** ** Use at your own risk
  • 40. Interpreter worked • Painfully slow • Optimize using simple collision
  • 41. A mess to debug • Still not released • Weight compared to native (AS3) • Neverending compilation (Older Alchemy version) Good habit #1 Don’t test using debug-interpreter Good habit #7 Test on target platform with app-store
  • 42. Use native code in your app • No royalties • Can use this for: • Physics (Bullet) • Pathfinding • Particles • Looks like a silver bullet* * No pun intended
  • 44. Physics • Navigation system • Ray picking • Only rewrite the game logic • Collision • Particle system • Tweening • GPU-based
  • 45. On mobile: • Alchemy didn’t work for us • Native extensions didn’t work for us • AS3 version worked, even on mobile • Same code base • Debug-friendly • ActionScript Good habit #4 Use compiler constants
  • 47. Problems • Pathfinding on mobile (20% of budget) • Particle system heavy on CPU • Object instantiations • Optimizations • Azoth for Optimized Opcode (5% of budget) • Use GPU-based particles • Pool objects and pre-instantiate
  • 48. Problems • Draw calls (state change) • Overdraw • GPU-based particle system (damn it!) • Optimization • Draw call batching • Sort by display order, reduce transparency • None - Live with it!
  • 49. • Draw calls • Alpha blending • Polygon count • Normal mapping • Specular mapping • GPU particles • Features
  • 50. Mobile • Adobe Monocle • Caveman debugging • Guess with Web profiling results • Real-time stats and toggles Web • Adobe Monocle • Intel GPA • Real-time stats and toggles • The Miner
  • 52. It might look funny, but it does the job!
  • 54. Unreal • Unity http://unity3d.com/unity/publishing/flash http://gamasutra.com/view/news/37678/Epic_Games_Unreal_Engine_Heads_To_Flash.php
  • 55. ’ • SmartTV • Constrained mode (11.4) • Multithreaded (11.4) • Stage 3D 2.0 • AS4 • Advanced devices
  • 56. • Stage3D • Interface • Sounds • Network • Consistency
  • 57. Jean-Philippe Doiron [email protected] @jphildoiron Luc Beaulieu [email protected] @LucDOA
  • 58. ipa-ad-hoc — an iOS package for ad hoc distribution. • ipa-app-store — an iOS package for Apple App Store distribution. • ipa-debug — an iOS package with extra debugging information. (The SWF files in the application must also be compiled with debugging support.) • ipa-test — an iOS package compiled without optimization or debugging information. • ipa-debug-interpreter — functionally equivalent to a debug package, but compiles more quickly. However, the ActionScript bytecode is interpreted and not translated to machine code. As a result, code execution is slower in an interpreter package. • ipa-debug-interpreter-simulator — functionally equivalent to ipa-debug-interpreter, but packaged for the iOS simulator. Macintosh-only. If you use this option, you must also include the -platformsdk option, specifying the path to the iOS Simulator SDK. • ipa-test-interpreter — functionally equivalent to a test package, but compiles more quickly. However, the ActionScript bytecode is interpreted and not translated to machine code. As a result, code execution is slower in an interpreter package. • ipa-test-interpreter-simulator — functionally equivalent to ipa-test-interpreter, but packaged for the iOS simulator. Macintosh-only. If you use this option, you must also include the - platformsdk option, specifying the path to the iOS Simulator SDK.

Editor's Notes

  • #2: LUCHi everyone, thank you for joining us. We are happy to be speaking again at GDC Online.Welcome to From Web to Mobile with Stage 3D.I am Luc the CTO of FS, a 350 people game studio in wonderful Quebec city and since it was cheaper to send two people, this is JP principal something something.
  • #3: Some definitions to get started.For those of you that are unaware, Stage3D is an API in Flash 11 that enables hardware acceleration (GPU).AIR, is a way to package your Flash game for multiplatforms, including iOS and Android.
  • #4: LUCIn this talk, we hope that you will leave with 3 main takeaways.We want to show you why Stage3D is a valid option to make a mobile game, but also a multiplatform game.We would also like to show you tips and tricks to publish or transform your Web game into a mobile game.And finally, we’ll share some experiences we had to tune performance along the way.Last time, many folks told us that the talk was a tad too technical, so we decided to tone it down a bit, I’ll let JP get started on something simple.Transition to JP
  • #6: Right, remember I told you it was cheaper to send two people?This is the timeline we’ll walk you through during the session
  • #7: LUCThe project we will show is code named Toro. Let me quickly provide you with an introduction to what this project is.In brief (take paper out), it’s a multiplatform, synchronous cooperative multiplayer hack-n-slashwith support for drop-in drop-out.To get you started, here’s a quick trailer video.GAMEPLAY VIDEO
  • #8: LUCThe project we will show is code named Toro. Let me quickly provide you with an introduction to what this project is.In brief (take paper out), it’s a multiplatform, synchronous cooperative multiplayer hack-n-slashwith support for drop-in drop-out.To get you started, here’s a quick trailer video.GAMEPLAY VIDEO
  • #9: LUCObviously, we want the game to be fun and addictive.We want to game to be multiplayer, in coop mode with support for drop in, drop out.Finally, we want this game to run on Facebook as well as on mobile devices.
  • #10: Why go to all the trouble of being multiplatform for a Web game?
  • #11: LUCFirst, Facebook has very large and growing user base, and it’s public seems to be waiting for the next big thing in gaming.The project aims to prove that new-generation Facebook games can live and interact with mobile devices.Also, by targeting tablets, we open the door to support Smart TVs and other devices.Here’s a quick look at Facebook progression in the last few years.
  • #12: LUCOh sorry, that was their stock priceHere’s the real thing
  • #13: LUCHere’s an actual graph on Facebook progression.That’s a lot of folks to target!
  • #14: In June 2010, this was the expected outcome on the unit shipment race.Somewhere in 2012, the inflection point would happen.
  • #15: However, the reality was a tad earlier. SmartPhones and tablets were outselling PCs at the 4th quarter of 2011.And who knows how Windows 8 will affect that growth.Transition to JP
  • #16: JPThank you Luc for stating the obvious…Now, that we know all that, why choosing Stage3D to make a project on multiplatform.
  • #17: First Flash and air give us the largest reach with the same code base.But also, Compared to native, Developing a game in ActionScript is faster and less error prone.For instance, we want to focus on gameplay before memory management. Usually when developing for ios, you need a mac, but we’re a PC company, With stage3d our development team can work on PC and then publish to all platform.IF your game requires some interfaces, and they’ll probably do. with flash we can use the same vector based asset on all devices.And Adobe tools are awesome for interfaces
  • #19: With nice 3D rendering, efficient gameplay programming and functional network features it is clear for us that Stage 3D is a good option when creating a game for multiplatform.
  • #20: LUCNow that we are set on the tech, we need to have an efficient production pipeline to work with.
  • #22: Thanks Luc,Everything that you can build or use that will remove hiccups in the pipeline will pay of.However, I will not talk about everything an editor should have, but only the features that gives us the more bang for the bucks. Fast iterations is the key in game production, even more for these 3 races of people.
  • #23: First and foremost, your artist.We have heard too many time that they are waiting for the next programmer’s build to see their art in action.OR that the build don’t have the latest asset because someone forgot to copy the files manually.If they were only one thing that you could do to help you artiste, you shouldhave an art pipeline that is streamlined. From 3dsmax to the editor that support light, material, shader, animation everything need to be in place for them to iterate. But Also, If you don’t want them to wait to see the result in the actual game, try using the same renderer as your game within the editor, with this, you make sure that what they see is what they get. Here is what I mean when I said streamlining the pipeline.
  • #25: Your game Designer are often neglected in tool production, In our case, I know they were. Probably because what they do don’t affect visual quality, or because they can finally reach their end by playing the game over and over and over again.But, If your designer is seating next to a programmer and tell him where to place the new spawn point or how many damage a minion should do, they both are not as efficient as they could be. Instead create tools that let them change those gameplay values rather than playing with an xml, but also let them place the spawn point and triggers that will start a cinematic or somethingHere is how it could look like
  • #26: In most of our production, the programmers are the bottleneck of the project, not because they can’t create their feature on time, but mostly because they have to integrate art and design. By creating tools for the other tiers we have already freed a lot of time for them. The next thing you must have is a fast and convenient way of coding gameplay component. Scripting might be the way to go, around since , forever, With lua for instance, you could use this in your editor kinda like unity3D with c#. However, in flash there is no need to find another scripting language as as3 can be dynamically loaded. Here is an example: [VIDEO]
  • #27: In most of our production, the programmers are the bottleneck of the project, not because they can’t create their feature on time, but mostly because they have to integrate art and design. By creating tools for the other tiers we have already freed a lot of time for them. The next thing you must have is a fast and convenient way of coding gameplay component. Scripting might be the way to go, around since , forever, With lua for instance, you could use this in your editor kinda like unity3D with c#. However, in flash there is no need to find another scripting language as as3 can be dynamically loaded. Here is an example: [VIDEO]
  • #28: Oh one last thing, don’t let them do art.Seriously.
  • #29: Oh one last thing, don’t let them do art.Seriously.
  • #30: At Last, but not least, Our production teams are using SVN for versioning. SVN and the other versioning systems are not made for merging binary formats such as, in our case, our scene file.So often, developers are using locks to go around this issue.But in larger teams, locking a complete scene in the versioning system, is not very efficient as artist, developer and designer can work on it at the same time . Some editor provide you with a way of locking only certain part of the scene. But, what we think is the best solution to solve this problem, is to create a plugin to your versioning system that will support merging those types of files. SO that no lock are ever required. Here’s what we did.MERGING VIDEO
  • #31: At Last, but not least, Our production teams are using SVN for versioning. SVN and the other versioning systems are not made for merging binary formats such as, in our case, our scene file.So often, developers are using locks to go around this issue.But in larger teams, locking a complete scene in the versioning system, is not very efficient as artist, developer and designer can work on it at the same time . Some editor provide you with a way of locking only certain part of the scene. But, what we think is the best solution to solve this problem, is to create a plugin to your versioning system that will support merging those types of files. SO that no lock are ever required. Here’s what we did.MERGING VIDEO
  • #32: Now that we have looked at what’s needed in your toolset to be efficient, we will share with you some of the good habits we wish we had for our previous projects.
  • #34: Don’t do QA using the debug targetThe debug target is faster to compile, so sometimes we tested using this version. Maybe because we were using lot of beta air version, but the debug target did not crash on every error. Meaning that we wasted our time We had to test anyway on the app store target.For faster iterations, however, #2 you should use the Debug targetIn general, to be efficient, you should be doing iteration on your PC, but at some point, you’ll need to do test on the device. For example, the touch interface. For that, use debug target and you’ll save a lot of compile time.#3 : The code running on IOS needs to be precompiled, So, loading code at runtime is not possible.There is a couple of ways and hacks to go around this issue, and even air 3.5 beta announce a better support for this. but we decided to take the simple path and compiled every bit of code in a single file SWF.Number 4 : Use compiler constantsThis one is straight forward, when building for multiple devices, compiler constant will give you the opportunity to have the same codebase for all platforms.For example : ifdef [IOS] use touch else use keyboard.
  • #35: #5 On mobile, The garbagecollectorisevenworstthat on PC, If youthink about creating a gamethatgrowsbehondpac man, you’llneedtoo pool yourobjects.#6:At some point, Adobe will provide all of us with a tool that convert png to atf, a compressed texture format. It includes the texture for pc, ipad and other devices all in one file. This format reduce the bandwidth contention with the GPU as well as the VRAM. So, Use IT, but when you do, make sure that you blank out or remove unused texture format for your specific device. This reduces the ATF size by nearly two-thirds.You all know that, and I can’t stress this enough, #7 Test early, test often on your target platforms.For that, you can use build machine that compile every night for all devices, so that in the morning, your good to test with the latest version. Just to note; these same machines can also be use for continuous integration.With that said, you should be good to go.
  • #36: LUCThanks JP, we are now ready to deploy our game!If you have not followed some best practices, the game might be polished on PC, and you might think that it can be deployed on iPad and work just as well.There is a good chance, that you will get a bad surprise like this one.If you had tested early and often, on the right platform, you would have found performance bottlenecks and applied some of the fixes we’ll talk next.
  • #37: Several months back, Adobe announced their premium features.One of the main feature is when sing Alchemy, now flasCC, you can use C++ code in Flash!
  • #38: When talking about performance in Flash, Alchemy is one of the first thing that comes to mind.We’ve shown at different conferences that we’ve used this to leverage the power of Flash.In the past, we’ve used this in Neema and Zombie Tycoon.For instance, we’ve use it to integrate Bullet as our physics engine.
  • #39: We’vealsousedrecast navigation for ourpathfinding system and ourcrowd system.
  • #41: Since 3 of our major modules were written in c++, it seemed logical to go that way and try it on mobile.Building using the interpreter target took some time, but it worked.The game took 1-2 minutes to load, and we realized that it was because of the mesh preparation. We optimized this by creating a simple collision mesh (a straightforward technique).After that, the game loaded in a much more decent time.
  • #42: So far, we can say that it is working while compiling with the interpreter target, but at that time Alchemy was not released, and was a serious mess to debug.Also, the weight of the SWF was over 3MB for something that could fit in 300KB.However, we expected the performance to be vastly improved when building with App Store target. So we tried it. And we got: (neverending slideshow)After 36 hours of build time and a insane amount of RAM, the compilation stopped. We were never able to build the library in anything else than the interpreter.That said remember the good habits.
  • #43: Lucky for us, AIR 3 adds a little thing called Native Extension.At that time, we had 4 weeks left to come up with a working solution for Physics, Pathfinding and Particles. So we started investigating it, with its ability to compile native code for mobile. It felt like a silver bullet.
  • #44: But in fact it looked like this.Fred compiledthe Native Extension on Mac, sent it to a shared drive for Windows, compiled the wrapper in Flash, compiled the application in Flash and sent it to the iPad.The debugging process looked like this: We capture the error in Flash and then –pffff– black hole!Seriously, we had a simple project working, but when building big libraries, we encountered too many problems and random crashes and it was a mess to debug. Adobe is aware and working on it to make it easier.So we were stuck with no working solutions.
  • #45: On the other hand, we wanted our Web game to be royalty-free, so using Alchemy or flasCC for the Web version was not possible.We thought we needed a full physics engine, but we ended up only using it for the ray picking related to character movement.Collisions were handled by the navigation systemEffects used tweening instead of physics.For the navigation system we would need to rewrite the game logic portion only, the editor was fine in C++.The particle system could not stay CPU-bound without opcodes, so we made a GPU-based one.
  • #47: Here come’s the Last stretch on performance, but this time more low level on ipad hardware. For the cpu and gpu.
  • #48: JPFirst, Here are some CPU-bound challenges we had and how we solved them. The pathfinding we had, took nearly 15 to 20% of our cpu time when all enemies were walking toward you. To fix that, we stored the navigation mesh in a bytearray, and run Azoth on top of it. Now the PF uses about 5% of our budget.A CPU based particle system was too much for our target platforms (even on the web without Alchemy if we wanted to be royalty free), so, we created a GPU-based particle system that worked fine on all platforms. And has a low footprint on the cpuThe garbage collector on mobile will cause spike in your performance graph, I think that was the biggest challenge we had. The team had to move, all the object creation at load time, and use pool as often as possible. Knowing that at the beginning of the project, we would have saved a lot of time.
  • #49: On the rendering side of thing, One of the heaviest overhead on mobile GPUs using AIR are the States change related to DrawCalls.DrawCall batching is the solution for that, no rocket science here, but with the current computer hardware, people tend to forget, With AIR, it is very important.When aiming for Ipad2, overdraw can be a GPU killer. To reduce it, we need to sort the scene from front to back. And remove as much transparency as possible.Last but not least our GPU-based particle system was adding draw calls and overdraw.We decided to live with it. Now, a good-looking particle system will always demand a lot of power, from either CPU or GPU. You can reduce the particle count based on machine performance; like low-end desktop computers or tablet.
  • #50: Here’s our summary on what are costly and cheap operations on mobile GPUs using AIR.Because Adobe Air add a layer on top of the 3d driver, so performance are not always what you expect them to be when compare to native. Every time you make a Draw call, there is a lot of state changes done under the hood making them very expensive.For comparison, modern game will have between 1000 and 2000 draw call per frame, running a 60 hertz on a good machine. With Air on Ipad2, if you could stay around 20-30 draw call per frame, you might get 30 fps. I know that this is an unfair comparison, but you get the point.Transparency worked but, use it wisely because it adds to the overdraw.Drawing 100Ks polygon and more is cheap, but make sure that you batch your draw calls.Normal and Specular mapping are commonly used techniques in video games, their cost is directly related to the number of instructions required in the pixel shader.GPU Particles, when used properly are probably the best way to go for ipadBut, as they are often rendered in group, they will create overdraw and add to the draw call. So, Your call,
  • #51: Alittle slide on profiling. Profiling for Air on Mobile used to be a lot harder. Today, Adobe provides us with Monocle, a profiler that runs on the desktop and that connects wirelessly to any device. I can say that without it we would have never been able to deliver a game running smoothlyBut Regarding GPU performance, we had to rely more on Caveman debugging, and building our own real-time statistic viewer with on and off switchUnless you have a Android device running an Intel processor, then you can use intel GPA.For the desktop though, there is already a lot of good tools , we could use Intel GPA for the GPU and Monocle for CPU usage, which worked greatWe also used the Miner for day-to-day performance checkups, the miner will also work on mobile, the small interface is not very convenient.
  • #52: It’s time to show it to you.
  • #57: We’ve shown you some issues we had with Stage3D, however, we were able to tackle them all.But now that everything is figured out, Flash, Stage3D and AIR allows us to be very efficient for our multiplatform development.