Build a swimmable underwater world in one 97 KB HTML file

A Redditor had Claude Code with Fable 5.2 write a fully procedural WebGPU underwater world, with kelp, a shipwreck, mantas and sound, that ships as a single 97 KB HTML file.

Done withClaude Code· Nov 14, 2026

What they did

The poster wanted an underwater scene you can swim through in the browser, with nothing loaded from outside: no images, models, audio files or libraries. They wrote one detailed prompt for Claude Code running Fable 5.2, now published in the repo as prompt.txt. It described the scene, fixed the constraints (WebGPU, no engine, everything procedural) and set a frame-time target on the poster's own PC. It also built in a self-check: a subagent that only sees rendered frames reports visual defects, and GPU timing measures a 60-second fly-through. Claude wrote the WGSL shaders, a seabed sculpted on the GPU, about two million kelp leaves and plants, and Web Audio sound. Follow-up prompts added a start menu, rock collision and three detail levels.

How it went

The first build came from that one prompt, and the result is a playable scene with kelp forests, a sunken ship, a stone whale tail, manta rays, fish schools and light shafts, all generated on load into one 97 KB file. It runs best in Chrome and also loads on phones, though a weak phone gets a low frame rate. The post passed 1,400 upvotes and the project is open source under MIT.

Worth knowing

The render-only reviewer subagent and the GPU timing pass are what let one prompt carry the build, so copy that loop, not just the scene description. It needs a WebGPU-capable browser. Most of the thread argued about whether the poster can say they built it, not about the code itself.

Try it

With Claude Code· 5 parts to fill in

Build [a scene, e.g. an underwater world] that a visitor can move through in the browser, as one self-contained HTML file. Use WebGPU and WGSL with no engine or libraries, and generate every mesh, texture and sound in code on load. Target [frame time] ms per frame on [my GPU]. After each major step, render frames and hand them to a subagent that sees only the images and lists visual defects, and run a [60]-second fly-through with GPU timing. Fix what they report. Stop when the file is under [size] KB, the timing target is met and the reviewer finds no major defects, then show me the result.

Square brackets are the parts to fill in. The prompt is ours; the story is theirs.

Where they said it

Related