DELTA-V

How it was built. Presented by Rapidity Space.

DELTA-V is a 16-bit management game about running a launch company from a shed towards Mars. The whole game is one HTML file. There is no game engine, no library, no image file, no sound file and no font file in it: every pixel, glyph and note is produced by code in that file.

770 kBone file, about a third of that on the wire
16.7klines of game code
10.1klines of test tooling
0external assets
The launch pad at dusk, drawn by the game
The launch site. The buildings are rectangles placed by code, the sky is an ordered dither between palette entries, and the stars are a seeded point set.

01The stack

The game is written in plain JavaScript: ES modules, no TypeScript, no framework, no engine and no runtime library of any kind. Nothing from npm is in the shipped file. It runs on what a browser already has:

LanguageModern JavaScript, 19 ES modules, about 16.7k lines
GraphicsCanvas 2D, used only to put one finished frame on screen: putImageData from a Uint8Array framebuffer through a Uint32Array colour table
SoundWeb Audio API: oscillators with custom PeriodicWave pulse shapes, noise buffers, biquad filters and a feedback delay
TimingrequestAnimationFrame for the frame, a look-ahead scheduler on the audio clock for the music
StoragelocalStorage for saves and settings
Other browser APIsTouch events, Fullscreen, Screen Wake Lock, Web Share, and Web Crypto (SHA-256) on the draw page
BuildA 183-line Node.js script of our own that joins the modules into the one HTML file. No bundler, no transpiler, no minifier

The tooling beside the game is allowed dependencies, because none of it ships:

Test harnessesNode.js, about 8.7k lines, driving real Chromium through Playwright
Art and document toolsPython with Pillow, about 1.4k lines: packs the text sprites and the font into the build
QR checkjsQR, to read back the codes the game generates

02The renderer

The screen is a fixed 480 x 270 buffer of palette indices, one byte a pixel, not colours. There are 56 colours and the buffer cannot hold anything else, so an off-palette pixel is not a style rule that someone has to remember: it is unrepresentable. Once a frame the buffer is converted to RGBA through a lookup table and scaled to the display without smoothing.

The interface is drawn the same way, pixel by pixel, in immediate mode: there is no DOM and no CSS inside the game. Text uses one hand-authored 5 x 8 bitmap font of 107 glyphs.

03Art is source code

Sprites are text. Each one is a grid of characters in the repository, one character a pixel, and a build step packs them into the file:

.......a.......
......9a9......
.....89a98.....
....789a987....
....7d9a9d7....

Anything that is mathematics is computed instead of drawn: planets are spheres lit per pixel, starfields and terrain scatter are hashed, gradients are dithered with a 4 x 4 Bayer matrix, exhaust is particles. The cinematics are a 1x world framed by a 2x camera, with the sky painted separately at screen scale so its dither stays one pixel fine.

A rocket climbing through cloud layers
Ascent. The atmosphere is a band of fixed height pinned to the ground; cloud decks sit at fixed altitudes and are overtaken; the speed lines lengthen with velocity.

04Sound

There are no audio files. Every effect and all seven soundtracks are synthesised at run time with the Web Audio API from pulse waves and filtered noise. A soundtrack is three tables of note numbers (bass, chords, lead) and a tempo. The stand edition's theme speeds up by an eighth in the last minute of a session.

05The simulation

The game's model is a pure module: no screen, no timers, no browser. One tick is one week. All randomness comes from a seeded generator kept in the game state, so a seed replays identically.

That purity is what makes the game testable at scale. Balance is not tuned by feel: the model is played headlessly, thousands of runs at a time, by scripted players. The eight-minute stand edition is its own ruleset on the same engine, and it is checked by simulating visitors with realistic reaction times: an ordinary visitor's first launch comes at about 36 seconds, and roughly one in three reaches the Moon.

06Tests that look and listen

There are 40 tools beside the game, most of them harnesses that drive a real browser. Each one exists because of a defect that could not be seen in a terminal. A few of them:

• every screen is staged and each piece of text is checked for overflow and for contrast against the pixels actually behind it;
• the palette is run through three kinds of colour blindness, and any state told by colour alone fails;
• a finger is simulated: taps, drags, a held press, a phone turned sideways;
• the soundtracks are rendered offline and checked for notes out of key and for clipping;
• thousands of random clicks look for a way to crash the interface.

The stand edition's launch screen
The stand edition: three tabs, one goal in large letters, and a bar that always says what to do next. The simulated visitors play by exactly what that bar says.

07Phones

The game is always landscape. On a phone held upright the canvas itself is turned a quarter and the touches are mapped back, so it fills the screen even with the rotation lock on. A finger held still raises a 2x magnifier, because 480 pixels across a five-inch screen makes small text.

08QR codes

The QR codes are made by the game as well. A QR code is Reed-Solomon arithmetic over GF(256) laid into a square: about 230 lines of JavaScript, with no library. Every code is read back by a real decoder in the tests, including the printed one with a logo over its centre.

09The prize draw

The prizes are drawn at random among the best shared scores, in a way anyone can check. The list of entries is frozen at the close and published with its SHA-256. The randomness is one round of drand, a public beacon, and which round is fixed in advance. The winner is SHA-256(listHash:randomness:k) mod n. The draw page runs it live in your browser and prints a few lines of Python that repeat it.

PLAY DELTA-V THE PRIZE DRAW LEADERBOARD RULES