Paris Android LiveCode - Creating cross-platform 3D apps with Minko
description
Transcript of Paris Android LiveCode - Creating cross-platform 3D apps with Minko
![Page 1: Paris Android LiveCode - Creating cross-platform 3D apps with Minko](https://reader033.fdocuments.in/reader033/viewer/2022052411/556a253ad8b42a2f3f8b4d23/html5/thumbnails/1.jpg)
Paris Android LiveCodeCreating cross-platform 3D apps with Minko.
Warren SeineCTO and co-founder of Aerys
Creator of Minko (http://minko.io)
http://minko.io
@Minko3D
![Page 2: Paris Android LiveCode - Creating cross-platform 3D apps with Minko](https://reader033.fdocuments.in/reader033/viewer/2022052411/556a253ad8b42a2f3f8b4d23/html5/thumbnails/2.jpg)
by
![Page 3: Paris Android LiveCode - Creating cross-platform 3D apps with Minko](https://reader033.fdocuments.in/reader033/viewer/2022052411/556a253ad8b42a2f3f8b4d23/html5/thumbnails/3.jpg)
3D. Everywhere.Deliver engaging, interactive and rich 3D content and applications on
desktops, mobiles and the web.
![Page 4: Paris Android LiveCode - Creating cross-platform 3D apps with Minko](https://reader033.fdocuments.in/reader033/viewer/2022052411/556a253ad8b42a2f3f8b4d23/html5/thumbnails/4.jpg)
Minko Enterprise
“We chose Minko because its exclusive compression algorithms help
us distributing cutting edge 3D content on mobiles and the web.”
Gaël Seydoux, Chief of the NBO lab at
It’s like Dropbox for 3D files Visualize, share, annotate, collaborate…
On mobiles, tablets, the web and desktops
Exclusive 3D streaming algorithms Load and display 3D files up to 200 times faster
Cloud. Light. Mobile.
![Page 5: Paris Android LiveCode - Creating cross-platform 3D apps with Minko](https://reader033.fdocuments.in/reader033/viewer/2022052411/556a253ad8b42a2f3f8b4d23/html5/thumbnails/5.jpg)
Compatible with all major 3D CAO/design tools 77+ supported file formats
What You See Is What You Get Physics
Animations
Lights
Materials
....
…Minko Studio Design. Integrate. Live.
![Page 6: Paris Android LiveCode - Creating cross-platform 3D apps with Minko](https://reader033.fdocuments.in/reader033/viewer/2022052411/556a253ad8b42a2f3f8b4d23/html5/thumbnails/6.jpg)
Minko Engine
Develop once, deploy everywhere
The power of native, the reach of the
web
Open source, with enterprise-class
support
“We chose Minko to be the 3D engine in one of our new Flash-based gamesbecause we think it’s a highly professional […] solution in termsof development ecosystem and high performance.”
André Weissflog, Head of Development at
Skyrama 2 by BigPoint
Mobile. Web. Native.
![Page 7: Paris Android LiveCode - Creating cross-platform 3D apps with Minko](https://reader033.fdocuments.in/reader033/viewer/2022052411/556a253ad8b42a2f3f8b4d23/html5/thumbnails/7.jpg)
International Gaming References
![Page 8: Paris Android LiveCode - Creating cross-platform 3D apps with Minko](https://reader033.fdocuments.in/reader033/viewer/2022052411/556a253ad8b42a2f3f8b4d23/html5/thumbnails/8.jpg)
New Game Released: IronForce
Published by EA/Chillingo
http://www.chillingo.com/games/iron-force/
Tank MMORPG
Already available on iOS
Available soon on Android
![Page 9: Paris Android LiveCode - Creating cross-platform 3D apps with Minko](https://reader033.fdocuments.in/reader033/viewer/2022052411/556a253ad8b42a2f3f8b4d23/html5/thumbnails/9.jpg)
New Game Released: IronForce
![Page 10: Paris Android LiveCode - Creating cross-platform 3D apps with Minko](https://reader033.fdocuments.in/reader033/viewer/2022052411/556a253ad8b42a2f3f8b4d23/html5/thumbnails/10.jpg)
Minko VS Unity - Architecture
Unity
Core Library
Mono VM
Application
OS
Minko
Core Framework & Plugins
Lua VM
Application
OS
Native Plugins
JavaScript VM Javascript VM (WIP)
![Page 11: Paris Android LiveCode - Creating cross-platform 3D apps with Minko](https://reader033.fdocuments.in/reader033/viewer/2022052411/556a253ad8b42a2f3f8b4d23/html5/thumbnails/11.jpg)
Minko VS Unity – Open Source
Unity
Core Library
Mono VM
Application
OS
Minko
Core Framework & Plugins
Lua VM
Application
OS
Native Plugins
Javascript VM JavaScript VM (WIP)
![Page 12: Paris Android LiveCode - Creating cross-platform 3D apps with Minko](https://reader033.fdocuments.in/reader033/viewer/2022052411/556a253ad8b42a2f3f8b4d23/html5/thumbnails/12.jpg)
Supported Platforms
Platforms Unity Minko
Windows YES YES
WinRT / Windows 8 UI / Windows Store YES YES
OS X YES YES
Linux Desktop (Ubuntu, SteamOS, TVs…) YES YES
Linux Server NO YES
HTML5 NO YES
iOS YES YES
Android YES YES
Flash Player NO WIP
Windows Phone YES WIP (WP 8.1)
![Page 13: Paris Android LiveCode - Creating cross-platform 3D apps with Minko](https://reader033.fdocuments.in/reader033/viewer/2022052411/556a253ad8b42a2f3f8b4d23/html5/thumbnails/13.jpg)
Minko coming to Windows Phone!
Windows Phone 8.1 only
But all existing Windows
Phones should be supported!
Games have a big success
on the Windows Store.
Windows Store, Downloads per category – Worldwide, Jan. 2014
![Page 14: Paris Android LiveCode - Creating cross-platform 3D apps with Minko](https://reader033.fdocuments.in/reader033/viewer/2022052411/556a253ad8b42a2f3f8b4d23/html5/thumbnails/14.jpg)
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…
Optimized Minko dedicated formats
– Scene, material, texture, geometry…
– Open source (de)serializer
– Extensions (Physics 3D compression, 3D streaming…)
![Page 15: Paris Android LiveCode - Creating cross-platform 3D apps with Minko](https://reader033.fdocuments.in/reader033/viewer/2022052411/556a253ad8b42a2f3f8b4d23/html5/thumbnails/15.jpg)
C++ 2011
Standard, fast, well documented and supported by a vast community
Already fully supported by all major compilers (VS, GCC, LLVM…)
New additions make it closer to what we’re used to with AS3/Javascript
– Closures/lambda functions
– Type inference (instead of dynamic typing)
– Shared pointers
![Page 16: Paris Android LiveCode - Creating cross-platform 3D apps with Minko](https://reader033.fdocuments.in/reader033/viewer/2022052411/556a253ad8b42a2f3f8b4d23/html5/thumbnails/16.jpg)
C++11 Example – Closures
// callback is removed when mouseWheel is set to nullptr
![Page 17: Paris Android LiveCode - Creating cross-platform 3D apps with Minko](https://reader033.fdocuments.in/reader033/viewer/2022052411/556a253ad8b42a2f3f8b4d23/html5/thumbnails/17.jpg)
C++11 Example – Shared pointers
![Page 18: Paris Android LiveCode - Creating cross-platform 3D apps with Minko](https://reader033.fdocuments.in/reader033/viewer/2022052411/556a253ad8b42a2f3f8b4d23/html5/thumbnails/18.jpg)
Components – Ex: Directional Light
The Transform component is not mandatory
– Scene nodes do not necessarily have a 3D transform: lighter and more customizable
– Yet our directional light is pointless without a configurable direction…
![Page 19: Paris Android LiveCode - Creating cross-platform 3D apps with Minko](https://reader033.fdocuments.in/reader033/viewer/2022052411/556a253ad8b42a2f3f8b4d23/html5/thumbnails/19.jpg)
Components – Ex: Camera
Our camera has 3 components:
– Transform will make our Camera position/orientation customizable
– PerspectiveCamera will provide actual camera related data to the rendering
API
– Renderer will do the actual DrawCall storage/frame rendering
![Page 20: Paris Android LiveCode - Creating cross-platform 3D apps with Minko](https://reader033.fdocuments.in/reader033/viewer/2022052411/556a253ad8b42a2f3f8b4d23/html5/thumbnails/20.jpg)
Emscripten https://github.com/kripken/emscripten
Open source project driven by Mozilla
– Based on LLVM, which is supported by Google, Apple, Intel and many more
Cross-compile C++ code to Javascript code
– Binds OpenGL to WebGL
– Provide virtual file system
– C++ Javascript bindings
Code optimizations
– Closure compiler
– asm.js (2x performances of native code!)
Code compression using LZMA
![Page 21: Paris Android LiveCode - Creating cross-platform 3D apps with Minko](https://reader033.fdocuments.in/reader033/viewer/2022052411/556a253ad8b42a2f3f8b4d23/html5/thumbnails/21.jpg)
Premake http://industriousone.com/premake
Cross-platform build system
– Windows, Mac and Linux
– Reference in the video game industry
– Well documented
Compatible with most IDEs/tools
– gmake
– Visual Studio
– XCode
Easy to extend and customize
– Based on LUA script configuration files
– Adding support for emscripten was easy
![Page 22: Paris Android LiveCode - Creating cross-platform 3D apps with Minko](https://reader033.fdocuments.in/reader033/viewer/2022052411/556a253ad8b42a2f3f8b4d23/html5/thumbnails/22.jpg)
HTML5 UI (WIP)
Portable
– Chromium on desktop
– WebView on mobiles
– <iframe> on the web
Responsive UI design
Leverage existing HTML5 tools and
frameworks
Video
Native 3D backbuffer
HTML5 UI overlay
![Page 23: Paris Android LiveCode - Creating cross-platform 3D apps with Minko](https://reader033.fdocuments.in/reader033/viewer/2022052411/556a253ad8b42a2f3f8b4d23/html5/thumbnails/23.jpg)
Parallelization
Workers
Threads (except for HTML5)
Coroutines (Lua)
![Page 24: Paris Android LiveCode - Creating cross-platform 3D apps with Minko](https://reader033.fdocuments.in/reader033/viewer/2022052411/556a253ad8b42a2f3f8b4d23/html5/thumbnails/24.jpg)
SCRIPTING
![Page 25: Paris Android LiveCode - Creating cross-platform 3D apps with Minko](https://reader033.fdocuments.in/reader033/viewer/2022052411/556a253ad8b42a2f3f8b4d23/html5/thumbnails/25.jpg)
Core Framework Language Fast
Rich & expressive
Optimized for each target
Scripting Language Simple
Interpreted
Dynamic
VSC, C++, Java, C#... Javascript, Python, AS3…
![Page 26: Paris Android LiveCode - Creating cross-platform 3D apps with Minko](https://reader033.fdocuments.in/reader033/viewer/2022052411/556a253ad8b42a2f3f8b4d23/html5/thumbnails/26.jpg)
We chose… Lua!
Fits all the requirements of a scripting language
Vastly used by the video game industry (World of Warcraft, Fable II & III, NeverwinterNights, …)– 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!
![Page 27: Paris Android LiveCode - Creating cross-platform 3D apps with Minko](https://reader033.fdocuments.in/reader033/viewer/2022052411/556a253ad8b42a2f3f8b4d23/html5/thumbnails/27.jpg)
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
![Page 28: Paris Android LiveCode - Creating cross-platform 3D apps with Minko](https://reader033.fdocuments.in/reader033/viewer/2022052411/556a253ad8b42a2f3f8b4d23/html5/thumbnails/28.jpg)
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
![Page 29: Paris Android LiveCode - Creating cross-platform 3D apps with Minko](https://reader033.fdocuments.in/reader033/viewer/2022052411/556a253ad8b42a2f3f8b4d23/html5/thumbnails/29.jpg)
Coroutines
function myScript()
doSomething()
while isIdle do
say(‘hello how are you?’)
wait(seconds(3))
end
while not isIdle do
wait(keyboard.anyKeyDown)
handleKeyboard()
end
end
![Page 30: Paris Android LiveCode - Creating cross-platform 3D apps with Minko](https://reader033.fdocuments.in/reader033/viewer/2022052411/556a253ad8b42a2f3f8b4d23/html5/thumbnails/30.jpg)
![Page 31: Paris Android LiveCode - Creating cross-platform 3D apps with Minko](https://reader033.fdocuments.in/reader033/viewer/2022052411/556a253ad8b42a2f3f8b4d23/html5/thumbnails/31.jpg)
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
![Page 32: Paris Android LiveCode - Creating cross-platform 3D apps with Minko](https://reader033.fdocuments.in/reader033/viewer/2022052411/556a253ad8b42a2f3f8b4d23/html5/thumbnails/32.jpg)
You choose!
C++
– Performances
– Rich and powerful language
Lua
– Simple and efficient
– Fast iteration times
Mix both in any project on any target
![Page 33: Paris Android LiveCode - Creating cross-platform 3D apps with Minko](https://reader033.fdocuments.in/reader033/viewer/2022052411/556a253ad8b42a2f3f8b4d23/html5/thumbnails/33.jpg)
Ready?
SoccerPunch (soccerpun.ch) coming to HTML5 and native iOS / Android!
![Page 34: Paris Android LiveCode - Creating cross-platform 3D apps with Minko](https://reader033.fdocuments.in/reader033/viewer/2022052411/556a253ad8b42a2f3f8b4d23/html5/thumbnails/34.jpg)
About SoccerPunch
Lots of important game-related features– 3D graphics– Physics– Animations– AI– Gamepad– …
Developped in 2 days using Minko 2 and AS3– Entirely re-developed in C++/Lua
Should be one of the most advancedWebGL game so far– Then we can juge whether HTLM5 is ready or
not for games
![Page 35: Paris Android LiveCode - Creating cross-platform 3D apps with Minko](https://reader033.fdocuments.in/reader033/viewer/2022052411/556a253ad8b42a2f3f8b4d23/html5/thumbnails/35.jpg)
Conclusion
Open source
– More than 20 FLOSS projects used
– 1 million lines of code
Second beta in May
– New targets
– Stability / performance
– New example projects
![Page 36: Paris Android LiveCode - Creating cross-platform 3D apps with Minko](https://reader033.fdocuments.in/reader033/viewer/2022052411/556a253ad8b42a2f3f8b4d23/html5/thumbnails/36.jpg)
THANK YOU!
![Page 37: Paris Android LiveCode - Creating cross-platform 3D apps with Minko](https://reader033.fdocuments.in/reader033/viewer/2022052411/556a253ad8b42a2f3f8b4d23/html5/thumbnails/37.jpg)
Aerys USInstitut Mines-Télécom Silicon Valley
NASA Research Park
Moffett Field
CA 94035 Mountain View
USA
Aerys Europe15 rue Jean-Baptiste Berlier
Hall B
75013 Paris
France
Customer service
+33 805 690 489Monday to Friday, from 9:00 to 17:00 UTC
http://aerys.in
Jean-Marc Le Roux
CEO
+336 20 56 45 78
Warren Seine
CTO
+336 79 51 64 66
Ymane Amrane
Sales Manager
+339 72 28 55 83
![Page 38: Paris Android LiveCode - Creating cross-platform 3D apps with Minko](https://reader033.fdocuments.in/reader033/viewer/2022052411/556a253ad8b42a2f3f8b4d23/html5/thumbnails/38.jpg)
http://minko.io