Réaliser un jeu cross plateformes avec WebGL et babylon.js
David Catuhe

David Rousset

Windows Clients Evangelist Lead

Windows Clients Evangelist

http://aka.ms/david
@deltakosh

http://aka.ms/davrous
@davrous
Agenda
 Why building a WebGL 3D engine ?
 The old school way: Using the 2D canvas
 Using WebGL directly

 Using Babylon.js to create 3D apps and games
 How to use Babylon.js?
 Advanced features

 What we’ve learned…
 Tracking and reducing the pressure on garbage collector
 Performance first
 Handling touch devices

 Lastest experiment
 Building a Windows Store Apps in an hour
 Roadmap
Why building a WebGL 3D engine ?
The oldschool way: using 2D canvas
Build a 3D “Software” engine that only uses the CPU

Wireframe

Rasterization

Lights &
Shadows

Textures
Réaliser un jeu cross plateformes avec WebGL et babylon.js
Using WebGL directly
Requires a compatible browser:

A new context for the canvas:
canvas.getContext("webgl", { antialias: true}) ||
canvas.getContext("experimental-webgl", { antialias: true});
Using WebGL directly
WebGL is a low level API
Need to handle everything
except the rendering:






Shaders code (loading, compilation)
Geometry creation, topology, transfer
Shaders variables management
Texture and resources management
Render loop
Réaliser un jeu cross plateformes avec WebGL et babylon.js
Using Babylon.js to create 3D apps & games
How to use Babylon.js ?
Open source project (Available on Github)

http://www.babylonjs.com
https://github.com/babylonjs/babylon.js
How to use it? Include one file and you’re ready to go!

<script src="babylon.js"></script>
To start Babylon.js, you’ve just need to create an engine object:

var engine = new BABYLON.Engine(canvas, true);
Advanced features
Blender exporter

Offline support

Design & render

IndexedDB

Complete collisions
engine

Network optimizations
Incremental loading
Réaliser un jeu cross plateformes avec WebGL et babylon.js
What we’ve learned ?
Tracking & reducing the pressure on GC
A 3D engine is a place where matrices, vectors and quaternions live.
And there may be tons of them!

Pressure is huge on the garbage collector
Tracking & reducing the pressure on GC
Maximum reuse of mathematical entities
 Pre-instantiate
 Stock variables
GC friendly arrays (able to reset size at no cost)

When the scene is up and running, aiming at no allocation at all
Réaliser un jeu cross plateformes avec WebGL et babylon.js
Performance first
Efficient shaders
Do only what is REALLY required

Scene partitioning
Frustum / submeshes / octrees

Complete cache system
Update WebGL only when
required
Handling touch devices
Réaliser un jeu cross plateformes avec WebGL et babylon.js
Latest experiments
Réaliser un jeu cross plateformes avec WebGL et babylon.js
Roadmap








Lens flares
Multi-views to add support for Oculus Rift
Simple Editor
Sandbox mode / Drag'n'drop support
Support for a physic engine
Collisions on webworkers
Binary file format
@deltakosh / @davrous

More Related Content

PDF
Minko - Windows App Meetup Nov. 2013
PDF
Paris Android User Group - Build 3D web, mobile and desktop applications with...
PPTX
Html5 (games)
PDF
GreenButton-201502
PDF
HTML GL - 60 FPS and amazing effects by rendering HTML/CSS in WebGL, framewor...
ODP
Zoomcharts @ DevClub.lv
PPTX
Using babylon js to create apps & games for all web gl devices
PDF
Everyday React Native
Minko - Windows App Meetup Nov. 2013
Paris Android User Group - Build 3D web, mobile and desktop applications with...
Html5 (games)
GreenButton-201502
HTML GL - 60 FPS and amazing effects by rendering HTML/CSS in WebGL, framewor...
Zoomcharts @ DevClub.lv
Using babylon js to create apps & games for all web gl devices
Everyday React Native

What's hot (20)

PDF
Migrating your Web app to Virtual Reality
PDF
HTML GL - возьмите столько FPS, сколько вам нужно!
PDF
Serverless with Google Cloud Functions
PDF
Monitoring at a SAAS Startup: Tradeoffs and Tools
PDF
Software Architecture Stories
PDF
Hands on App Engine
PPTX
Demand driven applications with om.next and react native
PPTX
Google cloud functions
PDF
Vered Flis: Because performance matters! Architecture Next 20
PPTX
Using Google App Engine Python
PDF
Cloud Study Jam - 2019
PPTX
PDF
Power of WebGL (FSTO 2014)
PDF
WebGL in Native Applications
PDF
Dockerize Your Project - GDGBogor
PDF
iOS Indie Developer Toolkit - CocoaHeads 3city
PPTX
10 difference between aws and google cloud by Zareef Ahmed
PPTX
Building Tools for the Hadoop Developer
PDF
e-KTP Information Extraction with Google Cloud Function & Google Cloud Vision
PPTX
Creating autocomplete with elastic search on google cloud
Migrating your Web app to Virtual Reality
HTML GL - возьмите столько FPS, сколько вам нужно!
Serverless with Google Cloud Functions
Monitoring at a SAAS Startup: Tradeoffs and Tools
Software Architecture Stories
Hands on App Engine
Demand driven applications with om.next and react native
Google cloud functions
Vered Flis: Because performance matters! Architecture Next 20
Using Google App Engine Python
Cloud Study Jam - 2019
Power of WebGL (FSTO 2014)
WebGL in Native Applications
Dockerize Your Project - GDGBogor
iOS Indie Developer Toolkit - CocoaHeads 3city
10 difference between aws and google cloud by Zareef Ahmed
Building Tools for the Hadoop Developer
e-KTP Information Extraction with Google Cloud Function & Google Cloud Vision
Creating autocomplete with elastic search on google cloud
Ad

Similar to Réaliser un jeu cross plateformes avec WebGL et babylon.js (20)

PPTX
Creating 3D Worlds with WebGL and Babylon.js - Codemotion.es
PPTX
NGF2014 - Create a 3d game with webgl and babylon.js
PDF
DotNet 2019 | Marcos Cobeña - Llevando Wave Engine a la web a través de WebGL...
PPTX
HTML5DevConf - Unleash the power of 3D with babylon.js
PPTX
Unleash 3D rendering with WebGL and Microsoft Edge
PPTX
Advanced Debugging with Visual Studio 2013 Preview
PDF
Портируем существующее Web-приложение в виртуальную реальность / Денис Радин ...
PPTX
Real World Azure - Dev
PDF
Full Stack React Workshop [CSSC x GDSC]
PDF
Droidcon Paris 2015
PPTX
Frontend Workflow
PPTX
WebGL, HTML5 and How the Mobile Web Was Won
PDF
Yeoman AngularJS and D3 - A solid stack for web apps
PPT
Optimizing Flex Applications
PDF
Usability in the GeoWeb
PDF
Advanced Web Graphics with Canvas
PPT
Rob Tweed :: Ajax and the Impact on Caché and Similar Technologies
PDF
Building a game engine with jQuery
PDF
Where should I run my code? Serverless, Containers, Virtual Machines and more
PDF
Web Apps and more
Creating 3D Worlds with WebGL and Babylon.js - Codemotion.es
NGF2014 - Create a 3d game with webgl and babylon.js
DotNet 2019 | Marcos Cobeña - Llevando Wave Engine a la web a través de WebGL...
HTML5DevConf - Unleash the power of 3D with babylon.js
Unleash 3D rendering with WebGL and Microsoft Edge
Advanced Debugging with Visual Studio 2013 Preview
Портируем существующее Web-приложение в виртуальную реальность / Денис Радин ...
Real World Azure - Dev
Full Stack React Workshop [CSSC x GDSC]
Droidcon Paris 2015
Frontend Workflow
WebGL, HTML5 and How the Mobile Web Was Won
Yeoman AngularJS and D3 - A solid stack for web apps
Optimizing Flex Applications
Usability in the GeoWeb
Advanced Web Graphics with Canvas
Rob Tweed :: Ajax and the Impact on Caché and Similar Technologies
Building a game engine with jQuery
Where should I run my code? Serverless, Containers, Virtual Machines and more
Web Apps and more
Ad

More from davrous (20)

PPTX
Building a cross platforms tower defense game Dev Days 2016
PPTX
Create fun & immersive audio experiences with web audio
PPTX
Nouveautés JavaScript dans le monde Microsoft
PPTX
Unleashing WebGL & WebAudio with babylon.js
PPTX
Introduction à TypeScript et retour d'expérience sur le portage de Babylon.JS
PPTX
Babylon.js WebGL Paris
PPTX
Microsoft et l'Open Source
PPTX
Back from BUILD - WebGL
PPTX
Les défis d’une application mobile multi-périphériques avec HTML5
PPTX
Pointer events
PPTX
L'histoire d'html5 pour les développeurs windows phone 8
PPTX
Introduction au développement windows 8 modern ui avec html5 et javascript
PPTX
Les dernières avancées html5 & css3 en action !
PPTX
W3 cafe ie10etwindows8
PPTX
Création d'une application html5 utilisant canvas, svg et les animations css3
PPTX
Création d’une application gérant l’offline et le stockage
PPTX
Nouveautés html5 et css3 dans internet explorer 10
PPTX
Webinar HTML5 Microsoft Intel
PPTX
Développement d'un jeu de plateforme en html5
PPTX
AMDEV: Graphismes avec html5 grâce à canvas et svg
Building a cross platforms tower defense game Dev Days 2016
Create fun & immersive audio experiences with web audio
Nouveautés JavaScript dans le monde Microsoft
Unleashing WebGL & WebAudio with babylon.js
Introduction à TypeScript et retour d'expérience sur le portage de Babylon.JS
Babylon.js WebGL Paris
Microsoft et l'Open Source
Back from BUILD - WebGL
Les défis d’une application mobile multi-périphériques avec HTML5
Pointer events
L'histoire d'html5 pour les développeurs windows phone 8
Introduction au développement windows 8 modern ui avec html5 et javascript
Les dernières avancées html5 & css3 en action !
W3 cafe ie10etwindows8
Création d'une application html5 utilisant canvas, svg et les animations css3
Création d’une application gérant l’offline et le stockage
Nouveautés html5 et css3 dans internet explorer 10
Webinar HTML5 Microsoft Intel
Développement d'un jeu de plateforme en html5
AMDEV: Graphismes avec html5 grâce à canvas et svg

Recently uploaded (20)

PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PDF
Architecture types and enterprise applications.pdf
PDF
Convolutional neural network based encoder-decoder for efficient real-time ob...
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
The influence of sentiment analysis in enhancing early warning system model f...
PDF
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
PPTX
Custom Battery Pack Design Considerations for Performance and Safety
PPT
Module 1.ppt Iot fundamentals and Architecture
PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
sbt 2.0: go big (Scala Days 2025 edition)
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PPT
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
PDF
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
PDF
STKI Israel Market Study 2025 version august
PPTX
2018-HIPAA-Renewal-Training for executives
PDF
OpenACC and Open Hackathons Monthly Highlights July 2025
PPTX
The various Industrial Revolutions .pptx
PPT
What is a Computer? Input Devices /output devices
1 - Historical Antecedents, Social Consideration.pdf
NewMind AI Weekly Chronicles – August ’25 Week III
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
Architecture types and enterprise applications.pdf
Convolutional neural network based encoder-decoder for efficient real-time ob...
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
The influence of sentiment analysis in enhancing early warning system model f...
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
Custom Battery Pack Design Considerations for Performance and Safety
Module 1.ppt Iot fundamentals and Architecture
Hindi spoken digit analysis for native and non-native speakers
sbt 2.0: go big (Scala Days 2025 edition)
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
STKI Israel Market Study 2025 version august
2018-HIPAA-Renewal-Training for executives
OpenACC and Open Hackathons Monthly Highlights July 2025
The various Industrial Revolutions .pptx
What is a Computer? Input Devices /output devices

Réaliser un jeu cross plateformes avec WebGL et babylon.js

  • 2. David Catuhe David Rousset Windows Clients Evangelist Lead Windows Clients Evangelist http://aka.ms/david @deltakosh http://aka.ms/davrous @davrous
  • 3. Agenda  Why building a WebGL 3D engine ?  The old school way: Using the 2D canvas  Using WebGL directly  Using Babylon.js to create 3D apps and games  How to use Babylon.js?  Advanced features  What we’ve learned…  Tracking and reducing the pressure on garbage collector  Performance first  Handling touch devices  Lastest experiment  Building a Windows Store Apps in an hour  Roadmap
  • 4. Why building a WebGL 3D engine ?
  • 5. The oldschool way: using 2D canvas Build a 3D “Software” engine that only uses the CPU Wireframe Rasterization Lights & Shadows Textures
  • 7. Using WebGL directly Requires a compatible browser: A new context for the canvas: canvas.getContext("webgl", { antialias: true}) || canvas.getContext("experimental-webgl", { antialias: true});
  • 8. Using WebGL directly WebGL is a low level API Need to handle everything except the rendering:      Shaders code (loading, compilation) Geometry creation, topology, transfer Shaders variables management Texture and resources management Render loop
  • 10. Using Babylon.js to create 3D apps & games
  • 11. How to use Babylon.js ? Open source project (Available on Github) http://www.babylonjs.com https://github.com/babylonjs/babylon.js How to use it? Include one file and you’re ready to go! <script src="babylon.js"></script> To start Babylon.js, you’ve just need to create an engine object: var engine = new BABYLON.Engine(canvas, true);
  • 12. Advanced features Blender exporter Offline support Design & render IndexedDB Complete collisions engine Network optimizations Incremental loading
  • 15. Tracking & reducing the pressure on GC A 3D engine is a place where matrices, vectors and quaternions live. And there may be tons of them! Pressure is huge on the garbage collector
  • 16. Tracking & reducing the pressure on GC Maximum reuse of mathematical entities  Pre-instantiate  Stock variables GC friendly arrays (able to reset size at no cost) When the scene is up and running, aiming at no allocation at all
  • 18. Performance first Efficient shaders Do only what is REALLY required Scene partitioning Frustum / submeshes / octrees Complete cache system Update WebGL only when required
  • 23. Roadmap        Lens flares Multi-views to add support for Oculus Rift Simple Editor Sandbox mode / Drag'n'drop support Support for a physic engine Collisions on webworkers Binary file format

Editor's Notes

  • #4: Davrous/davca/davrous
  • #5: Davrous – 4’’
  • #6: davrous
  • #7: Davrous – 10’’
  • #8: davca
  • #9: davca
  • #10: Davca – 20’’
  • #15: davca
  • #18: Davca – 40’’ (demoresponsiveness / profiler)
  • #22: Davrous – 4’’