Jump Buffering
Jump buffering remembers a jump press for a moment, so a press just before landing still gives a jump as soon as the character touches down. Start near 0.12 seconds. Start the jump first, then check if the button is still down, or a quick buffered press can give a full jump.

Paste this to your AI
Copy it into Claude, Cursor or ChatGPT. It already has good values and the usual mistakes in it.
Add "Jump Buffering" to my game.
What it should do: Players often press jump a little before they land. Buffering keeps that press, so the character jumps as soon as it can, and fast movement flows on instead of stalling on the ground.
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
rising: Rising
grace: Extra moment
kept: Press kept
falling: Falling
ground --> rising: press
ground --> grace: walks off the edge
grace --> rising: press in time
grace --> falling: extra moment runs out
grace --> ground: lands
rising --> falling: reaches the top
rising --> kept: press kept past the top
falling --> kept: press in the air
falling --> ground: lands
kept --> rising: lands, jump starts
kept --> falling: kept press runs out
kept --> ground: runs out as it lands
```
Use these starting values:
- bufferTime: 0.12 s
- coyoteTime: 0.09 s
- jumpSpeed: 12 units/s
- cutSpeed: 4 units/s
- gravity: 32 units/s²
- maxFallSpeed: 20 units/s
Watch out for these common mistakes:
- A quick press gives a full jump: Tell your AI: after the jump has started, check on every moment of the rise whether the button is still down, and shorten the jump if it is not. Only moving the check to later is not enough: that catches a tap at the moment of take-off, but not a button let go in the air before landing. Our tests show the fix keeps the full height for a held jump. If you want every buffered jump at full height, make that a choice and not an accident of the order.
- The press stays around too long: Tell your AI: keep the buffer short, and clear it whenever something else takes over the character.
- The buffer and coyote time add up: Tell your AI: clear both timers at the moment a jump starts.
- Rounding makes the time a little longer: Tell your AI: treat a tiny bit of time left as none, or count whole game steps at a fixed rate.
- A kept press right at an edge: Tell your AI: fill coyote time on the step the character lands, so a kept press still jumps.
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
Players often press jump a little before they land. Buffering keeps that press, so the character jumps as soon as it can, and fast movement flows on instead of stalling on the ground.
How it runs, as a diagram
Everything it can be in, and what moves it on. Your AI builds from exactly this.
How it runs, as a diagram
- On the ground → Rising: press
- On the ground → Extra moment: walks off the edge
- Extra moment → Rising: press in time
- Extra moment → Falling: extra moment runs out
- Extra moment → On the ground: lands
- Rising → Falling: reaches the top
- Rising → Press kept: press kept past the top
- Falling → Press kept: press in the air
- Falling → On the ground: lands
- Press kept → Rising: lands, jump starts
- Press kept → Falling: kept press runs out
- Press kept → On the ground: runs out as it lands
Good starting values
| Value | Start with | What it changes |
|---|---|---|
| bufferTime | 0.12 s | How long a press is remembered. Longer is more forgiving, but the character may jump after the player changed their mind. Zero turns it off. |
| coyoteTime | 0.09 s | How long after leaving the ground a jump still works. |
| jumpSpeed | 12 units/s | How hard the character pushes off. Together with gravity it sets the height of a full jump. |
| cutSpeed | 4 units/s | How fast a jump may still rise once the button is let go. Lower makes a quick press a smaller hop. |
| gravity | 32 units/s² | How fast the character falls. That sets how far above the ground a press still counts. |
| maxFallSpeed | 20 units/s | The fastest the character can fall. |
What usually goes wrong
A quick press gives a full jump
Normally a quick press gives a short hop. With buffering, a quick press can give a full jump. That happens when the button was let go before or at the moment of take-off: the game only watches for the button being let go, and that has already happened. Letting go after take-off still shortens the jump, so this does not hit every buffered jump. Our tests show this.
Fix: Tell your AI: after the jump has started, check on every moment of the rise whether the button is still down, and shorten the jump if it is not. Only moving the check to later is not enough: that catches a tap at the moment of take-off, but not a button let go in the air before landing. Our tests show the fix keeps the full height for a held jump. If you want every buffered jump at full height, make that a choice and not an accident of the order.
The press stays around too long
With a long buffer, the character jumps on landing from a high fall, although the player has already given up on that jump.
Fix: Tell your AI: keep the buffer short, and clear it whenever something else takes over the character.
The buffer and coyote time add up
If a jump clears only one of the two timers, the other can start a second jump.
Fix: Tell your AI: clear both timers at the moment a jump starts.
Rounding makes the time a little longer
Computers do not add up small bits of time exactly, so a timer can end with a tiny bit left over.
Fix: Tell your AI: treat a tiny bit of time left as none, or count whole game steps at a fixed rate.
A kept press right at an edge
A press is waiting for the landing, and the character lands at the very edge of a platform and runs off the next moment. If coyote time only fills up a step after the landing, there is neither ground nor time left, and the press is lost.
Fix: Tell your AI: fill coyote time on the step the character lands, so a kept press still jumps.
How to check it works
- Your character is falling, just above the ground. Press jump just before landing: The character jumps right after landing.
- Your character is falling from high up. Press jump early, so the remembered press runs out before landing: The character lands and stays on the ground.
- Your character is in the air. Press jump just before landing and keep holding until the top of the jump: The jump reaches full height.
- Your character is in the air. Press jump just before landing and let go right away: The jump is a short hop.
- Your character stands on the ground. Tap jump as quickly as you can: You get a short hop. Without the fix it would be a full jump.
- Your character is in the air. Press jump just before landing and keep holding: The character jumps exactly once.
- Your character ran off a ledge and jumped in the coyote time. Press jump again: The second press does nothing.
- Buffering is set to zero. Press jump in the air just above the ground: The press is forgotten and the character stays on the ground after landing.
- You press jump just before your character lands at the very edge of a platform. It touches down and runs off the next moment: The jump still happens.
Works well with
- Variable-Height Jump: The other way round, a quick press gets the full height. Start the jump first, then keep watching for the whole rise whether the button is still down.
- Coyote Time: Together they must never give a second jump. Make one jump decision that looks at both timers, and clear both when the jump starts.
Clashes with Double Jump: A press in the air can mean an air jump now or a remembered jump on landing. Use the air jump first, and remember the press only when none is left. Our own code here has no air jumps, so this order is not tested here.
Common questions
what is jump buffering
It remembers a jump press for a moment, so a press just before landing gives a jump as soon as the character touches the ground, instead of being lost.
how long should a jump buffer be
Start at about 0.12 seconds, roughly seven frames at 60 frames per second. Much longer and the character jumps after the player has changed their mind.
why does my buffered jump always go full height
The game probably only watches for the button being let go, and that happened before the jump started. Tell your AI: after the jump has started, check on every moment of the rise whether the button is still down.
how do jump buffering and coyote time work together
Use one jump decision that looks at both timers, and clear both when the jump starts. Then one press gives one jump, wherever in the two time spans it falls.
what do i tell my ai to add jump buffering
Paste this: Add jump buffering: remember a jump press for 0.12 seconds and jump as soon as the character is on the ground. After the jump has started, check on every moment of the rise whether the button is still down, and shorten the jump if it is not.
Where it comes from
Earliest example we could find: Braid (Number None), as described in Fasterholdt, Pichlmair and Holmgard (2016) (2009). The paper reports that Braid stores a jump press made some distance above the ground and performs the jump on landing, and shows this in a figure. The year is the one the paper cites; the 2020 survey cites Braid as 2008. The documentation dates from 2016. The paper does not explain how it obtained the Braid detail, since Braid was not one of its formally measured games, but nothing in it points to memory inspection.
- 2009 Braid (Number None), as described in Fasterholdt, Pichlmair and Holmgard (2016): The paper reports that Braid stores a jump press made some distance above the ground and performs the jump on landing, and shows this in a figure. The year is the one the paper cites; the 2020 survey cites Braid as 2008. The documentation dates from 2016. The paper does not explain how it obtained the Braid detail, since Braid was not one of its formally measured games, but nothing in it points to memory inspection. [You Say Jump, I Say How High? Operationalising the Game Feel of Jumping (Fasterholdt, Pichlmair, Holmgard, DiGRA/FDG 2016)]
- 2013 Kyle Pulver, 'Jump Input Buffering' (blog post): Earliest dated technique write-up found, and the earliest appearance of the buffering name for jumps found here. The post existed by 4 April 2013, when a student game-development mailing list recommended it and summarised the idea. The original could not be opened. The mailing list is a weak source, used only to date the post and give its title and gist. [[Sgdc] Platformer Physics: Jump Input Buffering (Kenny Goff, Stevens SGDC mailing list, 2013-04-04)][GameMaker Platformer Jumping Tips (Lisa Brown, Game Developer, 2017-10-05)]
- 2014 Yoann Pignole, 'Platformer controls: how to avoid limpness and rigidity feelings': A developer blog post explains that players often press jump slightly before touching the ground and proposes accepting the press when the character is near the ground. It calls this a tolerance and does not use the word buffering. [Platformer controls: how to avoid limpness and rigidity feelings (Yoann Pignole, Game Developer, 2014-01-03)]
- 2016 Fasterholdt, Pichlmair and Holmgard, 'You Say Jump, I Say How High?': A peer-reviewed paper on jump feel treats the behaviour as a named implementation detail, using the term jump cache. [You Say Jump, I Say How High? Operationalising the Game Feel of Jumping (Fasterholdt, Pichlmair, Holmgard, DiGRA/FDG 2016)]
- 2017 Lisa Brown, 'GameMaker Platformer Jumping Tips': A tutorial on Game Developer presents jump input buffering as a standard small fix, recommends Pulver's article, and says many student platformers lack it. [GameMaker Platformer Jumping Tips (Lisa Brown, Game Developer, 2017-10-05)]
- 2020 Celeste; Maddy Thorson's game-feel thread and essay 'Celeste & Forgiveness': Thorson lists Jump Buffering as a Celeste technique in the March 2020 thread and later essay, and says these techniques were not invented for the game. The Pichlmair and Johansen survey of November 2020 files it under button caching as a common player support function. [Celeste & Forgiveness (Maddy Thorson)][Developer of super-difficult & high-speed masterpiece 2D action game 'Celeste' explains 'points about action' (Gigazine, 2020-03-17)][Designing Game Feel. A Survey (Pichlmair and Johansen, arXiv 2011.09201, 2020-11-18)]
What was checked
- 18 tests pass on the reference code.
- The state diagram was checked against the code, at the default values and at every listed low and high value.
- The Godot port passes the same tests on the real engine.
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