Minko - Windows App Meetup Nov. 2013

24
#WindowsApps – Nov. 2013 Build 3D web and desktop applications with C++11 Jean-Marc Le Roux CEO and co-founder of Aerys [email protected] @promethe42

Transcript of Minko - Windows App Meetup Nov. 2013

Page 1: Minko - Windows App Meetup Nov. 2013

#WindowsApps – Nov. 2013 Build 3D web and desktop applications with C++11

Jean-Marc Le Roux CEO and co-founder of Aerys [email protected] @promethe42

Page 2: Minko - Windows App Meetup Nov. 2013

Join!

WebGL France http://www.meetup.com/WebGL-France

@WebGLFrance

Page 3: Minko - Windows App Meetup Nov. 2013

by

Page 4: Minko - Windows App Meetup Nov. 2013

3D. Everywhere. Deliver engaging, interactive and rich 3D content and applications on

desktops, mobiles and the web.

Page 5: Minko - Windows App Meetup Nov. 2013

Focus on design. Boost with code. Minko « Studio » Edition

Designers integrate 3D content, customize materials, setup lights and animations. Developers plug in scripts and interactivity.

Page 6: Minko - Windows App Meetup Nov. 2013

The sky is the limit. Minko « Community » Edition

Build desktop, web and mobile 3D applications with Minko’s free and open source SDK including

a fully-featured 3D engine and plugins.

Page 7: Minko - Windows App Meetup Nov. 2013

IronForce (EA/Coolfish)

Page 8: Minko - Windows App Meetup Nov. 2013

« We chose Minko to be the 3D engine in one of our new Flash-based games because we think it’s a highly professional solution in terms of

development ecosystem and high performance. »

André Weissflog, Head of Development at BigPoint

Page 9: Minko - Windows App Meetup Nov. 2013

Features 100% compatible with Windows, Mac,

Linux, iOS, Android and WebGL

WYSIWYG Scene editor

3D scene graph API

Components & scripts system

Physics (Bullet)

Data-driven rendering engine

80+ 2D/3D file formats supported

Dynamic assets loading

Über-shaders

3D compression, simplification and streaming

Plugin system (Oculus, Leap, ….)

Particles engine

Page 10: Minko - Windows App Meetup Nov. 2013

3D apps are usually bigger/more complex projects Bigger teams Bigger expectations Complex assets workflow

C++ is more expressive and brings some specific optimizations

Static typing, templates Inlining Low level memory management (no GC) …

C++ can be used on any platforms (Windows, Mac, Linux, iOS, Android, Flash, Windows

Phone…)

« Anything that can be done with JavaScript will be done in Javascript » Well anything that can be done has already been done in C++ so…

Why?

Page 11: Minko - Windows App Meetup Nov. 2013

Targeting HTML5/WebGL

Page 12: Minko - Windows App Meetup Nov. 2013

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 Javascript – Closures/lambda functions – Type inference (instead of dynamic typing) – Shared pointers (instead of GC)

Page 13: Minko - Windows App Meetup Nov. 2013

C++11 Example – Closures

// callback is removed when mouseWheel is set to nullptr

Page 14: Minko - Windows App Meetup Nov. 2013

C++11 Example – Shared pointers

Page 15: Minko - Windows App Meetup Nov. 2013

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

– LLVM and C++ specific optimizations – Closure compiler – asm.js (2x performances of native code!)

Code compression using LZMA

Page 16: Minko - Windows App Meetup Nov. 2013

ASM.js –Benchmarks

Source: http://kripken.github.io/mloc_emscripten_talk/#/28

Page 17: Minko - Windows App Meetup Nov. 2013

EXAMPLE: SPONZA HTML5! http://minko.io/showcase/sponza-html5

Page 18: Minko - Windows App Meetup Nov. 2013

TARGETING WINDOWS/DIRECTX

Page 19: Minko - Windows App Meetup Nov. 2013

ANGLE https://code.google.com/p/angleproject/

Almost Native Graphics Layer Engine

Open source project driven by Google – Used by Chrome and Firefox WebGL implementations

OpenGL wrapper that will map OGL calls to the DirectX API

– Provide better performances on Windows – Makes it possible to target DirectX with an OpenGL based implementation – Should provide Windows Phone 8 compatibility out of the box

Also converts GLSL shaders to HLSL

– Completely transparent to the developer! – Write once, deploy everywhere

Supports DirectX 11

– Compatible with the Windows 8.1 App Store

Page 20: Minko - Windows App Meetup Nov. 2013

Conclusion

Page 21: Minko - Windows App Meetup Nov. 2013

My Feedback – The Good Parts Working with C++ 2011 is amazing

More complex but so much powerful/expressive than AS3/JS Useful and reliable STL containers (list, maps, sets, etc…) Shared pointers make memory management just as easy as with managed

languages: not a single memory leak so far! Visual Studio/XCode are very good IDEs

Minko 3’s implementation is much lighter and yet just as much

powerful Vagrant + Premake provides an efficient build system with cross-

compilation

Page 22: Minko - Windows App Meetup Nov. 2013

My Feedback – The Good Parts

Compatibility The app runs on Windows, Mac, Linux, iOS, Android and WebGL

withouth a single modification! Haven’t tested iOS/Android yet, but should work out of the box

Speed Native speed on Windows, Mac, Linux, iOS and Android 2x speed of native code in HTML5/WebGL thanks to asm.js!

Target DirectX 11 thanks to ANGLE Direct push on the Windows 8.1 App Store

Page 23: Minko - Windows App Meetup Nov. 2013

My Feedback – The Bad Parts

RAM consumption for HTML5/WebGL apps x-compiled with emscripten Will likely improve with every new release

Not yet compatible with the Windows Phone 8 App Store Forbidden to use the « online » HLSL compiler for mobile apps

Page 24: Minko - Windows App Meetup Nov. 2013

Merci !

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