ExperimentsFable 5.2 Retro Games

The game has the keyboard when this page opens. If the keys stop working, click or tap the game. On a phone, Play full screen gives the game the whole screen.

  • Original title: Draft Descent
  • Inspired by: the Lunar Lander genre (bring a craft down on a pad with limited fuel)
  • File: games/09-draft-descent/index.html (one self-contained file, no network requests)
  • Built by: Job C, 2026-11-14

What I built

A lander falls toward rough ground. You tilt it and burn the engine to slow it down. The engine pushes along the body of the lander, so a tilt also moves the lander sideways. A landing counts only when all of these are true: both feet are on a pad, the descent speed is 28 or less, the sideways speed is 14 or less, and the tilt is less than about 11 degrees. Any other contact with the ground is a crash, and the game tells you which rule you broke.

The landing problem:

  • Fuel is one tank for the whole game. A burn uses 10 units each second. A landing gives 40 units back (the tank holds 100). With an empty tank the engine does nothing.
  • Gravity grows with each sheet (from 2.0 to 3.2 on the title block).
  • Pads. Each sheet has three pads. The narrow pads pay more (×2, ×3, ×5). From sheet 2, the best pad sits in a pit with walls.
  • Wind from sheet 2. It changes in strength. The readout shows its direction and strength, and streaks cross the sky.
  • Spires from sheet 2: sharp peaks in the ground.
  • Steam vents from sheet 3. A vent blinks a warning and then throws the lander upward and makes it spin.
  • Three landers. A crash costs one lander. The game ends when none is left.

Help for the player:

  • A dotted fall line shows where the lander will come down if you do not burn again. It includes the wind.
  • A dimension line next to the lander shows the height above the ground, as on a drawing.
  • A speed arrow points where the lander is going. It changes to the warning colour when the speed is not safe for a landing.
  • The readout table shows height, descent speed, sideways speed, tilt, fuel, and wind. A value that is not safe is shown in the warning colour.

Score for a landing: (100 + a bonus up to 100 for a soft touch) × the pad number, plus the fuel that is left.

Controls: Left and Right tilt, Up or Space burns. On touch there are three buttons (tilt left, tilt right, BURN). You can also hold a thumb on the drawing to burn and slide it sideways to tilt. After a landing, any control skips to the next sheet.

The start screen plays itself: a simple pilot flies to the widest pad and lands. It does not score and makes no sound.

Looks

  1. Vellum Draft (main). Drafting vellum with a faint printed grid, a sheet border with zone letters, and a title block that shows the sheet number and gravity. The ground is a cut section with 45-degree hatching. Each pad has a blue centre line, a width dimension, and a numbered balloon. The lander is a pencil drawing whose lines move slightly. The flame is a red and orange pencil scribble. The exhaust leaves a graphite smudge on the ground. A crash leaves a red pencil X that stays on the sheet for the next try. A landing gets an APPROVED stamp, and a crash gets a REVISE stamp.
  2. Desert Poster. A flat screen-printed poster: bands of sky, a large pale sun, mesas, cactus shapes, and print grain. The lander is a small cream and red rocket with fins. The pads are striped platforms.
  3. Thermal Scan. A false-colour heat camera. The ground is cold purple with warm patches, the pads glow, and a temperature scale sits at the side. The engine is white-hot. The exhaust heats the air and the ground, and the heat fades slowly, so you can see where you burned.

Techniques

  • All art is drawn by code on a canvas. No images.
  • The physics is simple and honest: gravity, wind, and engine push are added to the speed each frame. Five points on the lander (two feet, two shoulders, the top) are tested against the ground line.
  • The ground is 61 heights from a seeded generator (three sine waves plus noise, then spires, then flat pads). The seed means the same ground can be drawn again when the screen changes shape.
  • The still background (paper, ground, pads, title block) is painted one time for each sheet on a hidden canvas at the real screen resolution.
  • A second hidden canvas keeps marks that stay: graphite smudges and crash marks in the vellum look, and heat in the thermal look. The heat is faded a little several times each second.
  • The fall line is a small forward simulation of 5 seconds, run each frame.
  • Sound is generated with the Web Audio API: short bursts of filtered noise for the engine, a low-fuel beep, a three-note chime for a landing.

What I am proud of

The drawing tools are the instruments. The height dimension, the centre lines, the dash-dot fall line, and the balloons belong on an engineering sheet, and they also tell the player what they need to know. The crash marks that stay on the sheet make each sheet a record of the attempts.

Known issues

  • The lander is small on a phone (about 20 logical pixels wide on a field 360 wide).
  • The lander cannot tilt past about 86 degrees, so it cannot fly upside down.
  • The sheet edges are soft walls. The lander loses most of its sideways speed there.
  • Marks (smudges, crash marks, heat) are cleared when the look or the window size changes.
  • The start-screen pilot sometimes crashes on rough ground and then tries a new sheet.
  • I did not tune the later sheets (wind, vents, gravity) with human players.

Self-test

Tested with headless Chrome through .tools/selftest.js at 375x667, 740x360, and 1440x900. Result: all checks passed (no console errors, no network requests, start, pause, restart, all three looks, and all buttons and pads inside the screen).

A second scripted test (.tools/t09.js) confirmed the rules: the start-screen pilot lands without scoring, gravity pulls the lander down, a burn lifts it and uses fuel, a key tilts it, a slow and level touch on a pad is a landing that scores and adds fuel, the next sheet follows and has wind, the three kinds of crash give the correct reason and cost one lander each, the last crash ends the game, Enter restarts, an empty tank gives no burn, sheet 3 has a steam vent and a ×3 pad, a hold burns and a slide tilts, a look change keeps the game state, and the field turns tall on a tall window. The same test checks that the top bar, pads, and playfield fit in all three looks at 667x375, 740x360, 844x390, 375x667, and 320x568. Result: pass, three runs in a row.

Issues found and fixed during testing:

  • In the Thermal Scan look on a phone in landscape, the wider font pushed the Restart button off the right edge. The top bar now uses smaller text in that look, and the title is hidden on narrow landscape screens in the Thermal Scan and Desert Poster looks.
  • The paper blotches in the Vellum Draft look were too dark. They are now fainter.
  • Two waits in the test script were too short for headless Chrome. The game was not at fault.