Thanks to the ever increasing browser penetration of WebGL we’re seeing more and more games and demos that take advantage of it. One such demo that caught my eye a while ago was HexGL – a futuristic, fast-paced racing game developed with JavaScript and three.js. If you haven’t played it then check it out or watch the video below.

It was developed in just under two months by student Thibaut Despoulain. Thubaut very generously made the source code available on GitHub and also presented at the Adobe User Group NL meet-up, where he dived into the making of HexGL.

AUG talk about HexGL

One thing I noticed while scanning over the source (and confirmed in his video) was just how simple he’s kept things. Rather than using a physics engine for collision detection, Thibaut has instead gone with a simple collision map that lets him know when the player’s ship has hit a barrier. He’s done the same when determining the ship’s position on the game’s undulating circuit: looking up height information that’s been stored within a bitmap.

Impressive stuff.