AI Game Dev Search

When the simulated player reacts late: re-measuring and refining the chapter

Our difficulty script now models reaction time, busy hands and errors that run together. One prompt had Claude Code re-measure the 34-room chapter and fix the four rooms that missed.

Tested with Phaser 3.80.1 · Claude Code 2.1.312

Dot chart of the pass rate in each of the 34 main rooms, with grey target bands. Hollow grey rings for the old simple model and blue dots for the new full model mostly sit close together inside their bands. In rooms 6, 16 and 17 the blue dot falls below the band, and in room 34 it drops to 0%. Green dots and lines show those four rooms back inside their bands after Claude's fixes.

Before you start

  • The juiced chapter from part 8: 34 rooms and 2 bonus rooms in a single-page Phaser game, with tests, a route for every room and the measuring hook.
  • 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/. This version measures with the full player model by default. Then give the prompt above to a fresh session.
What we asked“Our difficulty numbers so far only counted small timing errors. Measure the chapter again with the skill's full player model, marking which steps are reactions, then refine the rooms that now miss their targets. Don't change how the character moves or the effects.”

What happened

You
Our difficulty numbers so far only counted small timing errors. Measure the chapter again with the skill's full player model, marking which steps are reactions, then refine the rooms that now miss their targets. Don't change how the character moves or the effects.
  • Loaded the platformer-levels skill
  • Measured the chapter with the old simple model as a baseline
  • Read the rooms and routes and marked 2 steps as reactions
  • Measured again with the full model
Claude
Five rooms now miss or sit near their band edges: 6 Goal, 16, 17, 18, and 34 The long way, where even skilled players get 0%. Confirming the borderline ones with more runs while I look at room 34.
Claude
With no timing error the player only grazes the last orb's bottom edge, and any lag in the rightward press leaves them too low. Trying a few orb positions.
  • Changed rooms 6, 16, 17 and 34, one at a time
  • Added room and finished to the measuring hook for --playthrough
  • Re-measured the changed rooms at 200 runs on two seeds
  • Took pictures of the changed rooms and ran the 15 tests
Claude
I re-measured the chapter with the skill's full player model, marked the reaction steps, and fixed the 4 rooms that missed their targets. All 34 main rooms are now inside their bands. All 36 routes pass --check, a playthrough of the main path reaches the end, and npm test passes (15/15). Movement and effects are unchanged. I marked 2 steps as reactions, both in rooms where the player stands still on a cracked lid and must start moving the moment it drops onto the springs: Hold still, step 5, and The long way, step 16. Nothing else qualifies: cracked blocks always shake for 0.5 s before falling, and the player has seen that timing many times. Goal and Spring to the crack: the door is one tile lower. Climbing stones: the first stone is two tiles wide, the top ledge one tile wider. The long way: even with perfect timing the player only grazed the bottom of the last orb, so the orb is two tiles closer to the springs and the door ledge is one tile wider. Still open: Crumble test reads 40%, on the edge of its band, but 47% at 200 runs, so I left it. The skill's --playthrough expects each door to lead to the next room in the list, but this game's doors skip optional rooms; I ran it on a copy without them. The reaction delays and the other player-model numbers are the skill's starting guesses, not measured from real players.

All 34 main rooms of the chapter are back inside their difficulty targets under a stricter simulated player. Claude Code re-measured them, found four rooms that the new player model fails too often, and changed one or two tiles in each. The character’s movement and the effects from part 8 are untouched.

Up to part 8, our measuring script treated a player as someone who presses every key a little early or late at random. That is the “simple” model. Real players do worse in three ways, so the script’s new “full” model adds them:

  • Reaction time. When the game gives no warning, you can only answer it. A step marked “react” in a route comes 0.18 to 0.30 s late, depending on the player.
  • Busy hands. Inputs that come less than 0.2 s apart, or that switch direction, get sloppier.
  • Errors that run together. A player who was late on one press tends to be late on the next one too.

These numbers are starting guesses. We’ll calibrate them once real players have played the chapter.

What Claude changed

Claude read every route and marked two steps as reactions. Both are the moment a cracked lid drops you onto springs, in Hold still (room 32) and The long way (room 34), and the player has to start moving the instant it goes. Then it measured the whole chapter, traced the rooms that missed, and changed four of them.

The pass rates below are for the player who has reached each room, from our own measurements at 50 runs per player.

RoomWhat changedSimple, beforeFull, beforeFull, after
6 GoalDoor ledge one tile lower: a 128 px climb instead of 160 px96%86%94%
16 Spring to the crackDoor one tile lower64%58%78%
17 Climbing stonesFirst cracked stone two tiles wide instead of one, top ledge one tile wider68%46%68%
34 The long wayLast orb two tiles closer to the springs, door ledge one tile wider54%0%52%

Room 34 went to 0% for every player, skilled ones included, because of the reaction mark. Even with perfect timing the player only grazed the bottom of the last orb, so starting to move a reaction time after the lid dropped always left them too low. Without the mark, the full model gave it 56%.

Pass rate of the player who has reached each room, rooms 1 to 35: simple model and full model before the session, and the full model after it for the four changed rooms, with each room's target band.simple model, beforefull model, beforefull, after a fixtarget band0%25%50%75%100%1 Run2 Jump3 Spike pits4 Double jump5 Long jump6 Goal7 Spring8 Bounce and double jump9 Spring jump10 Spring in the pit11 Get it back12 Spring test13 Cracked floor14 Keep moving15 Stepping stones16 Spring to the crack17 Climbing stones18 Crumble test19 Solid ground20 First orb21 Orb bridge22 Orb steps23 Spring and orb24 Cracked stone and orb25 Orb test26 Glow walk27 Trapdoor spring28 Orb to the spring29 Crack, orb, crack30 Spring, crack, spring32 Hold still33 The way back34 The long way35 Homeward
Every main room, simple model against full model before the session, with the four changed rooms after it. Most rooms move by a few points. Rooms 6, 16, 17 and 34 dropped below their target bands and came back after one or two tile changes. Bonus rooms 31 and 36 have no target and aren't shown.

What the session missed

Our checks after the session found these. Claude didn’t catch them, and we didn’t send them back as prompts.

  • The long way now favours a late player. With the modelled reaction delay, the skilled player passes 100%. With on-time presses (the simple model) it passes 82% at 50 runs and 88% at 200.
  • The reaction marks are inconsistent. Spring, crack, spring (room 30) has the same kind of step and wasn’t marked. And the lid shakes for a visible 0.5 s before it drops, so you can argue that both marked steps are planned rather than reactions, which is the reason Claude itself gave for not marking anything else.
  • The playthrough couldn’t handle optional rooms. The script expected every door to lead to the next room in the list. Claude worked around it on a copy without the two bonus rooms.
  • The pictures missed the end of wide rooms, so nobody looked at the changed end of The long way. Claude said so in its report.
  • It wrote its experiments to the shared /tmp folder, where a parallel session could have clashed with them.

We’ve fixed the skill since. The playthrough now follows the game’s own door order, pictures cover rooms wider than one screen, and the measuring guide says a visible fixed timer counts as something the player sees coming. It also warns never to tune a room that only a late player can pass, and to check such rooms with the simple model too.

It took one prompt and no follow-ups: 32 minutes and $2.23 of Claude Code working alone.

Get the skill. The measuring script works for any browser platformer, and every player-model number is an option you can change. You can also install all seven skills as a Claude Code plugin or replay this part from its starting files.

The chapter after this session. Arrow keys or A/D to move, Up, W or Space to jump, and again in mid-air to double jump. J switches the effects. You need a keyboard; the game has no touch controls. We only added the start screen and loaded Phaser from this site.

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

The skill that made it work

It makes Claude build each room around one idea, check it with the jump numbers and a scripted route, and measure the whole chapter with a bundled script whose simulated players react late, get sloppy when inputs pile up and carry their errors from one input to the next.

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: one new element per area through introduce, develop, twist and test, with every room measured so the difficulty rises in waves. For browser games, use the bundled script (default --model full): add its hook, write a route per room and mark the steps that are reactions.
  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 9 of Make a complete platformer with AI

Next in Make a complete platformer with AISound effects in one prompt: 17 sounds made in code, no audio files
Open →