I used Claude Code to turn a 1989 DOS game I played as a kid into a relativity sim
Sorry, reposted from earlier because the video wasn't working. Play it: gravwars.com (free, no account, phone or computer) Gravity Wars is a two-player artillery game in curved spacetime. You take turns firing missiles past planets, stars and black holes, and gravity bends every shot. It started as a remake of a public-domain 1989 DOS game (by Sohrab Ismail-Beigi) and grew into a small relativity sim: orbits precess near black holes, black holes are ray-traced with lensing, and missiles feel time dilation. Almost all of the code was written by Claude Code, with me playing, testing and deciding what to build next. How it's built Claude Code in the desktop app, over many sessions. A roadmap folder and a CLAUDE.md in the repo hold the plan and the rules, so each new session picks up where the last one stopped. Plain JavaScript. No frameworks, no npm packages, no build step. A small Python script bundles the game into one HTML file. WebGL shaders draw the universe and ray-trace the black holes, Canvas 2D draws the ships, trails and readouts, and the Web Audio API generates the music from the physics. Testing: Node scripts check the physics before every commit (energy conservation, orbital precession, CPU accuracy). Playwright screenshots every change in headless Chrome and Firefox. An Android emulator covers phone layouts. Hosting: static files on Cloudflare Pages. The trailer was rendered frame by frame from the game itself, with Playwright and ffmpeg. Bug reports: the in-game ! button sends a report to a Cloudflare Worker, which files it as an issue in a private GitHub repo (with Cloudflare Turnstile and rate limits against spam). Claude reads and triages them. Design choices No dependencies. The game opens straight from a file and has nothing to update or audit. Two views, one physics. Classic is flat 2D; "3D lite" tilts space into the rubber-sheet picture of gravity. Missiles fly by the same equations in both. Same universe everywhere. The world is a fixed 16:9 field, and every universe comes from a seed, so a link rebuilds the exact same layout on any device. Phones first-class. Played sideways, installable, works offline, resumes after switching apps, and drops to lighter graphics on weaker GPUs. CPU opponents simulate their shots instead of cheating with a formula. Private by default. No accounts, no tracking, no ads. What I'd love from you Play a few rounds against the CPU or a friend. Best in Chrome, Firefox or Edge. Safari and iPhones are untested, so reports from those are especially welcome. If something breaks or confuses you, press ! , say what happened, and press Send . It adds your device and the match details automatically. Happy to answer questions about the workflow.