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.
- USB or Wireless Gamepad:
Left joystickto steer,
[almost] any buttonfor throttle
➡️) to steer,
⬇️) for throttle
Tilt sensorto steer,
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.
The following list of platforms have been tested. Others may (or may not!) work.
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:
This will create a distro file in
build/index.zip. 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.
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.