r/ClaudeGameDev • • 5d ago

Browser Game My first ever game jam with Claude Code: a one-button runner in dark caves

If you want to try the game, it runs in the browser, no sign-in: play

So I did my first game jam ever last weekend (Foundplay Jam #1, 72 hours, the theme was "One more try"), and since I made the whole thing with Claude Code I thought I'd share how that went.

The game is called Trylight. It's a one-button runner in dark caves. You can barely see what's coming, but every time you fail, a lantern stays lit where it happened, so the more you fail, the more of the cave you can see. It's free: no payments, no ads, no sign-in.

Screenshots:

Title screen and Cave I
Cave II

How I used Claude: I ran Claude Code (Opus 5.5) in the terminal for the whole jam. It wrote all the code, the levels and the in-game text. I made the design decisions and played every build (a lot). The visuals are just silhouettes and glow drawn in code, and the music and sounds are synthesised in code too. The whole game is a 432 KB zip.

Other tools: Phaser 4, TypeScript and Vite for the game, the Web Audio API for the sound, the Cinzel font (free, SIL OFL) cut down with fontTools, and a small Python script with Pillow that Claude wrote to put the cover together from a frame of the game. It's hosted on itch.io.

What (kinda) worked:

  1. Let the AI play the game itself. The game rules (jumping, hitting things) are plain TypeScript, kept separate from Phaser and the graphics, so Claude can run the game without drawing anything. At first it only used that to check each cave can be beaten, and it completely missed a jump in cave III that killed me every single time. Beatable isn't the same as fair. Once I told it, it added a second check for jumps that are too hard to time, and that one found three more in caves I hadn't even gotten to yet. Now one command runs both checks after every level change.
  2. Make the endless mode out of safe pieces. After the eight caves there's an endless cave, a new one every day. It isn't random terrain. It glues together short bits of the normal caves, and each bit is checked to be beatable. So it's different every day, but you never get a part that can't be done.
  3. Just say what's wrong in normal words. My notes were things like "a new player dies in 5 seconds" or "the sound crackles on my phone". For the first one, the runner now stops right before the first spike if you don't press anything, and waits for you to jump. For the crackle, it figured out my phone couldn't keep up with the echo effect and set up the sound differently on phones. Crackle gone.
  4. Keep notes files. CLAUDE.md lists everything I've decided and why, PROGRESS.md says what's done and what's next. Every new session starts by reading them, so it doesn't forget things I'd already decided, like no yellow anywhere or no double jump. There are also a few rule files that only load when Claude works on those files (Phaser 4 things that changed from Phaser 3, browser quirks like sound and keyboard focus inside itch's frame, the itch page), and two skills: one for the jam's start (theme to concept to a running project) and one for the release (build, size checks, the zip for itch).

And it was a lot of back and forth. I played every build and kept asking for changes: the endless mode, the countdown before every run, the game filling the whole screen and turning sideways on phones, a menu with stats for every cave. It tested a lot in a headless browser, but it couldn't hear the crackle on my phone, or tell that half a second per number in the countdown was too fast.

I'm not done with it yet. I really like the eerie feeling of running through a dark cave with only your own little light, so I'm planning to add more caves and some new mechanics.

5 Upvotes

0 comments sorted by