AI Game Dev
Home › Tutorials › Make a complete platformer with AI, part 4

Level design with Claude Code: six rooms that teach the jump, using Celeste's rules

We asked Claude Code for a six-room first level that teaches run, jump and double jump. Play the result, see each room's story and jump numbers, and compare it with a run without the skill.

Tested with Phaser 3.80.1 · Claude Code 2.1.311

Six screenshots of the level Claude Code built, in two rows, each with a numbered one-line story underneath. A dotted orange line shows our scripted run over steps, two spike pits, a tall wall, a wide spike pit and up to a flag on a high ledge.

Before you start

  • The platformer from the earlier parts of this series, or any Phaser platformer of your own.
  • Claude Code, started in the game's folder.
  • The skill at the end of this page, in the folder's .claude/skills/platformer-levels/. Then type the prompt below.
What we asked“Turn this into a short first level of about six rooms that teaches a new player to run, jump and double jump, then ends at a goal. Make sure every room can actually be finished.”

What happened

You
Turn this into a short first level of about six rooms that teaches a new player to run, jump and double jump, then ends at a goal. Make sure every room can actually be finished.
  • Used the platformer-levels skill
  • Read the skill's notes on room stories, teaching and checking
  • Read index.html
  • Read the platformer-feel skill's notes on testing
Claude
Writing the rooms now: six rooms kept as tile-grid data, each built around one idea, with the existing movement code left as it is.
  • Wrote the six rooms as 25 x 15 text grids, each with a one-line story
  • Replaced the coins with room loading, spikes, doors and a goal flag
  • Measured the jump in the game: 107 px high, 188 px with a double jump, about 364 px for a running double jump
  • Lowered the room 4 wall from 5 tiles to 4
  • Played every room with a scripted route
Claude
Rooms 3 and 6 fail. I'll trace the player's path to see whether the route or the room is at fault.
  • Traced the player's path in rooms 3 and 6
  • Fixed the test routes: all six rooms passed
  • Wrote a check that a single jump fails where the double jump is needed
Claude
A full run died once in room 6. I'll repeat that room 20 times to see whether the failure is in the room or in the script.
  • Room 6 passed 19 of 20 runs
  • Widened the room 6 pillar from 2 tiles to 3
  • Every room passed 15 repeat runs
  • A single jump fails at the wall in room 4, over the pit in room 5 and from the pillar in room 6
  • Checked a screenshot of each room
Claude
Level 1 is now six one-screen rooms in index.html. They teach running, then jumping, then double jumping, and end at a goal flag. A scripted playthrough finishes every room in the real game with no deaths, and each room passed 15 repeat runs. I kept the rooms as text grids in a ROOMS list, separate from the game code. Touching spikes restarts the current room. A door leads to the next room, and the flag shows "Level complete!". I didn't touch the movement code or any of its settings. I measured the jumps in the game: one jump goes 107 px high, a double jump up to 188 px, and a running double jump covers about 364 px. Room 1: run right and step down a low ledge to the door, no jump needed. Room 2: jump onto a low block, then across a small gap (solid floor below) onto a higher one, about 60% of height. Room 3: jump two spike pits, the second wider, about 58% of distance. Room 4: double jump up a wall too tall for one jump, falling is safe, 68% of double-jump height. Room 5: run, jump and double jump across a wide spike pit onto a higher ledge, about 84% of distance. Room 6: hop onto a pillar, then double jump high up to the flag, 85% of double-jump height. Changes I made after testing: the room 4 wall was 5 tiles high, which needed 85% of the double jump in the room that first shows it. It's now 4 tiles. In room 6, at 2 tiles wide, a full-speed run-and-jump overshot the pillar. It's now 3 tiles wide, so the hop is easy and the double jump is the real test. Coins removed: the old coin layout and counter are gone, because the level was built without pickups. Say if you want coins added to the rooms.

A good first level teaches without words. Each room is built around one idea that fits in a sentence, new moves arrive in order, and every jump the player needs is checked against how far the character can actually jump. Our platformer-levels skill asks Claude Code to work this way. Its rules are our own summary of Maddy Thorson’s GDC 2017 talk on designing Celeste’s levels.

The rule players feel most is about near misses. Drag the platforms below and watch each one’s grade against the square’s real reach, then press Try.

An explainer we built for this page, with the same jump numbers as the game. A ledge at 104% misses by about 10 px every time, so players keep trying. One at 140% is so clearly out of reach that nobody tries twice.

We gave Claude Code our platformer from the earlier parts (coyote time, jump buffering, variable jump height, double jump) and the prompt below, with the skill installed. It built six rooms, played each one with a scripted route and changed two of them after testing. Here is the level it made.

Claude's level with the skill. Spikes restart the room you're in. We only added the start screen and loaded Phaser from this site.

RoomStory (from Claude’s level file)TeachesHardest jump
1Run right and step down off a low ledge to the door.RunningNone
2Jump onto a low block, then across a small safe gap to a higher one.Jumping, with nothing to lose30% of a jump’s height (60% if you skip the block)
3Jump two spike pits, the second one wider, with a rest between them.Jumping, with some risk54% of a jump’s distance
4Double jump up a wall that is far too tall for one jump.Double jump, falling is safe67% of a double jump’s height
5Run, jump and double jump across a wide spike pit onto a higher ledge.All three together68% of a double jump’s distance
6Hop over spikes onto a pillar, then double jump high up to the goal ledge.Final test83% of a double jump’s height

The percentages are ours. We played Claude’s game with Playwright in headless Chrome, stepping it at a fixed 60 fps. A held jump rises 107 px and travels 208 px on flat ground. A well-timed double jump rises 192 px and travels 381 px. Each jump in the table is a share of those limits, with the square’s own 28 px width counted on gaps. Claude measured the double jump a little shorter (188 px high, 364 px across), and its own report gives higher shares for rooms 5 and 6: 84% and 85%.

Our own scripted run went through all six rooms in one go with no deaths, about 16 seconds in total. Every room still finished when we moved each jump up to 30 px earlier or later, 13 timings out of 13. With the air jump switched off, rooms 4 to 6 couldn’t be finished, and rooms 1 to 3 never need it, so the double jump comes in exactly where the level teaches it.

We looked for near misses too: gaps off the route at 90 to 115% of the maximum, the kind a player keeps trying. There is one. In room 3 a double jump from the first floor can clear both spike pits at once, at 94% of its reach, which works if you already know the double jump. In room 4 a single jump stops 21 px below the top of the wall, close enough to feel almost possible, but falling there costs nothing.

One change we didn’t ask for: Claude removed the coins. The skill lists collectibles under “Not now”, and Claude took that to mean the existing coins as well. It said so at the end and offered to add them back. We have since reworded that line in the skill so it only stops Claude adding new pickups.

Same prompt without the skill

We ran the same prompt on a copy of the same game with no skills installed. That session wrote its own test bot too, and its level also works: our scripted run finished all six rooms with no deaths.

The level from the run without the skill. Falling into a pit puts you back at the left edge of the room.

The two levels are close in what they ask of the player. The differences we measured:

With the skillWithout
Our scripted run6 of 6 rooms, no deaths6 of 6 rooms, no deaths
Jump timings that still worked (±30 px)78 of 7875 of 78 (room 3 at +30 px, room 6 at +25 and +30 px)
First double jump (room 4)67% of max height83%
Hardest jump in the level83%, room 684%, a single jump onto a step in room 3
Near misses at 90 to 115%Room 3 shortcut (94%)Room 5 pit with a single jump (114%), room 6 shortcut (104%)
Text on screenRoom number onlyA hint line in every room
DangerSpikes, the room restarts after 0.25 sBottomless pits, straight back to the room’s left edge
CoinsRemovedKept, 11 in all
Cost and time$1.19, 17 minutes$1.05, 8 minutes

The room 5 pit is the clearest case. Without the skill it is 270 px wide, and a single jump lands 34 px short, so a new player who hasn’t trusted the double jump yet will probably keep trying. With the skill, the same lesson needs 130% of a single jump, which is clearly out of reach. The run without the skill kept the coins and added text hints, which some players will like. It also added a room for holding jump to go higher, which we hadn’t asked for.

Get the skill. It works for Phaser, Godot, Unity or plain canvas platformers.

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

The skill that made it work

It makes Claude give every room a one-line story, teach the moves in order and check each jump against the game's own 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. 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?