SlideShare a Scribd company logo
Flash Online Conference #7

Scripting 3D apps with Lua and C++

@Minko3D

http://minko.io
Available today on minko.io

LATEST MINKO 2 ADDITIONS
New Minko 2 Features
 Editor
– Auto-save
– Multiple optimizations

 Framework
– Mutiple fixes on the lighting system

Available today!
http://minko.io/download
Codename « Normandie »

MINKO 3
Motivations

 Target new platforms
– Keep the « design once, deploy everywhere » workflow
– Larger community

 Increase performances, epecially CPU-wise
– Multi-threading?

 Leverage existing codebase
Technological choices

 C++11 core framework and plugins
 Develop once, deploy everywhere
– Windows, Mac, Linux
– Android, iOS
– HTML5, Flash

 Work with all the tools you like
Demo – HTML5 Sponza

http://minko.io/showcase/sponza-html5
Babolat Play - First commercial project!

http://www.youtube.com/watch?v=ewUUerxdZ7U
Babolat Play - Fallback

Run web app.

yes

Is
WebGL
available
?

no

Generate JPEG on the
server

Thanks to Minko 3, the same code runs on the server side
and in the browser.
New Platforms
Platform

Status

Target

Languages

iOS

OK

Native

C/C++

Android

OK

Native

C/C++

Flash (Stage3D)

WIP

X-Compilation

C/C++, AS3

Windows (DirectX)

OK

Native

C/C++

Mac

OK

Native

C/C++

Windows (OpenGL)

OK

Native

C/C++

Linux

OK

Native

C/C++

HTML5 (WebGL)

OK

X-Compilation

C/C++, Javascript

Windows Phone

WIP

Native

C/C++

BlackBerry 10

NA

Native

C/C++

Firefox OS

NA

Native

C/C++
How can I help?
 Show your love for Crossbridge and Minko on the dedicated
feature request on Github!
– https://github.com/adobe-flash/crossbridge/issues/28

 Please leave a comment, even just a +1
2D/3D file formats

 50+ 3D file formats
– 3DS, BLEND (Blender 3D), DAE/Collada, FBX, IFC-STEP , ASE, DXF,
HMP, MD2, MD3 , MD5, MDC, MDL, NFF, PLY, STL, X, OBJ, SMD,
LWO, LXO, LWS, TER, AC3D , MS3D , COB, Q3BSP, XGL, CSM, BVH,
B3D, NDO, Ogre XML, Q3D

 20+ 2D file formats
– JPEG, PNG, TIF, TGA, RAW, PSD…
Effect files
 Store a fully setup multi-pass rendering effect
 Include 3rd party shaders and plug them in the engine using
bindings
 Support über-shaders using automated macro definition
based on bindings
 Handle multiple rendering techniques to choose from at
runtime
 Can fallback to another specific technique when the selected
one fails (WIP)
« flash » technique

« windows » technique

Portable Effects & Shaders
"techniques" : [
{
"configuration" : [ "windows" ],
"passes" : [
{
"vertexShader" : …
"fragmentShader" : …
}
},
{
"configuration" : [ "flash" ],
"passes" : [
{
"vertexShader" : …
"fragmentShader" : …
},
{
"vertexShader" : …
"fragmentShader" : …
}
}
]

 Group passes in a named
« technique »
 Select that technique at
runtime based on some
flags
– Platform
– Available features/plugins
– Custom flags
Leap Motion support

http://www.youtube.com/watch?v=p14kJNJ9Eoc
Oculus Rift support
SCRIPTING IN MINKO 3
C++11 is great, but…

 Is a new language for most developers
 It’s too complex for prototyping game design
 Requires some setup to get started
 Slow iteration times
Core Framework Language
 Fast
 Rich & expressive
 Optimized for each target

C, C++, Java, C#...

VS

Javascript, Python, AS3…

Scripting Language
 Simple
 Interpreted
 Dynamic
Complaints about ActionScript

 Garbage collector is messy
 No operators overloading
 Bad performances
 No (easy) concurrency
We chose… Lua!
 Fits all the requirements of a scripting language
 Vastly used by the video game industry (World of Warcraft, Fable
II & III, Neverwinter Nights, …)
– Complete list of games scripted with Lua

 Very (very) fast

– LuaJIT is comparable to Javascript V8, if not faster

 Designed to be embedded
 Designed to script games

– Simple but very efficient syntax
– Minimalistic set of features but very extensible
– Coroutines!
C++  Lua? LuaGlue!
 C++/Lua bindings
 Open source project
– https://github.com/Tomasu/LuaGlue
– We contribute as much as possible

 Leverage C++11
– Optimize as compile time as much as possible
– Simple binding interface

 Used to bind 90% of Minko’s C++ API
– Write 100% of your app in Lua
ActionScript VS Lua
ActionScript
 Messy garbage
collector

Lua
 Customizable garbage
collector

 No operators
overloading

 Operators overloading

 Bad performances

 Very fast + custom
C/C++ bindings

 No easy concurrency

 Coroutines
Minko 3 VS Flash
Application

Application

Flash Runtime

Minko 3

ActionScript VM

Lua VM

Core Library

OS

ANE

Core Framework & Plugins

OS
Flexible
Application

Application

Flash Runtime

Minko 3

ActionScript VM

Lua VM

Core Library

OS

ANE

Core Framework & Plugins

OS
Open Source
Application

Application

Flash Runtime

Minko 3

ActionScript VM

Lua VM

Core Library

OS

ANE

Core Framework & Plugins

OS
Customizable
Application

Application

Flash Runtime

Minko 3

ActionScript VM

Lua VM

Core Library

OS

ANE

Core Framework & Plugins

OS
Coroutines
 A function can suspend its execution…
– coroutine.yield()

 … and then resume « sometime later »
– coroutine.resume()

 Gives the illusion of parallelism

– Yet no complicated threading stuff
– Fully cross-platform

 Allow the creation of non-blocking (heavy) functions
 Can (always?) be used in place of events/callbacks
Coroutines
function myScript
doSomething()
while isIdle
say(‘hello how are you?’)
wait(seconds(3))
while no isIdle
wait(keyboard:keyDown())
handleKeyboard()
…
Minko - Scripting 3D apps with Lua and C++
Event driven

Coroutine driven

 Action => reaction
 Breaks the code in multiple handlers
 Messy execution flow
 Messy scopes

 Wait for « something » to
happen
 Non-blocking
 Simple execution flow
 Meaningful and readable
You chose!
 C++
– Performances
– Rich and powerful language

 Lua
– Simple and efficient
– Fast iteration times

 Mix both in any project on any target
2014
 New Minko editor
–
–
–
–
–

Script editor
Live coding
ShaderLab
Animations editor
Plugins system

http://www.youtube.com/watch?v=yuR1e1PjU8Y

 Open beta of Minko 3 (January)
 An amazing new Minko product for businesses and teams
Don’t forget to check http://minko.io !

JOYEUX NOEL!
THANK YOU SERGEY 

More Related Content

PDF
Lua on Steroids - EclipseCon NA 2012
PPTX
CC-Castle; The best Real-Time/Embedded/HighTech language EVER?
PDF
JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...
ODP
devops@cineca
PPT
Programming
PPTX
Zend con 2016 bdd with behat for beginners
PDF
Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019
PDF
History of Java 1/2
Lua on Steroids - EclipseCon NA 2012
CC-Castle; The best Real-Time/Embedded/HighTech language EVER?
JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...
devops@cineca
Programming
Zend con 2016 bdd with behat for beginners
Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019
History of Java 1/2

What's hot (20)

PDF
Docker in development (Story)
PDF
Docker + Microservices in Production
PPTX
Structure programming – Java Programming – Theory
PDF
Droidcon Nigeria 2021 - Still Sleeping on KMM?
PDF
Developing and Deploying PHP with Docker
PPTX
Let me introduce you: DOTS
PPT
Introduction to Groovy Monkey
PDF
Php Dependency Management with Composer ZendCon 2016
PDF
Docker in production: reality, not hype (OSCON 2015)
PDF
Building kubectl plugins with Quarkus | DevNation Tech Talk
PPTX
Core java
PDF
Deployment Automation with Docker
PPT
Os Bubna
PPT
Core Java Slides
PDF
Dependency Management with Composer
PDF
.NET RDF APIs
PDF
jbang: Unleash the power of Java for shell scripting
PPTX
DOCX
C# tutorial
PDF
Choosing the Right Framework for Running Docker Containers in Prod
Docker in development (Story)
Docker + Microservices in Production
Structure programming – Java Programming – Theory
Droidcon Nigeria 2021 - Still Sleeping on KMM?
Developing and Deploying PHP with Docker
Let me introduce you: DOTS
Introduction to Groovy Monkey
Php Dependency Management with Composer ZendCon 2016
Docker in production: reality, not hype (OSCON 2015)
Building kubectl plugins with Quarkus | DevNation Tech Talk
Core java
Deployment Automation with Docker
Os Bubna
Core Java Slides
Dependency Management with Composer
.NET RDF APIs
jbang: Unleash the power of Java for shell scripting
C# tutorial
Choosing the Right Framework for Running Docker Containers in Prod
Ad

Similar to Minko - Scripting 3D apps with Lua and C++ (20)

PDF
WebGL games with Minko - Next Game Frontier 2014
PDF
Minko - Why we created our own Flash platform and why you should care
PDF
Paris Android LiveCode - Creating cross-platform 3D apps with Minko
PDF
Minko - Flash Conference #5
PDF
Minko - Creating cross-platform 3D apps with Minko
PDF
Minko - Targeting Flash/Stage3D with C++ and GLSL
PDF
Minko - Build WebGL applications with C++ and asm.js
PPTX
The next step from Microsoft - Vnext (Srdjan Poznic)
PDF
Polyglot programming and agile development
PDF
soft-shake.ch - Introduction to HTML5
PDF
Minko - Windows App Meetup Nov. 2013
PPS
Afik Gal @alphageeks: Flex Intro
PPTX
The Business of Microsoft Silverlight
PPTX
Cross Platform Mobile Technologies
PDF
Paris Android User Group - Build 3D web, mobile and desktop applications with...
PPTX
Silverlight
PDF
server side Swift
PPTX
OpenSouthCode 2016 - Accenture DevOps Platform 2016-05-07
PDF
"The Vision API Maze: Options and Trade-offs," a Presentation from the Khrono...
PDF
Scaleable PHP Applications in Kubernetes
WebGL games with Minko - Next Game Frontier 2014
Minko - Why we created our own Flash platform and why you should care
Paris Android LiveCode - Creating cross-platform 3D apps with Minko
Minko - Flash Conference #5
Minko - Creating cross-platform 3D apps with Minko
Minko - Targeting Flash/Stage3D with C++ and GLSL
Minko - Build WebGL applications with C++ and asm.js
The next step from Microsoft - Vnext (Srdjan Poznic)
Polyglot programming and agile development
soft-shake.ch - Introduction to HTML5
Minko - Windows App Meetup Nov. 2013
Afik Gal @alphageeks: Flex Intro
The Business of Microsoft Silverlight
Cross Platform Mobile Technologies
Paris Android User Group - Build 3D web, mobile and desktop applications with...
Silverlight
server side Swift
OpenSouthCode 2016 - Accenture DevOps Platform 2016-05-07
"The Vision API Maze: Options and Trade-offs," a Presentation from the Khrono...
Scaleable PHP Applications in Kubernetes
Ad

Recently uploaded (20)

PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Electronic commerce courselecture one. Pdf
PPTX
Cloud computing and distributed systems.
PPTX
Spectroscopy.pptx food analysis technology
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPT
Teaching material agriculture food technology
PDF
Approach and Philosophy of On baking technology
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
Big Data Technologies - Introduction.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
KodekX | Application Modernization Development
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
20250228 LYD VKU AI Blended-Learning.pptx
MYSQL Presentation for SQL database connectivity
Electronic commerce courselecture one. Pdf
Cloud computing and distributed systems.
Spectroscopy.pptx food analysis technology
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Teaching material agriculture food technology
Approach and Philosophy of On baking technology
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Big Data Technologies - Introduction.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
Encapsulation_ Review paper, used for researhc scholars
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
KodekX | Application Modernization Development
Spectral efficient network and resource selection model in 5G networks
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
The AUB Centre for AI in Media Proposal.docx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...

Minko - Scripting 3D apps with Lua and C++

  • 1. Flash Online Conference #7 Scripting 3D apps with Lua and C++ @Minko3D http://minko.io
  • 2. Available today on minko.io LATEST MINKO 2 ADDITIONS
  • 3. New Minko 2 Features  Editor – Auto-save – Multiple optimizations  Framework – Mutiple fixes on the lighting system Available today! http://minko.io/download
  • 5. Motivations  Target new platforms – Keep the « design once, deploy everywhere » workflow – Larger community  Increase performances, epecially CPU-wise – Multi-threading?  Leverage existing codebase
  • 6. Technological choices  C++11 core framework and plugins  Develop once, deploy everywhere – Windows, Mac, Linux – Android, iOS – HTML5, Flash  Work with all the tools you like
  • 7. Demo – HTML5 Sponza http://minko.io/showcase/sponza-html5
  • 8. Babolat Play - First commercial project! http://www.youtube.com/watch?v=ewUUerxdZ7U
  • 9. Babolat Play - Fallback Run web app. yes Is WebGL available ? no Generate JPEG on the server Thanks to Minko 3, the same code runs on the server side and in the browser.
  • 10. New Platforms Platform Status Target Languages iOS OK Native C/C++ Android OK Native C/C++ Flash (Stage3D) WIP X-Compilation C/C++, AS3 Windows (DirectX) OK Native C/C++ Mac OK Native C/C++ Windows (OpenGL) OK Native C/C++ Linux OK Native C/C++ HTML5 (WebGL) OK X-Compilation C/C++, Javascript Windows Phone WIP Native C/C++ BlackBerry 10 NA Native C/C++ Firefox OS NA Native C/C++
  • 11. How can I help?  Show your love for Crossbridge and Minko on the dedicated feature request on Github! – https://github.com/adobe-flash/crossbridge/issues/28  Please leave a comment, even just a +1
  • 12. 2D/3D file formats  50+ 3D file formats – 3DS, BLEND (Blender 3D), DAE/Collada, FBX, IFC-STEP , ASE, DXF, HMP, MD2, MD3 , MD5, MDC, MDL, NFF, PLY, STL, X, OBJ, SMD, LWO, LXO, LWS, TER, AC3D , MS3D , COB, Q3BSP, XGL, CSM, BVH, B3D, NDO, Ogre XML, Q3D  20+ 2D file formats – JPEG, PNG, TIF, TGA, RAW, PSD…
  • 13. Effect files  Store a fully setup multi-pass rendering effect  Include 3rd party shaders and plug them in the engine using bindings  Support über-shaders using automated macro definition based on bindings  Handle multiple rendering techniques to choose from at runtime  Can fallback to another specific technique when the selected one fails (WIP)
  • 14. « flash » technique « windows » technique Portable Effects & Shaders "techniques" : [ { "configuration" : [ "windows" ], "passes" : [ { "vertexShader" : … "fragmentShader" : … } }, { "configuration" : [ "flash" ], "passes" : [ { "vertexShader" : … "fragmentShader" : … }, { "vertexShader" : … "fragmentShader" : … } } ]  Group passes in a named « technique »  Select that technique at runtime based on some flags – Platform – Available features/plugins – Custom flags
  • 18. C++11 is great, but…  Is a new language for most developers  It’s too complex for prototyping game design  Requires some setup to get started  Slow iteration times
  • 19. Core Framework Language  Fast  Rich & expressive  Optimized for each target C, C++, Java, C#... VS Javascript, Python, AS3… Scripting Language  Simple  Interpreted  Dynamic
  • 20. Complaints about ActionScript  Garbage collector is messy  No operators overloading  Bad performances  No (easy) concurrency
  • 21. We chose… Lua!  Fits all the requirements of a scripting language  Vastly used by the video game industry (World of Warcraft, Fable II & III, Neverwinter Nights, …) – Complete list of games scripted with Lua  Very (very) fast – LuaJIT is comparable to Javascript V8, if not faster  Designed to be embedded  Designed to script games – Simple but very efficient syntax – Minimalistic set of features but very extensible – Coroutines!
  • 22. C++  Lua? LuaGlue!  C++/Lua bindings  Open source project – https://github.com/Tomasu/LuaGlue – We contribute as much as possible  Leverage C++11 – Optimize as compile time as much as possible – Simple binding interface  Used to bind 90% of Minko’s C++ API – Write 100% of your app in Lua
  • 23. ActionScript VS Lua ActionScript  Messy garbage collector Lua  Customizable garbage collector  No operators overloading  Operators overloading  Bad performances  Very fast + custom C/C++ bindings  No easy concurrency  Coroutines
  • 24. Minko 3 VS Flash Application Application Flash Runtime Minko 3 ActionScript VM Lua VM Core Library OS ANE Core Framework & Plugins OS
  • 25. Flexible Application Application Flash Runtime Minko 3 ActionScript VM Lua VM Core Library OS ANE Core Framework & Plugins OS
  • 26. Open Source Application Application Flash Runtime Minko 3 ActionScript VM Lua VM Core Library OS ANE Core Framework & Plugins OS
  • 27. Customizable Application Application Flash Runtime Minko 3 ActionScript VM Lua VM Core Library OS ANE Core Framework & Plugins OS
  • 28. Coroutines  A function can suspend its execution… – coroutine.yield()  … and then resume « sometime later » – coroutine.resume()  Gives the illusion of parallelism – Yet no complicated threading stuff – Fully cross-platform  Allow the creation of non-blocking (heavy) functions  Can (always?) be used in place of events/callbacks
  • 29. Coroutines function myScript doSomething() while isIdle say(‘hello how are you?’) wait(seconds(3)) while no isIdle wait(keyboard:keyDown()) handleKeyboard() …
  • 31. Event driven Coroutine driven  Action => reaction  Breaks the code in multiple handlers  Messy execution flow  Messy scopes  Wait for « something » to happen  Non-blocking  Simple execution flow  Meaningful and readable
  • 32. You chose!  C++ – Performances – Rich and powerful language  Lua – Simple and efficient – Fast iteration times  Mix both in any project on any target
  • 33. 2014  New Minko editor – – – – – Script editor Live coding ShaderLab Animations editor Plugins system http://www.youtube.com/watch?v=yuR1e1PjU8Y  Open beta of Minko 3 (January)  An amazing new Minko product for businesses and teams
  • 34. Don’t forget to check http://minko.io ! JOYEUX NOEL! THANK YOU SERGEY 