Spielerando

Ladder Climbing

On a ladder, gravity stops and the character moves up and down at a steady speed. Grab only when the player presses up or down, never just for touching it. Slide the character onto the middle, step off at both ends, and give a jump off the ladder a short wait before it can grab again.

Also called: Ladders, Climbing, Rope climbing.

A round mole in a yellow raincoat and lantern helmet climbs a wooden ladder up through a hollow tree toward a bright circle of daylight, with glowing mushrooms on the bark walls, drawn in chalk pastel.
Burrowmoss Deep, an invented tree-hollow adventure. Invented game, image generated with AI.

Paste this to your AI

Copy it into Claude, Cursor or ChatGPT. It already has good values and the usual mistakes in it.

Add "Ladder Climbing" to my game.

What it should do: A ladder joins levels vertically without a jump. It must feel safe to grab, easy to leave, and never trap the character or catch it again by accident.

Build it exactly as this state machine. First check that it fits my game, then build it like this:

```mermaid
stateDiagram-v2
  [*] --> free
  free: Off the ladder
  climbing: Climbing
  hanging: Hanging still
  leaping: Jumped off
  free --> climbing: presses up or down
  climbing --> hanging: stops pressing
  hanging --> climbing: presses up or down
  climbing --> free: reaches an end
  hanging --> free: ladder gone or end
  climbing --> leaping: jumps off
  hanging --> leaping: jumps off
  leaping --> free: wait is over
```

Use these starting values:
- climbSpeed: 3 units/s
- snapSpeed: 10 units/s
- jumpOffSpeed: 5 units/s
- jumpOffUp: 4 units/s
- regrabLock: 0.25 s

Watch out for these common mistakes:
- Walking past a ladder: Tell your AI: grab only when the player presses up or down while touching the ladder, never from touching alone.
- The ladder ends under the character's feet: Tell your AI: when the next step would pass the top or the bottom, let go and stand exactly at that end.
- Climbing down from a platform: Tell your AI: when the character stands at the top, pressing down grabs the ladder. Pressing up there does not.
- Jumping off and grabbing again: Tell your AI: after a jump off, ignore the ladder for a short wait, long enough to get clear.
- A sudden jump to the middle: Tell your AI: slide it toward the middle at a set speed, and stop exactly at the middle without passing it.
- The ladder disappears: Tell your AI: check every tick that the ladder is still there, and let go if it is not.

Do not change anything else in the game. Do not claim anything without proof: model what it takes, and show me what your solution rests on and how I can see that it works. If you cannot show something, say you do not know. When you are done, tell me in plain words how to try it.

Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP

What it does

A ladder joins levels vertically without a jump. It must feel safe to grab, easy to leave, and never trap the character or catch it again by accident.

How it runs, as a diagram

Everything it can be in, and what moves it on. Your AI builds from exactly this.

presses up or downstops pressingpresses up or downreaches an endladder gone or endjumps offjumps offwait is overOff the ladderClimbingHanging stillJumped off
How it runs, as a diagram
  • Off the ladder → Climbing: presses up or down
  • Climbing → Hanging still: stops pressing
  • Hanging still → Climbing: presses up or down
  • Climbing → Off the ladder: reaches an end
  • Hanging still → Off the ladder: ladder gone or end
  • Climbing → Jumped off: jumps off
  • Hanging still → Jumped off: jumps off
  • Jumped off → Off the ladder: wait is over

Good starting values

ValueStart withWhat it changes
climbSpeed3 units/sHow fast the character moves along the ladder. About half of walking speed: climbing should feel like effort but should not drag.
snapSpeed10 units/sHow fast the character slides onto the ladder's middle. Quick enough to be done in a few frames, slow enough that it does not look like a jump.
jumpOffSpeed5 units/sThe sideways push of a jump off. It must carry the character clear of the ladder's width.
jumpOffUp4 units/sThe upward push of a jump off. Lower than a ground jump, so leaving a ladder is a hop and not a leap.
regrabLock0.25 sThe wait after a jump off before the ladder can be grabbed again. It must be long enough for the character to move away, or the same key press catches the ladder at once.

What usually goes wrong

Walking past a ladder

If touching a ladder grabs it, a player who only walks past gets pulled onto it. This is the most common complaint about ladders.

Fix: Tell your AI: grab only when the player presses up or down while touching the ladder, never from touching alone.

The ladder ends under the character's feet

At the top the character hovers over the platform, climbs into it, or keeps climbing on nothing. At the bottom it sinks into the floor.

Fix: Tell your AI: when the next step would pass the top or the bottom, let go and stand exactly at that end.

Climbing down from a platform

At the top edge the ladder is under the character's feet. If the grab needs the character to be below the top, the player cannot climb down and has to jump.

Fix: Tell your AI: when the character stands at the top, pressing down grabs the ladder. Pressing up there does not.

Jumping off and grabbing again

The player jumps off and still holds up, so the ladder catches the character on the very next tick and the jump goes nowhere.

Fix: Tell your AI: after a jump off, ignore the ladder for a short wait, long enough to get clear.

A sudden jump to the middle

Moving the character onto the ladder's middle in one step makes it pop sideways, and on a wide ladder that looks like teleporting.

Fix: Tell your AI: slide it toward the middle at a set speed, and stop exactly at the middle without passing it.

The ladder disappears

A ladder that is removed, broken or left behind by a moving platform keeps the character in a climb with nothing to hold on to.

Fix: Tell your AI: check every tick that the ladder is still there, and let go if it is not.

How to check it works

Works well with

Clashes with Jump Buffering: A jump pressed just before grabbing a ladder is remembered and fires the moment the character lands somewhere, or jumps off the ladder it just grabbed. Clear the remembered jump when the character grabs a ladder.

Common questions

what do i tell my ai to add ladders

Paste this: Add ladders. The character grabs a ladder only when the player presses up or down next to it, slides to the middle, climbs at a steady speed without gravity, steps off at the top and bottom, and a jump off pushes away with a short wait before it can grab again.

why does my character grab every ladder it walks past

The grab starts from touching alone. Change it so the grab needs a press of up or down, and so a press toward the end the character is standing at does nothing.

how fast should climbing be

About half the walking speed. Faster makes ladders a cheap shortcut, and much slower makes players avoid them. Make it the same up and down unless you want climbing down to feel like a slide.

should a character be able to jump off a ladder

Yes, with a small push away and a short wait before it can grab again. A jump that goes straight up from the ladder is fine, but without the wait the character just catches the ladder again.

Where it comes from

We could not find a reliable origin for this one yet.

Where this mechanic comes from has not been researched yet.

Games are named only as references. Names and marks belong to their owners, and nothing here is endorsed by them.

What was checked

This is what separates the blueprint from a catalogue entry: the values on this page come from code that runs.

Your AI gets the code

Tested example code comes through the Spielerando connection, so your AI can use it right away. How to connect it