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

Av...
Codename « Normandie »

MINKO 3
Motivations

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

 Increase ...
Technological choices

 C++11 core framework and plugins
 Develop once, deploy everywhere
– Windows, Mac, Linux
– Androi...
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 ...
New Platforms
Platform

Status

Target

Languages

iOS

OK

Native

C/C++

Android

OK

Native

C/C++

Flash (Stage3D)

WI...
How can I help?
 Show your love for Crossbridge and Minko on the dedicated
feature request on Github!
– https://github.co...
2D/3D file formats

 50+ 3D file formats
– 3DS, BLEND (Blender 3D), DAE/Collada, FBX, IFC-STEP , ASE, DXF,
HMP, MD2, MD3 ...
Effect files
 Store a fully setup multi-pass rendering effect
 Include 3rd party shaders and plug them in the engine usi...
« flash » technique

« windows » technique

Portable Effects & Shaders
"techniques" : [
{
"configuration" : [ "windows" ],...
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 so...
Core Framework Language
 Fast
 Rich & expressive
 Optimized for each target

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

VS

Javascript, Pytho...
Complaints about ActionScript

 Garbage collector is messy
 No operators overloading
 Bad performances
 No (easy) conc...
We chose… Lua!
 Fits all the requirements of a scripting language
 Vastly used by the video game industry (World of Warc...
C++  Lua? LuaGlue!
 C++/Lua bindings
 Open source project
– https://github.com/Tomasu/LuaGlue
– We contribute as much a...
ActionScript VS Lua
ActionScript
 Messy garbage
collector

Lua
 Customizable garbage
collector

 No operators
overloadi...
Minko 3 VS Flash
Application

Application

Flash Runtime

Minko 3

ActionScript VM

Lua VM

Core Library

OS

ANE

Core Fr...
Flexible
Application

Application

Flash Runtime

Minko 3

ActionScript VM

Lua VM

Core Library

OS

ANE

Core Framework ...
Open Source
Application

Application

Flash Runtime

Minko 3

ActionScript VM

Lua VM

Core Library

OS

ANE

Core Framewo...
Customizable
Application

Application

Flash Runtime

Minko 3

ActionScript VM

Lua VM

Core Library

OS

ANE

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

 … and then resume « sometime later »
– coroutine...
Coroutines
function myScript
doSomething()
while isIdle
say(‘hello how are you?’)
wait(seconds(3))
while no isIdle
wait(ke...
Event driven

Coroutine driven

 Action => reaction
 Breaks the code in multiple handlers
 Messy execution flow
 Messy...
You chose!
 C++
– Performances
– Rich and powerful language

 Lua
– Simple and efficient
– Fast iteration times

 Mix b...
2014
 New Minko editor
–
–
–
–
–

Script editor
Live coding
ShaderLab
Animations editor
Plugins system

http://www.youtub...
Don’t forget to check http://minko.io !

JOYEUX NOEL!
THANK YOU SERGEY 
Minko - Scripting 3D apps with Lua and C++
Upcoming SlideShare
Loading in …5
×

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

2,964 views

Published on

Published in: Technology
6 Comments
2 Likes
Statistics
Notes
  • @Minko3D, thanks you very much for your prompt and detailed reply, it helps me a lot!
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • @flashflexpro Adobe Crossbridge is a cross-compiler. It will 'convert' C++ code into AS3 bytecode that runs in the Flash Player. It's not related to 3D. We use this kind of tools to develop Minko 3 using modern C++ and target multiple platforms, HTML5 and Flash are among them. Right now, Crossbridge is not yet ready for Minko 3.

    Regarding 3D engines, Minko is the only one who provides:
    - a comprehensive and well documented open source core framework
    - a 3D world editor with integrated physics, particles, etc...
    - professional services for technical support, training, ad-hoc dev, etc...

    It is used by industry leaders such as BigPoint and Electronic Arts to build commercial games.

    Minko 3 specifically is the only open source 3D engine that also targets HTML5/WebGL. You get the best of both worlds : the richeness/performances of native code and the accessiblity of the web.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • We use cross-bridge to target Flash, but also other technologies to target each platform. It's comparable to other 3D engines in many ways (because it's a 3D engine), but also very different (compatiblity with more platforms, C++-based, scripting...).

    You can look at Minko 2 if you want a 3D engine comparable with Away3D (but with much better performance). See https://github.com/aerys/minko.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Minko, thank you for your clarifying, I am very interested in Minko, could you compare it to Adobe crossbridge( which can compile c++ into Flash ) and other 3D engines such as ( Away3D, Flare3D etc.)?
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Hello,

    1) Coroutine and Events are two different ways to simplify access to somekind of asynchronous API

    2) AS3 does NOT support multithreading but only workers

    3) Flash runtime GC is terrible (like most GCs) for performance intensive apps

    I've been working on Flash/AS3 for more than 8 years now, building Minko which is not only a fully-featured 3D engine but also one of the biggest open source projects for Flash.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total views
2,964
On SlideShare
0
From Embeds
0
Number of Embeds
63
Actions
Shares
0
Downloads
18
Comments
6
Likes
2
Embeds 0
No embeds

No notes for slide

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

  1. 1. Flash Online Conference #7 Scripting 3D apps with Lua and C++ @Minko3D http://minko.io
  2. 2. Available today on minko.io LATEST MINKO 2 ADDITIONS
  3. 3. New Minko 2 Features  Editor – Auto-save – Multiple optimizations  Framework – Mutiple fixes on the lighting system Available today! http://minko.io/download
  4. 4. Codename « Normandie » MINKO 3
  5. 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. 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. 7. Demo – HTML5 Sponza http://minko.io/showcase/sponza-html5
  8. 8. Babolat Play - First commercial project! http://www.youtube.com/watch?v=ewUUerxdZ7U
  9. 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. 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. 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. 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. 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. 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
  15. 15. Leap Motion support http://www.youtube.com/watch?v=p14kJNJ9Eoc
  16. 16. Oculus Rift support
  17. 17. SCRIPTING IN MINKO 3
  18. 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. 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. 20. Complaints about ActionScript  Garbage collector is messy  No operators overloading  Bad performances  No (easy) concurrency
  21. 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. 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. 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. 24. Minko 3 VS Flash Application Application Flash Runtime Minko 3 ActionScript VM Lua VM Core Library OS ANE Core Framework & Plugins OS
  25. 25. Flexible Application Application Flash Runtime Minko 3 ActionScript VM Lua VM Core Library OS ANE Core Framework & Plugins OS
  26. 26. Open Source Application Application Flash Runtime Minko 3 ActionScript VM Lua VM Core Library OS ANE Core Framework & Plugins OS
  27. 27. Customizable Application Application Flash Runtime Minko 3 ActionScript VM Lua VM Core Library OS ANE Core Framework & Plugins OS
  28. 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. 29. Coroutines function myScript doSomething() while isIdle say(‘hello how are you?’) wait(seconds(3)) while no isIdle wait(keyboard:keyDown()) handleKeyboard() …
  30. 30. 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
  31. 31. You chose!  C++ – Performances – Rich and powerful language  Lua – Simple and efficient – Fast iteration times  Mix both in any project on any target
  32. 32. 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
  33. 33. Don’t forget to check http://minko.io ! JOYEUX NOEL! THANK YOU SERGEY 

×