Spielerando

Glide

A glide turns a fall into a slow drift while the player holds the button. Start it only with a fresh press while falling, ease the fall down to the glide speed instead of snapping to it, and let only time spent gliding use up the glide time. Standing on the ground fills it up again.

Also called: Float, Slow fall, Parachute.

A lanky heron-like explorer drifts down between floating islands under a wide mint-green cloth canopy, with a long gap of sky below.
Skerrywhorl, an invented sky-island exploration game. 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 "Glide" to my game.

What it should do: A glide lets the player cross gaps that a jump cannot, and gives time to aim a landing. It rewards planning, and it forgives a jump that was a little too short.

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

```mermaid
stateDiagram-v2
  [*] --> ground
  ground: On the ground
  air: In the air
  glide: Gliding
  spent: Glide used up
  ground --> air: walks off an edge
  air --> ground: lands
  air --> glide: fresh press while falling
  air --> spent: press uses the last time
  glide --> air: button is released
  glide --> spent: glide time runs out
  glide --> ground: lands
  spent --> ground: lands
```

Use these starting values:
- glideFall: 3 units/s
- brake: 90 units/s²
- glideTime: 2.5 s
- gravity: 32 units/s²
- maxFallSpeed: 20 units/s

Watch out for these common mistakes:
- Holding the jump button: Tell your AI: start a glide only on a fresh press in the air. A button held since the jump does not count.
- The glide sets the speed: Tell your AI: ease a faster fall down to the glide speed, and leave a slower fall to gravity until it reaches the glide speed.
- Letting go refills the time: Tell your AI: only the ground fills the glide time up. Letting go keeps what is left.
- A glide on the way up: Tell your AI: start a glide only when the character is falling or has stopped rising.
- The press on the edge: Tell your AI: let coyote time and the ground jump decide first, and start a glide only once the character is truly in the air.

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 glide lets the player cross gaps that a jump cannot, and gives time to aim a landing. It rewards planning, and it forgives a jump that was a little too short.

How it runs, as a diagram

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

walks off an edgelandsfresh press while fallingpress uses the last timebutton is releasedglide time runs outlandslandsOn the groundIn the airGlidingGlide used up
How it runs, as a diagram
  • On the ground → In the air: walks off an edge
  • In the air → On the ground: lands
  • In the air → Gliding: fresh press while falling
  • In the air → Glide used up: press uses the last time
  • Gliding → In the air: button is released
  • Gliding → Glide used up: glide time runs out
  • Gliding → On the ground: lands
  • Glide used up → On the ground: lands

Good starting values

ValueStart withWhat it changes
glideFall3 units/sThe speed the fall settles at while gliding. About a seventh of the normal fastest fall: slow enough to feel like floating, fast enough that the glide still goes down.
brake90 units/s²How fast a faster fall is eased down to the glide speed. From the normal fastest fall it takes about a fifth of a second, which is quick but not a hard stop.
glideTime2.5 sHow long one airtime may be spent gliding. At the starting values that carries the character about seven units down, enough to cross a gap but not to ignore it.
gravity32 units/s²How fast a fall speeds up when not gliding.
maxFallSpeed20 units/sThe fastest the character can fall when not gliding.

What usually goes wrong

Holding the jump button

If the glide starts whenever the button is down and the character is falling, every jump turns into a glide at the top, and the player can no longer fall on purpose.

Fix: Tell your AI: start a glide only on a fresh press in the air. A button held since the jump does not count.

The glide sets the speed

If the glide sets the fall speed to the glide speed, a fast fall stops dead as if it hit a wall, and a slower fall is sped up to the glide speed.

Fix: Tell your AI: ease a faster fall down to the glide speed, and leave a slower fall to gravity until it reaches the glide speed.

Letting go refills the time

If the glide time starts again whenever the button is released, a player who taps the button every second glides forever.

Fix: Tell your AI: only the ground fills the glide time up. Letting go keeps what is left.

A glide on the way up

A glide that can start while the character is still rising flattens the jump and throws the arc away.

Fix: Tell your AI: start a glide only when the character is falling or has stopped rising.

The press on the edge

A press on the tick the character steps off an edge is meant as a late jump, not as a glide. Reading it as a glide eats the jump.

Fix: Tell your AI: let coyote time and the ground jump decide first, and start a glide only once the character is truly in the air.

How to check it works

Works well with

Clashes with Double Jump: A press in the air can mean an air jump or the start of a glide, and both use the same button. Use the air jump on the press and start the glide on a second press or a hold after it. Or give the glide its own button.

Clashes with Ground Pound: Down in the air and a held button can both be asked for at once. Let the slam end the glide at once. It is the more committed move.

Common questions

what do i tell my ai to add a glide

Paste this: Add a glide: a fresh press of the jump button in the air, while the character is falling, starts a slow fall that lasts while the button is held. Ease a faster fall down to the glide speed, never lift the character, use up a glide time only while gliding, and fill it up again on the ground.

why does my character glide at the top of every jump

The glide probably starts whenever the button is down and the character is falling. Make it need a fresh press in the air, so a button held from the jump does nothing.

should a glide have a time limit

Usually yes, or a glide can replace the jump and make gaps and falls meaningless. A few seconds per airtime is a good start, filled up only on the ground.

can the glide use the same button as the double jump

It can, but the player must know which one a press means. Spend the air jumps first and start the glide on a press after they are gone, or give the glide its own button.

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