Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

It's a Lovely Day for a Drive

A ridiculous js13k-2015 game.

"It's like Desert Bus. Only worse."

~ Said No One Ever


Lovely Drive pays homage to Desert Bus. You are a driver on a lonely desert highway with nothing but the wind rushing by and your chill tunes on the radio. Unfortunately, your transmission is stuck in reverse. But that won't stop you from enjoying this lovely day...

Consider: the theme for js13k-2015 is "Reversed". If Desert Bus was the worst game ever made, and Lovely Drive is Desert Bus in reverse, then by that logic Lovely Drive is the best game ever made.

Desktop screenshot


  • USB or Wireless Gamepad: Left joystick to steer, [almost] any button for throttle
  • Keyboard: A (⬅️) and D (➡️) to steer, S (⬇️) for throttle
  • Mobile: Tilt sensor to steer, tap/hold for throttle


Use a gamepad for the best possible experience. Beware that not all gamepads will have the "standard" button mapping in all browsers. (Tested with a PS3 controller on Chrome and Firefox)

There are known limitations with calibrating the mobile steering. Your best bet might be to calibrate your body (spin around while tapping slowly until the car stops turning). When you are in a good location, the tilt sensor will let you drive as if your mobile device is the steering wheel.

Supported Platforms

The following list of platforms have been tested. Others may (or may not!) work.

  • Chrome
  • Firefox
  • Safari
  • iOS
  • Android

iPhone 4S screenshot

Important Note

This game can take several minutes to load, especially on low power mobile platforms. Please be patient, and enjoy the ride!


Install development environment:

$ npm install

Build the distro:

$ grunt

This will create a distro file in build/ The goal is for this file to be exactly 13,312 bytes or less.


Read the postmortem for an in-depth review of how this game was designed.

Size Optimized

The code is intended to be sized optimized, which means it will generally run slower than its full potential. Some of the optimizations are outlined below.

  • Inline everything (a single, self-contained html file)
  • Minify all the things! (Mostly strip whitespace and comments)
  • Prefer duplicate code over reusable functions (better zip compression)
  • Code order matters (try to reduce entropy)
  • Sometimes more is less (use eg. vec4 everywhere instead of multiple data types, even smaller sizes)

WebGL and WebAudio

That's it folks! That's the secret. Just use WebGL and WebAudio. All of your dreams will come true.


Uses the diamond-square algorithm extensively to create 2D fractals. These fractals generate the mountains, clouds, asphalt textures, and even the winding road.

Diamond-square is combined with different noise generators (white noise and pink noise) to give an infinite variety of results.

Third-Party Libraries