Spielerando

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.

Also called: Input buffering for jumps, Jump cache, Early jump press, Pre-landing jump.

In a violet pixel art cavern, a green axolotl in an orange spacesuit falls towards a floating platform while a translucent copy of it already springs up from the glowing landing spot, with a round button lit beside it.
Gillnaut, an invented pixel platformer in alien caves. 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 "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.

presswalks off the edgepress in timeextra moment runs outlandsreaches the toppress kept past the toppress in the airlandslands, jump startskept press runs outruns out as it landsOn the groundRisingExtra momentPress keptFalling
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

ValueStart withWhat it changes
bufferTime0.12 sHow long a press is remembered. Longer is more forgiving, but the character may jump after the player changed their mind. Zero turns it off.
coyoteTime0.09 sHow long after leaving the ground a jump still works.
jumpSpeed12 units/sHow hard the character pushes off. Together with gravity it sets the height of a full jump.
cutSpeed4 units/sHow fast a jump may still rise once the button is let go. Lower makes a quick press a smaller hop.
gravity32 units/s²How fast the character falls. That sets how far above the ground a press still counts.
maxFallSpeed20 units/sThe 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

Works well with

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.

  1. 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)]
  2. 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)]
  3. 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)]
  4. 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)]
  5. 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)]
  6. 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)]

Weakest record of the four movement mechanics. No developer statement about any game before 2013 was found, and the Braid point rests on one sentence and one figure in an academic paper written years after the game. Discarded claim, for a reviewer to judge: the same 2016 paper says the Mario game it studied, Super Mario Bros. 3, has a jump cache, which would move this back to 1988. It is not used, because the paper states that its Mario data was taken from Aldrich's tables, and it describes those tables as made by inspecting game memory. That falls under the project's ban on datamined tables. Survey citation mismatch: the 2020 survey attributes the Mario detail to a reference listing Super Mario Bros. 2, while the paper it cites names Super Mario Bros. 3. Braid's date differs between sources, 2009 in the paper and 2008 in the survey; platform versions were not checked. Pulver's post is dated only indirectly, by the mailing-list message of 4 April 2013; the true publication date is unknown but no later than that. Pulver's title may not be the earliest use of the word for jumps: buffering of input in other genres, such as fighting games, was not researched here. Saltsman's 2010 Canabalt article was checked and does not describe accepting a press made before landing. Terms found: jump input buffering, jump buffering, jump cache, button caching, tolerance. Thorson disclaims invention without naming an earlier game.

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