AI Game Dev Search

A full chapter with Claude Code: 34 rooms, two new mechanics and how they combine

We asked Claude Code to grow our platformer into a four-section chapter with crumbling blocks and refill orbs, one session per section. Play all 34 rooms and see what it cost.

Tested with Phaser 3.80.1 · Claude Code 2.1.312

Four screenshots from the chapter in a two-by-two grid, one test room from each section: a spring pit in First steps, a cracked bridge over spikes in Crumbling ground, a cracked runway and a cyan refill orb in Refill orbs, and The long way with its checkpoint flag in All together. The orange square player is in mid-air in each.

Before you start

  • A browser platformer that keeps its rooms as data. We started from the 12 rooms of the re-run at the end of part 6.
  • Claude Code, started in the game's folder, plus Node and Playwright for the skill's measuring script.
  • The skill at the end of this page, in the folder's .claude/skills/platformer-levels/. Then give each prompt below to a fresh session.
What we asked“I want to turn this into a real chapter that takes a while to finish. First add two new things: crumbling blocks that shake and fall a moment after you land on them, then come back after a while, and refill orbs that give you your double jump back in mid-air and reappear after a few seconds. Keep each section's rooms in its own file so sections can be built separately, keep the rooms we already have as the first section, and add a death counter, a timer and an end screen that shows them. Test both new things. Don't build new rooms yet.”

What happened

You
I want to turn this into a real chapter that takes a while to finish. First add two new things: crumbling blocks that shake and fall a moment after you land on them, then come back after a while, and refill orbs that give you your double jump back in mid-air and reappear after a few seconds. Keep each section's rooms in its own file so sections can be built separately, keep the rooms we already have as the first section, and add a death counter, a timer and an end screen that shows them. Test both new things. Don't build new rooms yet.
  • Added crumbling blocks (C) and refill orbs (O) as new tiles
  • Moved the 12 existing rooms into levels/section-1.js, one file per section
  • Added deaths, a timer and an end screen
  • Wrote 11 tests that run the real game frame by frame
Claude
Testing turned up and fixed three bugs. Free jump near orbs: with your feet inside an orb's touch area, the game thought you were standing on the ground and gave you an extra jump. Crash in test rooms: dying in a test room crashed the game. Test rooms skipped the end screen. To make the orbs readable, the player now turns a dimmer orange once the double jump is used. That's a visual change I added beyond what you asked.
You
Build the next section in its own file: about seven rooms about the crumbling blocks. Start with a safe first meeting, build up to a test room, and mix them with the jumps and springs the player already knows. Measure the new rooms with the skill's script and adjust them until they hit their targets.
Claude
The numbers are swinging by around 10 points between 50-run measurements. Getting a stable 200-run figure before changing anything else.
Claude
I built section 2, "Crumbling ground": seven rooms (13–19, area 3) about the crumbling blocks. Every route finishes and in the final 50-run measurement all 19 rooms hit their targets. The test room sits right at its upper edge: it measured 68% in the final run but 73% when I re-ran it with 200 attempts. Game bug, not fixed: a cracked block starts to fall if the player brushes its top corner while rising past it. I left it because it changes how the blocks work.
You
Two problems from my own check. 1) Crumble test misses its band: with --runs 200 --rooms 18 the reached player passes 73% (seed 1) and 77% (seed 2), above the 40-70% target. Make it land inside the band at 200 runs, with more than one seed. 2) In Climbing stones the door sits in the top rows and covers the Deaths and time text in the top right corner. Move it so nothing overlaps the HUD, and check the other new rooms for the same thing. Then rerun --check and the full measurement.
Claude
Both problems are fixed. "Crumble test" now passes 58%, 58% and 64% for the reached player at 200 runs on seeds 1, 2 and 3. The low tunnel at the start now has 7 tiles of ceiling instead of 6, so the window for the jump and double jump to the spring gets shorter, just before the runway drops. No new room's door or tiles overlap the HUD any more.
You
Build the next section in its own file: about seven rooms about the refill orbs. Start with a safe first meeting, build up to a test room, and mix them with the double jump, springs and crumbling blocks the player already knows. Measure the new rooms with the skill's script and adjust them until they hit their targets.
  • Wrote seven rooms from the jump numbers: ground jump 112 px, double jump 201 px, orb-refilled third jump about 290 px
  • Ran every route in a copy of the game with the orbs taken out: every orb room failed
  • Tuned five rooms one change at a time
  • Re-measured the new rooms at 200 runs on two seeds
Claude
Two section-2 rooms shifted because the chapter is longer. The script expects the player to improve over the whole chapter, so with seven more rooms it assumes a less practised player at each earlier room. Spring to the crack (room 16) now reads 58% ("too hard", just under its 60% floor). I didn't touch section 2, so tell me if you want room 16 eased.
You
Build the last section in its own file: about eight rooms where the crumbling blocks, refill orbs and springs work together, ending with one long climax room and a calm last room before the end screen. Also add two optional hard rooms for skilled players that new players can skip. Measure the whole chapter with the skill's script and adjust the new rooms until they hit their targets.
  • Added a bonus door tile B and rooms wider than one screen to the game
  • Built 8 main rooms and 2 bonus rooms
  • Removed the orbs in a copy: all six orb rooms failed
  • Re-measured the new rooms at 200 runs on two seeds
Claude
Hold still had an orb that was never needed (spring plus double jump already reached the door), so I removed it. The difficulty climbs through the section (87 → 79 → 69 → 86 → 76 → 47 → 100), with the climax as the hardest main room and a calm room after it.
You
We tested the whole chapter and found some problems. Please fix them: 1) A crumbling block starts to fall when you only brush its corner while jumping up past it; it should only start when you stand on it. 2) In Spring jump the door, and in Get it back the wall, cover the deaths and timer in the corner. 3) The bonus doors don't say they lead somewhere optional and hard; make that clear without text. 4) After finishing a bonus room you replay the room you came from; put the player in the next room instead. 5) The long way is long and a death sends you back to the very start; make the rest platform in the middle a checkpoint. Don't change the movement. Measure the whole chapter again afterwards and fix any room that moved off its target.
Claude
Reproduced: on the old build 8 of 32 start heights start the block while the player is still rising; with the fix, none do.
Claude
I've fixed all five problems. All 36 rooms are still inside their targets, and no room's numbers moved. The bonus door glows slowly, which says "special", and has a crown of spikes in the game's danger red, which says "hard". It sits on a one-tile step, so you have to hop to go in. In The long way, almost every death now costs only the second half, not the easy first 4.5 s.

The chapter’s theme is staying in the air. Crumbling blocks take the ground away as a place to rest: they shake for half a second after you land, then drop. Refill orbs give you rests in mid-air, because each one hands back the double jump you just spent. The last section puts them together with the springs from earlier parts: a cracked floor that drops you onto a hidden spring, a cracked lid you have to stand still on, a run of orbs with nothing to land on, and a climax that uses all three across almost three screens.

The whole chapter on one strip, built from the real room files and our measurements. Each new mechanic enters on its own, then they combine in section 4, and the pass rate dips and recovers once per area. Tap a room to watch its measured route.

Claude's chapter. Arrow keys or A/D to move, Up, W or Space to jump, and again in mid-air to double jump. Enter on the end screen plays again. Two rooms in the last section have a purple bonus door with a glow and a spike crown behind the start: hop onto its step to go in. The long way has a checkpoint flag on its middle platform. There is no way to skip ahead, and our scripted run reaches section 4 after about 74 seconds. We only added the start screen and loaded Phaser from this site.

How it was built

Each section came from its own Claude Code session and lives in its own file, so a session only had to add one file and one script tag. Nothing had to be merged. The first session added the two new things and the end screen without building any rooms. Then came one session for each new section, and a last one for the problems our checks found across the whole chapter.

Inside each session, Claude Code did all the testing itself: it wrote a route for every room, ran the skill’s measuring script, read the table and changed rooms until they hit their targets. Each “you” line in the conversation above starts a new session or continues one. The four that start a section are prompts any reader could send. The other two came from our own checks after a session ended: the follow-up in section 2 and the list of five fixes. A reader wouldn’t have those checks, so the result you’d get from the section prompts alone is closer to what Claude reported before them.

SessionWhatTimeCost
1Crumbling blocks, refill orbs, section files, deaths, timer and end screen12 min$2.47
2, earlier trySection 2: six rooms we didn’t keep54 min$6.41
2, second trySection 2, crumbling blocks (cut off, see below)19 minabout $3.57
2, finalSection 2: 7 rooms, plus our follow-up48 + 8 min$8.23
3Section 3, refill orbs: 7 rooms22 min$2.97
4Section 4, all together: 8 rooms, 2 bonus rooms, bonus doors and wide rooms41 min$7.18
5Five fixes from our checks13 min$2.62
Total3 h 37 minabout $33

Section 2 took three tries. We didn’t keep the six rooms from the first one. The second died after 19 minutes. The skill’s measuring script let Chromium’s GPU process grow to 5.6 GB during a 200-run measurement until the machine ran out of memory, so we fixed the script in the skill and ran the session again from the same starting files. That run never reported its cost, so its figure is worked out from its token counts.

What we measured

The chapter has 12 rooms in section 1 (the old game), 7 in section 2, 7 in section 3 and 8 in section 4, plus 2 bonus rooms. Every route finishes with no timing error. In our final measurement with the skill’s script, all 34 main rooms land inside their target band for a player who improves as they go. The four test rooms come out at 50%, 44%, 56% and 54%. Skilled players pass every main room at least 98% of the time.

A clean run with no deaths takes 1 minute 47 seconds. To estimate a first play, we took each room’s pass rate for the improving player, counted the retries it implies, and added about 5 seconds per room for looking around. That comes to about 5 minutes, and 5.5 to 6.5 minutes for a player who stays at the new player’s timing. We wanted 10 to 15 minutes, so the chapter is shorter than we aimed for. The simulated players already know the route and only make timing errors. They never stop to read a room or get confused, so real first plays will probably take longer. We’ll measure that with real players.

Open problems

  • Clearing a bonus room skips the room it branches from. After Thin air you never play Spring, crack, spring, and Last light ends the chapter without the calm walk in Homeward. That is what we asked for in the last session, but we want to watch real players before keeping it.
  • The bonus doors’ signal is small. The spike crown is two 14 px triangles and the glow is half cut off by the screen edge. Red spikes may also read as “this door hurts” rather than “this is hard”.
  • Spring, crack, spring is steep for room 4 of a section. It is on target for the improving player (68%), but a new player passes only 28%, the lowest of any develop room in the chapter.

Get the skill. The level rules work for any engine, and the measuring script runs browser games such as Phaser or plain canvas. You can also install all seven skills as a Claude Code plugin or replay this part from its starting files.

Recorded with a clean Claude Code: no personal skills, plugins or MCP servers. The sessions had platformer-levels and our earlier platformer-feel skill installed.

The skill that made it work

It makes Claude teach each new element in order, check every room against the game's jump numbers, and measure the whole chapter with the bundled script so the difficulty rises in waves.

platformer-levels
  1. Keep levels as data: each room in a small grid or list (tiles, hazards, pickups, start, exit), separate from the game code.
  2. Write each room's one-line story first: one sentence about the single thing the room asks of the player. Build only what serves it.
  3. Teach in order, without text: each new move or object is shown safely, then used, combined and tested.
  4. Check every room with the jump numbers: work out from the game's constants how far and how high the player can jump, check every required jump and every tempting wrong jump, then play each room with a scripted route.
  5. Plan the whole game, not just a room: bring in one new element per area through introduce, develop, twist and test, and measure every room so the difficulty rises in waves as the player improves. For browser games, use the bundled script: add its small hook and write a route per room.
  6. Report like a level designer: for each room, its story, what it teaches, its hardest jump as a share of the maximum, and whether the scripted route finished.

Save it as .claude/skills/platformer-levels/SKILL.md in your project.

Was this useful?

Part 7 of Make a complete platformer with AI

Next in Make a complete platformer with AIMaking the chapter feel alive: game juice with Claude Code in one prompt
Open →