What is coyote time? Why you can jump after running off a ledge
Coyote time is a short grace window that lets the player jump for a moment after running off a ledge. It is usually about 0.1 seconds, roughly one blink. The player never sees it. They just feel that the controls are fair, because the game accepts a jump they pressed a little too late.
What the game is doing
Normally a game only lets you jump while your feet touch the ground. Coyote time bends that rule:
- You run off the edge of a platform. Your feet leave the ground.
- The game starts a hidden timer, usually 0.1 seconds.
- If you press jump before the timer runs out, the game treats it as a normal jump from the ground.
- When the timer hits zero, the jump is gone and you fall.
At 60 frames per second, 0.1 seconds is 6 frames. That is too short to notice as a rule, but long enough to save almost every "I pressed it in time!" jump.
The name comes from the cartoon coyote who runs off a cliff and hangs in mid-air until he looks down. The game gives you that same moment of grace.
Why it works
Players judge a jump by what they see, not by the exact frame their feet left the ground. When you run toward an edge, your thumb hits the button when the character looks like it is at the edge. On screen that is often a few frames too late.
Without coyote time, the game is technically right and the player still feels cheated. They pressed jump, the character fell, and they blame the controls. With coyote time, the game quietly agrees with the player's eyes. Nobody thanks the game for it. They just say the controls feel good.
That is the whole point of a good hidden trick: the player should never notice it, only the result.
Real games that use it
Celeste is the clearest public example, because its developers released the player code. In Player.cs the grace window is one line: private const float JumpGraceTime = 0.1f;. Every frame on the ground resets the timer to 0.1 seconds. Every frame in the air counts it down. While it is above zero, a jump still works.
Celeste is known as a hard, precise platformer. It still gives you this help on every single ledge, and that is part of why its difficulty feels fair instead of cruel.
How to use it in your game
Coyote time takes about five lines of code. Keep a timer, reset it while grounded, and count it down in the air:
const float CoyoteTime = 0.1f;
float coyoteTimer;
void Update(float dt) {
if (IsGrounded()) coyoteTimer = CoyoteTime;
else coyoteTimer -= dt;
if (JumpPressed() && coyoteTimer > 0) {
Jump();
coyoteTimer = 0; // no double jump from the same window
}
}
Tips for tuning it:
- Start at 0.1 seconds (6 frames at 60 fps). Go up to about 0.15 for a casual game. Much longer and players notice they are jumping from thin air.
- Reset the timer to zero when the player jumps. Otherwise they can jump twice inside the same window.
- Count in time, not frames, so it feels the same at 30, 60 or 144 fps.
- Pair it with input buffering. Coyote time forgives a late jump. Input buffering forgives an early one. Most good platformers use both.
- Playtest by watching, not asking. Players will not tell you about coyote time. You will only see fewer frustrated deaths at ledges.
FAQ
How long is coyote time?
Most games use around 0.1 seconds, which is 6 frames at 60 fps. Celeste uses exactly 0.1 seconds. Casual games sometimes go a little longer.
Is coyote time cheating?
It bends the rules in the player's favor, but it matches what the player sees on screen. Without it, many correct-looking jumps would fail, so most players would call the game unfair, not the other way round.
Why is it called coyote time?
It is named after the cartoon coyote who runs off a cliff and stays in mid-air until he looks down. The game gives the player the same short moment before gravity takes over.
Related: Input buffering ยท Last-HP mercy