The Workbench / The One-Shot

▮▶ Showcase

The One-Shot

Every model gets the same long prompt and exactly one generation to ship a complete game as a single HTML file. No follow-ups, no fixing the errors, no second chances. If it doesn't run, that's the result. The games are embedded below: don't read the difference, play it.

The rules

  • One prompt, identical for every model, versioned like an instrument. Editing it invalidates every comparison.
  • One generation. The reply is the game.
  • Scored two ways: 10 spec checklist points (did it build what was asked) plus a hand-scored polish mark out of 10 (does it feel good). 20 is a perfect run.
  • A crash, a refusal, or an unplayable file gets published like any other result.
The full prompt (v1), exactly as every model receives it
You are going to build a complete browser game in one shot. You get this one prompt and no follow-ups, so read every requirement before you write a line of code. Your entire reply must be the contents of a single HTML file: start at <!DOCTYPE html> and end at </html>. No commentary, no markdown fences, no explanation before or after the file.

THE GAME: SPOOL

You are the nozzle of a 3D printer laying down a filament line on the build plate. Steer the nozzle around the plate; it extrudes a filament trail behind it as it moves. Collect filament pickups to keep the print going and grow the line. Cross your own line, run off the edge of the plate, or hit a clog and the print fails.

HARD REQUIREMENTS

File and rendering
1. One self-contained HTML file. All CSS and JavaScript inline. No external resources of any kind: no CDN scripts, no web fonts, no images, no audio files, no network requests. The file must work offline, opened from file://, and inside a sandboxed iframe.
2. The playfield is a 24 by 24 cell grid drawn on an HTML canvas. The canvas renders at 480 by 480 CSS pixels or larger on desktop, stays sharp on high-DPI displays, is centered on the page, and scales down to fit narrow viewports without breaking the layout.

Movement and input
3. The nozzle moves one cell per tick in its current direction and leaves a trail behind it. The trail starts 3 cells long. Arrow keys and WASD both steer.
4. A 180 degree reversal is ignored: pressing left while moving right does nothing. This must also hold for two quick keypresses inside a single tick (up then left while moving right must not let the nozzle double back through its own trail). Handle input buffering correctly.

Pickups and scoring
5. Exactly one filament pickup is on the plate at any time. It spawns on a uniformly random empty cell: never on the nozzle, the trail, or a clog. Collecting it adds 1 to the score and grows the trail by one cell.
6. A HUD outside the playfield shows the score, the high score, and the current speed level.

Failure and restart
7. Hitting the plate edge, the trail, or a clog ends the run with a FAILED PRINT screen: the words FAILED PRINT, a one-line printer-flavored reason that matches the cause (for example a layer shift for the edge, a crossed line for the trail, a jam for a clog), the final score, the high score, and "press R to reprint". Pressing R starts a fresh run immediately.

Difficulty
8. The game ticks every 140 ms at the start. Every 5 pickups the tick interval drops by 10 ms, to a floor of 60 ms.
9. Clogs: when the score reaches 10, a clog appears on a random empty cell, and another appears at every further multiple of 5 (15, 20, 25 and so on), up to a maximum of 8 clogs on the plate. A clog never spawns within 3 cells of the nozzle head (Chebyshev distance) and never on an occupied cell.

Pause and persistence
10. P pauses and resumes, with a visible PAUSED overlay. Pausing must not corrupt game state or the tick timing.
11. The high score persists across page reloads using localStorage. If localStorage is unavailable or throws (it will inside a sandboxed iframe), catch the error and fall back to a session-only high score. The game must never break because storage is blocked.

Start screen
12. Before the first run: the title SPOOL, a one-line premise, the controls (arrows or WASD to steer, P to pause, R to reprint), and "press any key to start". Any key or click starts the run.

PRESENTATION

13. Palette, exactly: warm black #0b0a08 as the page and plate background, phosphor amber #ffb000 for the trail, HUD and title, off-white #f5efe3 sparingly for secondary text, hot red #ff5533 for clogs and the failure screen accent. Monospace system font stack for every piece of text.
14. Theme the parts: the trail should read as an extruded filament line, the nozzle head should be visually distinct from the trail, and pickups should read as filament (a spool, a coil, a pellet: your call). Add at least one extra printer-flavored touch of your own choosing (plate grid lines, a layer counter, WebAudio extruder blips, a warping animation on failure, anything). Polish is scored.

QUALITY BAR

- No console errors and no uncaught exceptions at any point: load, play, fail, restart, pause, storage blocked.
- Input must feel responsive at every speed level.
- Spawns must always be legal per the rules above, even late in a long run when empty cells are scarce.
- Clean, readable code counts. Write it like it will be reviewed, because it will be.

Output the HTML file now.

The first runs are queued. Nothing publishes here until a model has actually taken its shot.

← The Workbench