AI Game Dev Search

Growing a game: adding a spring pad across six rooms with Claude Code

We asked Claude Code to add a second area to our platformer that brings in one new thing, a spring pad. See the plan of all 12 rooms, play the game and see what we measured.

Tested with Phaser 3.80.1 · Claude Code 2.1.311

Six screenshots of the second area Claude Code built, in two rows, each with a numbered one-line story and its step, from "Show it safely" to "Test". A dotted orange line shows our scripted run bouncing off green spring pads over spike pits, up to a door or a flag.

Before you start

  • The six-room level from part 4, or any Phaser platformer that keeps its rooms as data.
  • Claude Code, started in the game's folder.
  • The updated skill at the end of this page, in the folder's .claude/skills/platformer-levels/. Then type the prompt below.
What we asked“Add a second area of about six rooms that brings in one new thing: a spring pad that bounces the player high. Teach it the way the first area teaches the jump, mix it with the double jump, and end the area with a room that tests both.”

What happened

You
Add a second area of about six rooms that brings in one new thing: a spring pad that bounces the player high. Teach it the way the first area teaches the jump, mix it with the double jump, and end the area with a room that tests both.
  • Used the platformer-levels skill
  • Read index.html and the skill's notes on room stories, teaching, checking and progression
  • Checked that a headless browser can run the game
Claude
Headless browser runs the game. Now adding the spring pad to the game code.
  • Added the spring pad as tile letter S
  • Worked out the reach: jump 107 px, double jump 192 px, spring bounce 349 px
  • Wrote six area 2 rooms as text grids, each with a one-line story
  • Measured the spring in the running game
Claude
Found it: Phaser's max velocity is symmetric, so the 900 px/s fall cap also capped the spring at 900 going up. Fixing that so the cap only limits falling.
  • Changed the cap so it only limits falling
  • Retimed the routes for rooms 11 and 12: all 12 rooms passed
  • Ran each new room 50 times with simulated new, average and skilled players
  • Switched its test inputs from real time to game frames
  • Lowered the spring from 1000 to 900 px/s so a double jump at the top of the bounce no longer hits the top of the screen
  • Rebuilt the area 2 rooms around the lower bounce
Claude
Rooms rebuilt. Retuning the scripted routes for the new bounce.
  • Swept the timing windows in rooms 9 to 12
  • Ran the simulated players again: area 2 at 50 runs each, area 1 at 30
  • Made rooms 9, 11 and 12 harder: a wider pit, a shorter ledge and a one-tile pillar
Claude
Room 12, the test, now lands at 62% for a player who has reached it, inside its 40–70% target. Skilled players pass it 98% of the time.
  • Played all 12 rooms with the scripted routes on the finished file
  • Saved a picture of the six new rooms
Claude
I've added area 2: six rooms (rooms 7–12 of the game) built around a new spring pad, tile letter S. All 12 rooms finish their scripted routes in the real game with no console errors. Touching the pad from above, by walking or falling onto it, throws the player about 280 px up, roughly 2.7 times a normal jump. It also gives back the double jump. Letting go of jump doesn't shorten the bounce. Pressing jump during the fast part of the rise is ignored instead of wasting the double jump. I first tried a stronger bounce (1000 instead of 900). The player then peaked almost at the top of the screen, so the natural move of double jumping at the top of the bounce hit the ceiling in every room. At 900 there's room for it. Room 7, show it safely: 91% of the bounce height (fixed, no timing). Room 8, use it: 73%. Room 9, combine: 86%. Room 10, twist: hop 56–96% (double jump can rescue it), bounce 79%. Room 11, twist: 85%. Room 12, test (both moves): 85%, plus letting go of right for 0.1–0.25 s to land on one tile. Wrong routes are all at 130% or more, so they look clearly impossible rather than barely missed. Each room was run 50 times per player type, with random timing error added to every press. The curve rises to a peak at the test room, which lands inside its 40–70% target. Skilled players clear every room 98–100% of the time. Rooms 9–11 are easier than target: 96–100% for the player who has reached them, against 60–90%. Making them harder would push the jumps past about 86% of reach, which starts asking for pixel-exact play. I'd keep them, but I can tighten them if you want a sharper climb. There's no calm room after the test: you asked for the area to end on the test, so it does. Area 1's only change is its last room: its flag is now a door into area 2. The simulation only measures timing. It can't tell whether players notice the small green pads or understand that the spring gives the double jump back. Watching one real person play rooms 7 and 11 would answer that.

A demo can be one good room. A game has to keep giving the player something new, one thing at a time, and each new thing needs its own short arc: you meet it where failing costs nothing, use it with some risk, see it used in a way you didn’t expect, then prove you have it. Koichi Hayashida, who directed Super Mario 3D Land, describes this arc as kishōtenketsu (introduce, develop, twist, conclude). We added it to our platformer-levels skill and asked Claude Code to grow part 4’s six-room level into a second area built around one new thing, a spring pad.

This is the plan of the whole game as Claude left it. Rooms run across and elements run down. Tap a room to see its layout and our scripted run through it.

Layouts and stories come from Claude's level file, and the dotted paths are our scripted runs. Area 2's beats are Claude's own labels; area 1's come from part 4's table. Grey dots mark an older move a room still needs, from our runs. "Our demo: 1 room" shows the single room from parts 1 to 3.

Read the grid from left to right and the elements arrive one at a time. Area 1 brings in the jump and then the double jump. Area 2 brings in only the spring, takes it through all four beats in six rooms, and brings the double jump back in rooms 9, 11 and 12. Room 12 tests both.

Claude's game. The game has no way to skip ahead, so area 2 starts after the six rooms of area 1 (our scripted run takes 16 seconds there). Spikes restart the room you're in. We only added the start screen and loaded Phaser from this site.

RoomClaude’s labelStory (from Claude’s level file)What we measured
7Show it safelyWalk onto the spring and ride it up a wall far too tall for a double jump (falling is safe).No jump press needed. The wall is 256 px, out of reach of a double jump (192 px).
8Use itRun onto the spring at the edge of a spike pit and keep holding right to ride the bounce onto the high ledge.Same input as room 7, now with spikes below. 72% of the bounce’s reach.
9CombineBounce off the spring, then double jump on the way down to carry over a spike pit too wide for the bounce alone.The bounce alone would need 146%. With the double jump it’s 86%, pressed any time from the top of the bounce to 0.47 s after.
10TwistHop off the ledge onto the spring standing in the spikes and let it throw you up to the far ledge.Walking off the ledge misses the spring. Without the spring, the best double jump falls 56 px short. Bounce: 77%.
11TwistDouble jump over the pit onto the spring by the wall; its bounce gives the double jump back, so turn round and use it again to reach the ledge above the start.77% to reach the spring, then 80% back to the ledge with the double jump the bounce gave back. Without it, 175%.
12TestRun onto the spring, double jump at the top to land on the one-spring pillar far across the spikes, then bounce up to the flag.85% to reach the one-tile pillar. To land on it you let go of right within a 56 px stretch, about 0.2 s.

We measured with Playwright in headless Chrome, stepping the game at a fixed 60 fps. Walking onto the spring throws the square 282 px up, 2.6 times a jump, and a double jump at the top takes it to 367 px. Running onto it carries you 334 px across flat ground, or 524 px with the double jump. Each share in the table is the jump a room needs, compared with that reach at the same height and counting the square’s 28 px width. Our scripted run finished all 12 rooms in one go with no deaths, in about 33 seconds. Rooms 1 to 6 have no springs, so nothing needs the spring before room 7 shows it. With the air jump switched off, rooms 9, 11 and 12 can’t be finished.

Claude’s own shares are within a few points of ours (it gives 79% for room 10 and 85% for room 11). It also found the biggest problem without our help. Its first spring launched at 1000 px/s and rose 349 px, so close to the top of the screen that a double jump at the top of the bounce hit the ceiling and fell short. We saw the same thing in that version: room 12 only worked if you waited about 0.2 s after the top. Claude lowered the spring to 900 and rebuilt the rooms. In the final room 12, the double jump works from the top of the bounce to 0.65 s after it.

The weak part was time. The new progression notes in the skill ask for every room to be run about 50 times with simulated new, average and skilled players. Claude ran those simulations three times: after building the rooms, after lowering the spring, and after making rooms 9, 11 and 12 harder. The session took 2 hours 4 minutes, most of it waiting for those runs on a two-CPU machine that our own measurements were sharing for part of the time. It cost $3.83, where part 4 took 17 minutes and $1.19. Even after the last round, Claude’s report says rooms 9 to 11 are easier than the skill’s targets. It chose to leave them, and the area ends on the test with no calm room after it, because the prompt asked for that.

Get the skill. It works for Phaser, Godot, Unity or plain canvas platformers. You can also install all seven skills as a Claude Code plugin or replay this part from its starting files.

The next part measures how hard each room is for a player who gets better as they go.

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

The skill that made it work

It makes Claude plan the whole game in areas, bring in one new element per area through introduce, develop, twist and test, and check every room against the game's own jump numbers.

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 with simulated players of different skill so the difficulty rises in waves.
  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 5 of Make a complete platformer with AI

Next in Make a complete platformer with AIDifficulty that grows with the player: measuring every room with simulated players
Open →