Trigger Rally – online edition

Trigger Rally is a fast-paced open source racing game for Linux, maintained by a small but dedicated team of developers. The game itself adheres to the same open principals as the operating system it was originally built for, using creatively licensed art, audio and 3D assets. And it’s now available to play online through this WebGL port by jareiko.

WebGL and Three.JS power the graphics. A 1024×1024 sky box surrounds the scene and the level and car model data is pulled in using the Three.JS json format. Level maps are interesting, using a combination of a height map to generate the level geometry, a color map combined with an external texture to paint the land, and foliage and checkpoint maps for details. This means you can create your own rally map using nothing more than a paint package. Perhaps one could even be built into the online version, then you could draw your own map and race on it!

The car engine noises are generated using the Web Audio API. A standard engine loop is pitch-shifted in real-time during play to tie in with the acceleration of the car. It’s a simple process but works remarkably well.

Driving physics routines have been converted to JavaScript from the original C code but the author has stated a desire to port it over to the bullet / ammo.js physics engine. It does feel a little like driving on glass at the moment, but for a first conversion and with such an easy way to create content it has a promising future ahead.

Play Trigger Rally online or follow @triggerrally on Twitter.