AI Game Dev Search

Games that quietly adjust to you: rubber banding, AI directors and help after you die

Why the last-place kart gets the rocket, and why a game gets a little easier after you die three times. Watch five adaptive tricks side by side, then add them to your game.

Tested with Claude Code 2.1.296 · Opus 5.5

Two race bars. Without: one racer is far ahead near the finish while the rest trail behind. With: all four racers are bunched together. Below, five labels: Catch-up items, Rubber band, Pacing director, Help after deaths, Enemies that adapt
What we asked“Make a web page that demonstrates the adaptive difficulty tricks one at a time, so anyone can see and feel each one within a few seconds. For each one, show the same short moment side by side: without it on the left, with it on the right, playing in a loop, with a caption that says what just happened and a replay button. Where it helps, let me play the moment myself. It will sit inside a blog post about 720 pixels wide, so it has to look good at that width and on a phone. Also make each one viewable alone with ?trick=<id>&solo, using these ids: catch-up-items, rubber-band, pacing-director, death-help, performance-enemies.”

What happened

  • Loaded the adaptive-difficulty skill
  • Wrote the five little simulations first, with both sides on the same dice
  • Wrote a check that prints every loop's captions with the trick off and on, to tune before drawing anything
Claude
Spawning flat out ramps too hard. I'll base intensity on how many enemies are alive, which reads more naturally, then sweep again.
  • Widened the jump in the death-help demo so a person can clear it on a phone, while the scripted player still fails
  • Built the page, then started a human player at cruising speed in the race so full throttle can actually win
  • Checked every end state in a real browser at 720 pixels and at phone width
Claude
Each pair loops with a caption and live numbers, and you can take over four of them. In the race, holding full throttle still wins with the trick on: by about 0.9 s without it and 0.5 s with it.

A fixed difficulty is wrong for almost everyone: too hard for some players, too easy for others. So many games watch how you’re doing and quietly adjust. Done well, races stay close and fights come in waves, and nobody notices. Each demo below plays the same moment twice with the same dice: without the trick on the left, with it on the right. Play it yourself lets you drive, jump or dodge; both sides copy you.

1. Catch-up items

In Mario Kart, what you get from an item box depends on your position. In Mario Kart 7, first place mostly gets bananas and green shells, while last place gets Bullet Bills and Lightning, and no bananas at all (Super Mario Wiki).

2. Rubber banding

Racers far ahead ease off a little and racers far behind speed up a little, as if a rubber band connected them. The trick is keeping it small and smooth, so nobody sees a car suddenly jump. Mario Kart’s computer racers are known to adapt to the player’s speed (Wikipedia).

3. Pacing director

Left 4 Dead’s AI Director watches how the players are doing and decides when and where zombies appear, building tension, then letting players breathe before the next wave (GamesRadar). Valve’s Gabe Newell described it as creating moments that feel like a story instead of a difficulty that just ramps up (Wikipedia).

4. Help after repeated deaths

Crash Bandicoot quietly adjusted its difficulty by how many times you died, to help weaker players without changing the game for better ones, as lead designer Jason Rubin put it in Andy Gavin’s account of making the game (Wikipedia). Here, after three deaths at the same pit, the far ledge grows a little, then shrinks back once you’re across.

5. Enemies that adapt

Resident Evil 4 changed how enemies behave and how much damage they deal based on how well you play, and almost nobody knew; the main mention was in the official strategy guide (Wikipedia). In this demo the enemy eases off by up to 20% while you’re getting hit.

Doesn’t that punish good players?

It shouldn’t, and that’s the test. In the race demo, a player holding full throttle wins by about 0.9 seconds without rubber banding and still wins by about 0.5 seconds with it. The gap shrinks, the winner doesn’t change. If your adjustments ever flip a result the player clearly earned, they’re too strong.

Add it to your game

  1. Copy the skill at the end of this page into your project.
  2. Ask your agent: “Make my game adjust to how well the player is doing.”
  3. Play it at your worst and at your best, then tune in plain words: “The catch-up is too strong.”

The rules that keep it invisible:

  • Small and smooth. Ten percent, eased in, never a visible jump.
  • Take help away again. Help after deaths should disappear once the player is past the hard part.
  • Measure with weak and strong players. The skill’s last step runs both, so you can see the gap close without the best player losing.

The skill that made it work

This is the whole skill we gave Claude Code. Copy it into your project and ask your agent to make your game adjust to the player. The last step makes it measure weak and strong players instead of guessing.

adaptive-difficulty
  1. Find where the player can win or lose, and what shows how they are doing: race position, deaths at the same spot, damage taken, time.
  2. Put every trick behind one named switch in a single settings object, all on by default, so each can be tested on its own.
  3. catch-up-items. Make random pickups depend on position, like Mario Kart: leaders mostly get weak or defensive items, the last places get strong ones that close the gap.
  4. rubber-band. Racers far ahead ease off a little and racers far behind speed up a little, capped at about 10%, smoothly, never as a visible jump.
  5. pacing-director. Track intensity (damage taken, enemies nearby, recent kills). Send more enemies while intensity is low, then hold back for a short relax window after a peak, so fights come in waves of build-up, peak and rest. Left 4 Dead's AI Director works on this idea.
  6. death-help. After 3 deaths at the same place, quietly give a little help: a shield, an extra checkpoint, or one fewer enemy. Remove it once the player gets past. Crash Bandicoot adjusted its difficulty by the number of deaths so weaker players got help without changing the game for better players.
  7. performance-enemies. If the player is doing very well, enemies attack a bit more often or hit a bit harder; if they struggle, a bit less. Keep it within narrow bounds. Resident Evil 4 adjusted enemy behaviour and damage this way.
  8. Measure it. Run scripted players of three skill levels (weak, average, strong) with tricks on and off. Report finish rate, time, deaths, and for races how often the finish was close (under 1 second). With the tricks on, the weak player should finish more often and races should be closer, while the strong player still wins most of the time.

Save it as .claude/skills/adaptive-difficulty/SKILL.md in your project. Or connect your agent and type /aigamedev: it loads this skill with its reference files and the results from this post.