Start
DiStraction
javascript driving game demo
DiStraction is a JavaScript/WebGL demo that will let you play with a DS3 in a very simplified world. Of course, it requires a (somewhat) recent browser to support WebGL, and a graphics card... Contact regarding this demo: I am Lerige at Babylon.js forum
How to play
You can choose to drive freely, or try to catch all the checkpoints scattered over the map as fast as possible.The keys to control the car:
- Use the arrow keys to accelerate, brake and turn.
- Use "shift" to toggle forward/reverse gear. Your speed should be enough low.
- Use "space" to go back to the starting place (in case you are stuck somewhere). Your speed should be enough low.
- Use "escape" to leave the game.
Resources and credits
This demo has been made with free tools and resources.
API and code
The 3D library is Babylon.js written by David Catuhe, David Rousset and plenty of other developers.
The physics engine Cannon.js is by Stefan Hedman.
For the tree generator, I've reused Julian Chenard excellent code at pixelcodr.com.
Some UI elements are made with iCheck and FPSMeter.
3D models
The car is a Citroën DS3 from archive3d.net.
Paris significant buildings come from references3d.com website:
Tools
Extra buildings and ground have been made with Blender.
Sky and ground textures were designed with Gimp.
Finally, the code was written with Brackets.