The owner's idea: Hiro on the Raft in a small boat with Reason, the minigun, where shooting is how you steer. Built as a time trial, with pure recoil and no motor, one handmade course for now, and a Snow Crash start screen to hold it with the other three Snow Crash games.
The Raft (/game/raft, lib/raft/). The boat has no motor. Hold fire and Reason's recoil pushes the boat the opposite way from where it points.
- Moving: the boat drifts and slows by itself; bursts nudge it and long holds send it skidding. Two seconds of continuous fire overheats the gun, and you drift until it cools.
- The course: a channel through the lashed hulls of the Raft, with four gates to pass in order, finishing on the Enterprise's deck. Currents help on two legs and fight you on one. Crates block corners and a stretch of the middle channel; they're shortcuts you can shoot through, never the only way.
- Pirates: skiffs wake up as you come near. Boarders grapple onto the hull and drag the boat until you shoot them off, and shooting them pushes you about. Gunners keep their distance and fire slugs that knock the boat sideways.
- Finding the way: an arrow by the boat points along the shortest water route to the next gate, worked out from a distance field over the course.
- Controls: aim with the mouse or a finger and hold to fire; on a keyboard, left and right turn the gun and Space or Up fires.
Courses are data. A course is a grid of characters (# hull, x crate, currents as arrows, gates as digits, F finish, S start, p/q pirates). A handmade course and a seeded one look the same to the game; a generator only has to emit rows that pass the course test (walled in, one start, every gate reachable in order without breaking a crate, medal times in order). That's the next step, in TODO.md.
Medal times, not records. Nothing is stored. Gold is 40 s, silver 55 s and bronze 80 s. A bot that steers only by recoil, firing against the gap between the velocity it wants and the one it has, finishes in 23–28 s, so these are guesses at what people will manage and want adjusting once someone has played.
The bot found two real problems.
- A slow run stalled against the corner of a crate pocket. The route arrow pointed by compass direction, and the boat's hull overlapped the crate row it was sliding past. The arrow now points at the middle of the next tile and never cuts diagonally past a corner, which fixed the bot and makes the arrow more honest for people too.
- A run that never fired back got hit by a gunner almost every shot. Gunners now aim with a wider wobble, and their hits knock less.
Shell. Engines can take pointer(state, x, y, down): the pointer's position whenever it moves over the screen, and whether a button or finger is down, through press, drag and release (captured, so dragging off the edge still lets go). The Raft's preview needed a pilot that steers by recoil, so previews can now take a game's own driver (lib/raft/bot.ts, which the tests race round the course too).
Snow Crash start screen (/game/snow-crash). Cards for RadiKS, The Street, Librarian and The Raft, each with its live preview, over a field of the novel's static: black and white noise with a rolling bright band and the odd magenta pixel. The title has a cyan and magenta split. One button pauses everything that moves on the page, and the static settles for reduced motion like the other pieces. In the gallery the four games are now one Snow Crash tile, drawn in the static; their own pages are unchanged and each links back to the hub.
Tests: 14 new (tests/raft.test.ts, plus the sprites and gallery tests).
- Course: walls, one start, gates reachable in order, medal order.
- Rules: nothing moving during the countdown; recoil pushing the opposite way and only when firing; overheating and cooling; bouncing off hulls; currents; crates breaking and pirates sinking; boarders dragging until shot off; gates only in order and the finish time; pointer aim and hold.
- The bot: finishes inside bronze on three seeds.
- Determinism.
- Gallery: the Snow Crash games sit behind the hub.
I broke four rules on purpose (recoil direction, overheating, gate order, boarder drag), and each turned at least one test red; the backwards recoil also stopped the bot finishing. 206 tests pass, lint is clean, and the build passes with no env vars.
Checked in the browser:
- The Raft played with a held mouse, a touch drag-and-hold at phone width, and the keyboard.
- The hub's four previews play and its pause button works.
- The gallery shows the single Snow Crash tile.
axe-core found one real failure, the "part of Snow Crash" link in the default dark blue at 2.2:1, now cyan. After that fix axe-core found zero violations on /game/raft, /game/librarian, /game/snow-crash and /gallery.
Not tested:
- A real phone or Safari.
- Reduced motion in a real browser (the static uses the same settler as every other piece).
- How the medal times feel to a person.
Not deployed; on a branch for review.