Facts
Games
3 · 1988–2018
Evidence
Code (15)
Verified (7)
Developer (1)
Wiki (1)
Guide (1)
Sources
17
On this page
  1. How it works
  2. Implementations
  3. Name and history
  4. Related
  5. Games
  6. References
  7. Sources

Coyote time lets a character jump for a few frames after running off a ledge. Both versions of Celeste implement it as a grace timer that refills on the ground and counts down in the air1,2,3.

Interactive: movement-lab (needs JavaScript)

Running off a ledge, three ways. Each game’s ledge sits where its player walks off on frame 30, so a press comes the same number of frames late in every game.

#How it works

every update:
    if on ground:    grace = GRACE                  # refill
    else if grace > 0: grace -= step                # count down in the air
    ...
    if jump pressed and grace > 0:
        jump as if from the ground; grace = 0

In both versions of Celeste, the countdown runs before the jump check, so a timer worth exactly N steps allows N − 1 airborne updates2,3. The Nth subtraction reaches zero and fails the > 0 test.

#Implementations

#Celeste (2018)

Celeste’s grace timer is 0.1 s1. It follows the loop above, subtracting the update’s time step before the player state runs2.

At 60 updates per second17, the timer is nominally 6 frames, but the float timer’s sixth subtraction lands within rounding error of zero. A (float)0.0166667 s step leaves it below zero, a 5-update window; an exact (float)(1/60) leaves it above, a 6-update window16.

The released code doesn’t set the step. FNA, which the macOS and Linux builds use, defaults to 0.0166667 s18. The DGMI wiki’s “up to 5 frames after leaving a ledge” fits that step, not the other18.

#Celeste Classic

The C# port of the PICO-8 Celeste Classic counts whole updates: its grace counter is 6 (5 airborne updates)3. Inside Celeste, it runs at 30 updates per second, half the main game’s rate19. Its 5 airborne updates match the 2018 game’s likelier window18 but last twice as long3,19.

#Super Mario Bros. 3 (1988)

Super Mario Bros. 3 sets its window from some of the objects Mario rides, where Celeste refills its timer on every grounded update15,2. Such an object sets the air-jump countdown to 5, 8, or 1615, and counts it down before it tests it, so the window is one update shorter than the number.

#Games without it

None of these has coyote time. Super Mario Bros. starts a jump only from Mario’s “on the ground” state4. In Mega Man 2, a grounded state that finds no floor switches to the jumping state, which checks for a press only on landing10. Sonic the Hedgehog checks for a jump only in its two grounded modes12. Sonic the Hedgehog 2 and Sonic 3 & Knuckles call their jump routine only from grounded modes13,14. Super Mario Bros.: The Lost Levels keeps Super Mario Bros.’s rule9,4. In Castlevania, walking off a ledge starts a falling state that reads no buttons20. Super Mario World starts a jump only while Mario isn’t in the air, and walking off sets him in the air earlier in the same frame21. In Metroid, walking off a ledge makes Samus airborne at once, and an airborne jump works only in lava8. In Metroid II: Return of Samus, running off a ledge starts a fall, and a fall jumps only while the timer set by an unmorph in the air runs11.

#The walk-off frame

Without a grace window, whether a press on the frame the character walks off still jumps depends on the order of the frame. Super Mario Bros. runs its jump check before it moves Mario22, and Castlevania’s standing state tests the floor before it moves Simon or reads A23, so a press on that frame jumps in both. Sonic the Hedgehog checks for a jump before its grounded routine moves him24, and the walk-off frame’s press jumps there too25. Mega Man 2 moves Mega Man and tests the floor before it checks for a jump26, and Super Mario World’s collision puts Mario in the air before its jump code runs21, so the same press comes too late. A ledge in the movement lab shows each case: the first preset presses on the walk-off frame.

#Name and history

KidsCanCode’s Godot tutorial traces the name to a cartoon coyote who runs off a cliff and falls only once he looks down27.

Games

GameYearHowNote
Super Mario Bros. 31988Some platformsa few objects leave a 4- to 15-frame window to jump from the air
Celeste Classic2015Grace timera 6-update grace counter that refills on the ground
Celeste2018Grace timerJumpGraceTime, a float timer of about 5 or 6 frames
Every claim about this mechanic, by game (43)
Super Mario Bros. 1985Mario gets no grace window after leaving a ledge; the jump check refuses airborne jumps unless he is swimming.Code
Mario leaves a ledge on the frame his horizontal move leaves neither foot point over a block; the falling state that the background collision routine sets first then stays, so he ends that frame in the air, with a vertical speed of 0, and starts falling on the next. Walking right, the left foot point decides, so he walks 5 px past the edge (measured); walking left, the right foot point decides, 4 px past it (from the code's points).Verified
A falling Mario's gravity is a stored falling gravity, which the falling routine copies in every frame. Each area's entrance sets it to $28 (40/256 px/frame²), and only a jump changes it, to its row's falling gravity, so a walk-off before any jump falls at $28 and one after a jump at that jump's falling gravity.Verified
Castlevania 1986Each frame, the standing and crouching states test Simon's floor points before they move him or read A; with no ground under either point, they put him in the falling state and end the frame there, so he doesn't move and A isn't read. The frame whose step carries his second floor point past an edge still reads A after the step, so a press on that frame jumps.Verified
Simon has no coyote time. The falling state reads no buttons: A after he walks off doesn't jump, B doesn't whip, and the d-pad doesn't steer: he keeps moving the way he was facing when he walked off.Verified
Metroid 1986Once Samus is airborne, the run and jump handlers start a jump only while she is in lava. Walking off a ledge makes her airborne at once: the vertical-acceleration routine sets the falling gravity on the first frame with nothing below her.Code
On the ground, the vertical-acceleration routine sets her top-speed value to $18 and tests the tiles under Samus before she moves. With none solid, and no elevator or frozen enemy under her, it sets the falling gravity, $1A, and adds it at once, so she is airborne from that frame. The running handler's air branch then turns her running pose into the plain jump pose, so letting go of the d-pad stops her (metroid-samus/air-run), and her top speed stays 1.5 px/frame.Code
Super Mario Bros.: The Lost Levels 1986The jump routine starts a jump only while the player state is 0, on the ground, or while the player is swimming, as Super Mario Bros.'s does. Walking off a ledge doesn't keep that state: the player's background collision routine sets a player in the normal or climbing state to falling (or, swimming, to state 1) on each frame of play before it looks for ground, and only landing on a block sets the state back to 0, so out of water a jump can't start after walking off a ledge. The background check skips that step only during the game's scripted routines (engine subroutines 0 to 3 and $0B).Code
Mega Man 1987Every frame that finds a floor under him sets Mega Man's vertical speed to $FF.$40, −0.75 px/frame, with no gravity after it, so each grounded frame's vertical move takes him 0.75 px down and tests x − 7 and x + 7 on the row under his feet; ground there puts him back on it with the Y fraction zeroed, and none starts a fall.Verified
Mega Man first counts as airborne on the frame whose move takes both floor points off a ledge with no ladder below it; that frame still moves him at the ground animation's speed, drops him 0.75 px, and leaves him falling at 1 px/frame in the jumping animation, so his feet are 0, 1, 3, 4, 6, 8, and 10 px below the ledge on the walk-off frame and the six after.Verified
Mega Man gets no grace window after leaving a ledge; his movement routine reads a fresh A press only on the branch where the frame's fall test found ground, either the map's floor or an object he stands on.Verified
Mega Man 2 1988Mega Man gets no grace window after leaving a ledge; a grounded state that finds no floor switches to the jumping state, which looks for a press only on the frame it lands.Verified
On the ground Mega Man keeps a vertical speed of −0.25 px/frame, the gravity applied after each landing's reset, so every grounded frame's vertical move takes him 0.25 px down and tests x − 7 and x + 7 on the row under his feet; ground there puts him back on it with the Y fraction zeroed, and none sends him to the jumping state.Verified
Mega Man first counts as airborne on the frame whose move takes both floor points off the ledge; that frame still moves him at the ground state's speed, drops him 0.25 px, and leaves him in the jumping state falling at 0.5 px/frame, so his feet are 0, 0, 1, 2, 3, 5, and 7 px below the ledge on the walk-off frame and the six after.Verified
Super Mario Bros. 3 1988Some objects Mario rides set an air-jump countdown, in which a jump still starts in the air, to 5, 8, or 16; the Parabeetle sets 5 as it droops. The jump routine decrements the count before testing it, so those values leave 4, 7, or 15 updates in which a press of A jumps.Code
Mega Man 3 1990A grounded frame tests the floor before it moves Mega Man: the test first moves him down by the resting speed, 0.25 px, and then tests the floor points there; if none is solid or a ladder top, and no platform holds him, it leaves him there, sets the jumping animation and the airborne state, and makes that frame's horizontal move the air move, 1.30 px/frame toward a held direction or none. No grace period follows: that frame ends before the ground state reads a jump press, and the airborne state reads no A press.Code
Super Mario World 1990When neither foot point finds a block and Mario isn't in the air, collision sets his in-air state to $24 (falling). Collision follows the move, so he counts as airborne on the frame whose move carries his trailing foot past the edge, already moved by the ground's vertical speed, 6/16 px/frame (3/16 with B held); gravity then adds 6/16 a frame (3/16 held) up to 70/16.Verified
Mario gets no grace window after walking off a ledge; the jump code starts a jump only while his in-air state is 0, and block collision, earlier in the same frame, has already set it to $24.Verified
Mega Man 4 1991Because the ground state tests the floor before it moves him, Mega Man walks one frame past the edge before he falls: the frame whose move takes all three floor points off a ledge still counts as grounded, and on the next the floor test finds nothing after a 1 px drop, so he leaves the ground falling 1.25 px/frame and that frame moves him by the air's rules. His feet are then 1, 2, 3, 5, 7, and 9 px below the ledge on that frame and the five after (computed).Code
Mega Man 4 gives no grace jump off a ledge. The ground state reads an A press only after the air routine reports him standing, and the air state reads no A press: it reads only whether A is held, to cut a rise. So a press on the frame the floor test first fails, or on any later frame of the fall, doesn't jump.Code
Metroid II: Return of Samus 1991Running off a ledge puts Samus straight into the falling pose, and in that pose a jump press starts a jump only while a timer runs, the 16-frame window after she unmorphs in the air.Code
Sonic the Hedgehog 1991In the running game, on flat ground, when Sonic walks off a ledge a jump press on any of the next 5 frames gives him no upward speed, because only the grounded modes, the normal and rolling mode routines, call the jump routine.Verified
In the running game, walking and rolling off steps down built from Green Hill's 9, 10, and 11 px blocks, Sonic stayed on the ground over a 14 px step, his feet dropping 14 px on the frame his trailing floor sensor passed its edge; over a 15 px step he was in the air on that frame, with a Y speed of 0, no jump flag, and still curled if rolling, and the next frame's gravity made his Y speed $38.Verified
In the running game, at the end of the probe's flat runway, Sonic first counts as airborne on the frame whose move takes his trailing floor sensor past the ledge. Holding Right from a standstill 48 px before it, that is frame 49, his center 9 px past it; rolling toward it from 160 px, frame 95, his center 8 px past. A press on frame 49 still jumps, and one on any of the next 5 frames doesn't.Verified
On stages built in Green Hill Act 1 from the act's full flat 16 × 16 block, the movement lab's Sonic model matches Sonic the Hedgehog itself, run in MAME, on every frame of 100 random stages with random input scripts, three in four with floating blocks, and of the lab's stage presets, until a fall into a pit kills him at the bottom boundary or he nears the end of the built floor.Verified
Mega Man 5 1992Mega Man walks one frame past a ledge before he falls: each frame on the ground runs the airborne frame's vertical move and floor test before the walk, so the frame whose walk takes all three floor points off the ledge still counts as grounded. On the next, the floor test finds nothing after the 1 px drop, so that code puts him in the airborne state, falling at 1.25 px/frame, and moves him by the air's rules that frame. A press then or later in the fall doesn't jump: only the grounded frame reads A, and only once that floor test has found him standing.Code
Sonic the Hedgehog 2 1992Sonic 2 has no grace window after a ledge: only the grounded modes, normal and rolling, call the jump routine.Code
On stages built in Emerald Hill Act 1 from the act's full flat 16 × 16 block, solid on the collision path Sonic starts on, the movement lab's Sonic 2 model matches Sonic the Hedgehog 2 itself, run in MAME, on every frame of 100 random stages with random input scripts, three in four with floating blocks, and of the lab's stage presets, until a fall into a pit kills him at the bottom boundary or he nears the end of the built floor.Verified
When both floor sensors are above the floor after a ground move, the angle-and-position routine moves Sonic down onto it if it's within his X speed's whole pixels plus 4, at most 14; any farther and he's in the air. Sonic 1 reaches down 14 px at every speed.Code
Sonic 2's movement on flat ground is Sonic 1's with five changes: the spin dash, a ground speed above the top kept while forward is held, a blink after standing that skips up to five frames of input, balancing that turns him only when he's far over the edge, and a floor snap that reaches down his X speed's whole pixels plus 4 rather than 14 px.Code
Mega Man 6 1993Walking or standing off a ledge, Mega Man 6 stays in his ground loop while the whole byte of his vertical speed is 0: gravity's 0.25 px/frame a frame moves him down 0.25, 0.5, 0.75, and 1 px on the first four frames over the gap, and through the 2nd to 4th a fresh A press still jumps. After the 4th the loop finds the whole byte at 1 and enters the air loop with the fraction set to $CC, so he falls at 2.05 px/frame the next frame. Measured in Mesen from power-on, walking right off the ledge at X 160 near the start of Tomahawk Man's stage, he fell 0.25, 0.5, 0.75, and 1 px in the walking state, then 2.05 px/frame in the air; a press of A on the 4th frame over the gap jumped at the full take-off speed, and one on the 5th didn't.Verified
Sonic 3 & Knuckles 1994Sonic 3 & Knuckles has no grace window after a ledge: the jump routine is called only from the grounded modes.Code
On flat ground, not on an object, when both floor sensors find the floor more than |X speed's high byte| + 4 px below, at most 14, Sonic leaves the ground with his speeds as they are, unless a flag is set; closer than that, he moves down to it. Sonic 2 has the same rule; Sonic 1 used a flat 14 px.Code
On stages built in Angel Island Act 1 from the act's full 16 × 16 block, the movement lab's Sonic 3 & Knuckles model matches the game itself, run in MAME, on every frame of 100 random stages with random input scripts, three in four with floating blocks, and of the lab's stage presets, until a fall into a pit kills him at the bottom boundary or he nears the end of the built floor.Verified
Celeste Classic 2015Celeste Classic's grace counter resets to 6 on the ground and drops by 1 before each airborne jump check, so jumps work for 5 updates after leaving a ledge.Code
Inside Celeste, the Celeste Classic port skips every second frame to run at 30 Hz.Code
Celeste 2018The jump grace time, Celeste's coyote time, is 0.1 s.Code
Grounded updates refill the jump grace timer; airborne ones subtract the update's time step before the normal state's update, which jumps on a press while it is above zero.Code
Celeste's developers describe the game as locked to 60 updates per second, so the bundled PICO-8 port skips every second frame.Developer
At normal speed, Celeste's time step per update is most likely (float)0.0166667 s, the XNA and FNA default 166,667-tick step, not an exact 1/60 s.Wiki
The 0.1 s grace and 0.2 s variable-jump timers end on float rounding: a 0.0166667 s step gives 5 and 11 updates, and an exact 1/60 s step gives 6 and 12.Code
Each update starts by looking for ground; while her vertical speed is 0 or more, Madeline is on the ground if her hitbox, moved 1 px down, overlaps a solid or a jump-through platform.Code
generalKidsCanCode's Godot tutorial traces the name to a cartoon coyote who runs off a cliff and falls only when he looks down.Guide

References

  1. ^ abcCodeNoelFB/CelestePlayer.cs 48
    How we know

    The jump grace time, Celeste's coyote time, is 0.1 s.

    48        private const float JumpGraceTime = 0.1f;
    
    Source/Player/Player.cs line 48 at 1b0ce45 · upstream ↗

    Claim page

  2. ^ abcdeCodeNoelFB/CelestePlayer.cs 713–720, 2970–2975
    How we know

    Grounded updates refill the jump grace timer; airborne ones subtract the update's time step before the normal state's update, which jumps on a press while it is above zero.

    713                //Jump Grace
    714                if (onGround)
    ⋮
    717                    jumpGraceTimer = JumpGraceTime;
    ⋮
    719                else if (jumpGraceTimer > 0)
    720                    jumpGraceTimer -= Engine.DeltaTime;
    
    Source/Player/Player.cs lines 713–720 at 1b0ce45 · upstream ↗
    2970                if (Input.Jump.Pressed)
    ⋮
    2973                    if (jumpGraceTimer > 0)
    ⋮
    2975                        Jump();
    
    Source/Player/Player.cs lines 2970–2975 at 1b0ce45 · upstream ↗

    Claim page

  3. ^ abcdCodeNoelFB/CelesteClassic.cs 233–243, 297–304
    How we know

    Celeste Classic's grace counter resets to 6 on the ground and drops by 1 before each airborne jump check, so jumps work for 5 updates after leaving a ledge.

    233                if (on_ground)
    ⋮
    235                    grace = 6;
    ⋮
    242                else if (grace > 0)
    243                    grace--;
    
    Source/PICO-8/Classic.cs lines 233–243 at 1b0ce45 · upstream ↗
    297                    if (jbuffer > 0)
    ⋮
    299                        if (grace > 0)
    ⋮
    301                            // normal jump
    ⋮
    304                            grace = 0;
    
    Source/PICO-8/Classic.cs lines 297–304 at 1b0ce45 · upstream ↗

    Claim page

  4. ^ abcCodeXkeeper0/smb1prg.asm 4921–4925
    How we know

    Mario gets no grace window after leaving a ledge; the jump check refuses airborne jumps unless he is swimming.

    4922	LDA Player_State                             ; check player state
    4923	BEQ InitJS                                   ; if on the ground, branch
    4924	LDA SwimmingFlag                             ; if swimming flag not set, jump to do something else
    4925	BEQ NoJump                                   ; to prevent midair jumping, otherwise continue
    
    src/prg.asm lines 4921–4925 at 1cc3c92 · upstream ↗

    Claim page

  5. ^VerifiedXkeeper0/smb1prg.asm 11185–11195
    How we know

    Mario leaves a ledge on the frame his horizontal move leaves neither foot point over a block; the falling state that the background collision routine sets first then stays, so he ends that frame in the air, with a vertical speed of 0, and starts falling on the next. Walking right, the left foot point decides, so he walks 5 px past the edge (measured); walking left, the right foot point decides, 4 px past it (from the code's points).

    11185	JSR BlockBufferColli_Feet                    ; do player-to-bg collision detection on bottom left of player
    ⋮
    11189	JSR BlockBufferColli_Feet                    ; do player-to-bg collision detection on bottom right of player
    11190	STA $00                                      ; save bottom right metatile here
    11191	PLA
    11192	STA $01                                      ; pull bottom left metatile and save here
    11193	BNE ChkFootMTile                             ; if anything here, skip this part
    11194	LDA $00                                      ; otherwise check for anything in bottom right metatile
    11195	BEQ DoPlayerSideCheck                        ; and skip ahead if not
    
    src/prg.asm lines 11185–11195 at 1cc3c92 · upstream ↗

    Measured by a script in MesenCE 2.2.1 (build 4b8a196), on . It fails if the result disagrees with the claim.

    Claim page

  6. ^Codenmikstas/metroid-disassemblyBank07.asm 2142–2151, 2333–2343, 5452–5456, 5471–5472, 5518–5521, 2162–2190, 2286–2327, 2781–2782, 2701–2736
    How we know

    Each frame, the handler for Samus's state (standing, running, jumping) reads the pad and only then goes to her update routine, which reaches the lava-and-movement check. That routine accelerates and moves her vertically (the vertical acceleration, then one pixel at a time), and then horizontally (the horizontal acceleration, then one pixel at a time).

    Source_Files/Bank07.asm at 4270d57
    Our readingSamus's action negative: SamusStand2143–2144else: by the action, through ChooseRoutine (by its label)2145 0 SamusStand, 1 SamusRun, 2 SamusJump2149–2151update the animation (by the comment)2334screw attack active: palette from the frame count (not quoted)2335–2341check for a hit, blinking, low health (not quoted)2342check lava and movement (by its label)2343in lava ← Y + 15452–5453vertical acceleration (by its label)5456pixels to move this frame ← A5471move her up 1 pixel (by the comment)5472pixels left: back for another (by the comment)5518horizontal acceleration (by its label)5521the pad (by the comment)2163its buttons pick her action, a shot, a jump (not quoted)2164–2188animation delay ← 4; SetSamusData (by the comment)2189–2190in the air, in lava with Jump newly pressed: to the jump (not quoted)2286–2289in the air: LCF88; LD09C2290–2291 LCF2E (not quoted); A ← 2; to SetSamusData2292–2294on the ground: LCCB7 off an elevator, LCDBF, walk sound (not quoted)2295–2303 LCF2E (not quoted); the pad's newly pressed buttons2304–2305 Jump: the jump setup, then to LCD6B (not quoted)2306–2310 Fire (not quoted)2312–2315 the pad's Left and Right; the turn (not quoted)2316–2326 A ← 3, on into SetSamusData2327the pad's newly pressed buttons, or those it repeats2781–2782rising past 32 with Jump let go: stop the rise (not quoted)2702–2709LD055; LCF2E (not quoted)2710–2711the pad's Up bit (by the comment)2712–2713 Up: pose and action ← jumping pointing up (not quoted)2714–2718LD09C; in lava with Jump newly pressed: jump, to LCD6B (not quoted)2719–2725SamusGravity 0: LCF77 or LCF55 (not quoted)2727–2734A ← 3; SetSamusData (by the comment)2735–2736

    Claim page

  7. ^Codenmikstas/metroid-disassemblyBank07.asm 5589–5609, 2281–2285
    How we know

    On the ground, the vertical-acceleration routine sets her top-speed value to $18 and tests the tiles under Samus before she moves. With none solid, and no elevator or frozen enemy under her, it sets the falling gravity, $1A, and adds it at once, so she is airborne from that frame. The running handler's air branch then turns her running pose into the plain jump pose, so letting go of the d-pad stops her (metroid-samus/air-run), and her top speed stays 1.5 px/frame.

    5589VertAccelerate:
    5590LE37A:  lda SamusGravity        ;Is Samus rising or falling?
    5591LE37D:  bne ++              ;Branch if yes.
    5592LE37F:  lda #$18            ;
    5593LE381:  sta SamusHorzSpdMax       ;Set Samus maximum running speed.
    ⋮
    5599LE38F:  jsr CheckMoveDown       ;($E7AD)Is Samus obstructed downwards?
    5600LE392:  bcc ++              ;Branch if yes.
    5601LE394:* jsr SamusOnElevatorOrEnemy  ;($D976)Calculate if Samus standing on elevator or enemy.
    ⋮
    5606LE3A0:  lda #$1A            ;Samus is falling. Store falling gravity value.
    5607LE3A2:  sta SamusGravity        ;
    ⋮
    5609LE3A5:* ldx #$05            ;Load X with maximum downward speed.
    
    Source_Files/Bank07.asm lines 5589–5609 at 4270d57 · upstream ↗
    2281*   lda #an_SamusRun
    2282    cmp AnimResetIndex
    2283    bne +
    2284    lda #an_SamusJump
    2285    sta AnimResetIndex
    
    Source_Files/Bank07.asm lines 2281–2285 at 4270d57 · upstream ↗

    Claim page

  8. ^ abCodenmikstas/metroid-disassemblyBank07.asm 2252–2255, 2286–2289, 2719–2724, 5590–5607
    How we know

    Once Samus is airborne, the run and jump handlers start a jump only while she is in lava. Walking off a ledge makes her airborne at once: the vertical-acceleration routine sets the falling gravity on the first frame with nothing below her.

    Source_Files/Bank07.asm at 4270d57
    Our readingX ← her direction2253SamusGravity 0: past the air branch (not quoted)2254–2255in lava2286–2287 jump newly pressed: to LCD40 (by the comment)2288–2289LD09C (not quoted)2719in lava2720–2721 jump newly pressed (by the comment)2722–2723 LCFC32724gravity not 0: past it all (not quoted)5590–5591max run speed ← $18 (not quoted)5592–5593bottom not on an 8-pixel line: skip the tile test (not quoted)5594–5598CheckMoveDown, blocked below: past it all (not quoted)5599–5600on an elevator or a frozen enemy: past it (not quoted)5601–5605gravity ← $1A, falling (by the comment)5606–5607

    Claim page

  9. ^ abCodedoppelganger's SMB2J disassembly · Xkeeper0/smb1sm2main.asm 5015–5019, 10936–10949, 11046–11056; prg.asm 4921–4925
    How we know

    The jump routine starts a jump only while the player state is 0, on the ground, or while the player is swimming, as Super Mario Bros.'s does. Walking off a ledge doesn't keep that state: the player's background collision routine sets a player in the normal or climbing state to falling (or, swimming, to state 1) on each frame of play before it looks for ground, and only landing on a block sets the state back to 0, so out of water a jump can't start after walking off a ledge. The background check skips that step only during the game's scripted routines (engine subroutines 0 to 3 and $0B).

    sm2main.asm at 9c40114
    Our readingstate 0: start the jump (not quoted)5016–5017not swimming: no jump (not quoted)5018–5019routine $0B: leave (not quoted)10936–10938routine below 4: leave (not quoted)10939–10940swimming: state ← 110941–10943normal state: state ← 2, falling10944–10945not climbing: skip to the next part (not quoted)10946–10947climbing: state ← 210948–10949landing: the jumpspring check11046snap to the tile11047–11049the pipe entry check11050vertical speed 0, stomp chain 011051–11054state ← 011055–11056
    src/prg.asm at 1cc3c92
    Our readingstate 0: start the jump (not quoted)4922–4923not swimming: no jump (not quoted)4924–4925

    Claim page

  10. ^ abVerifiedlsmmega/mm2run_megaman.asm 86–92, 203–242
    How we know

    Mega Man gets no grace window after leaving a ledge; a grounded state that finds no floor switches to the jumping state, which looks for a press only on the frame it lands.

    86	JSR _check_object_vertical_move
    87	LDA z:z00
    88	BNE _run_megaman_landing_common_1
    89	LDA #$06
    90	STA z:zmegaman_status
    
    engine/run_megaman.asm lines 86–92 at 94f0bf3 · upstream ↗
    203	LDA aobject_ycoord_speed
    204	BMI @jump_down
    205	JSR _check_object_vertical_move
    206	LDA z:z00
    207	BNE @landing
    208	LDA z:zjoy1_pressed
    209	AND #a_button
    ⋮
    211	LDA aobject_ycoord_speed
    ⋮
    221@landing:
    222@skip:
    223	RTS
    ⋮
    225@jump_down:
    ⋮
    
    engine/run_megaman.asm lines 203–242 at 94f0bf3 · upstream ↗

    Measured by a script in MesenCE 2.2.1 (build 4b8a196), on . It fails if the result disagrees with the claim.

    Claim page

  11. ^ abCodealex-west/M2RoSbank_000.asm 3362–3367, 3048–3066, 3946–3950, 744–749
    How we know

    Running off a ledge puts Samus straight into the falling pose, and in that pose a jump press starts a jump only while a timer runs, the 16-frame window after she unmorphs in the air.

    SRC/bank_000.asm at 031aea3
    Our readingrunning: test the ground under her3364 none: pose ← falling (not quoted)3365–3367A not newly pressed: skip the jump (not quoted)3050–3052touching acid: jump counter ← the acid flag (not quoted)3054–3060else: unmorph jump timer 0: skip the jump (not quoted)3064–3066Up bit set (not quoted)3946–3947 unmorph in the air (by its label)3948 unmorph jump timer ← $103949–3950unmorph jump timer not 0: − 1745–749

    Claim page

  12. ^ abVerifiedsonicretro/s1disasm01 Sonic.asm 113–116, 318, 348
    How we know

    In the running game, on flat ground, when Sonic walks off a ledge a jump press on any of the next 5 frames gives him no upward speed, because only the grounded modes, the normal and rolling mode routines, call the jump routine.

    113Sonic_Modes:	dc.w Sonic_MdNormal-Sonic_Modes			; 0 - while on the ground and not rolling
    114		dc.w Sonic_MdJump-Sonic_Modes			; 2 - while in the air and not rolling
    
    _incObj/01 Sonic.asm lines 113–116 at 15dfa3a · upstream ↗
    318		bsr.w	Sonic_Jump				; check if we need to jump
    
    _incObj/01 Sonic.asm line 318 at 15dfa3a · upstream ↗
    348		bsr.w	Sonic_Jump				; check if we need to jump
    
    _incObj/01 Sonic.asm line 348 at 15dfa3a · upstream ↗

    Measured by a script. It fails if the result disagrees with the claim.

    Claim page

  13. ^ abCodesonicretro/s2disasms2.asm 36514–36516, 36556–36559, 36539–36543
    How we know

    Sonic 2 has no grace window after a ledge: only the grounded modes, normal and rolling, call the jump routine.

    36514Obj01_MdNormal:
    36515	bsr.w	Sonic_CheckSpindash	; check for spindash
    36516	bsr.w	Sonic_Jump			; check for jumping
    
    s2.asm lines 36514–36516 at 4ef457c · upstream ↗
    36556Obj01_MdRoll:
    ⋮
    36559	bsr.w	Sonic_Jump			; check for jumping
    
    s2.asm lines 36556–36559 at 4ef457c · upstream ↗
    s2.asm#L36539-L36543 · upstream ↗

    Claim page

  14. ^ abCodesonicretro/skdisasmsonic3k.asm 22328–22330, 22402–22405, 22385–22389
    How we know

    Sonic 3 & Knuckles has no grace window after a ledge: the jump routine is called only from the grounded modes.

    22328Sonic_MdNormal:
    22329		bsr.w	SonicKnux_Spindash
    22330		bsr.w	Sonic_Jump
    
    sonic3k.asm lines 22328–22330 at 73de97c · upstream ↗
    22402Sonic_MdRoll:
    22403		tst.b	spin_dash_flag(a0)
    22404		bne.s	loc_10FEA
    22405		bsr.w	Sonic_Jump
    
    sonic3k.asm lines 22402–22405 at 73de97c · upstream ↗
    sonic3k.asm#L22385-L22389 · upstream ↗

    Claim page

  15. ^ abcCodeSouthbird's SMB3 disassemblysmb3.asm 1279; prg005.asm 2450–2452, 3561–3565, 4035–4036; +1 files
    How we know

    Some objects Mario rides set an air-jump countdown, in which a jump still starts in the air, to 5, 8, or 16; the Parabeetle sets 5 as it droops. The jump routine decrements the count before testing it, so those values leave 4, 7, or 15 updates in which a press of A jumps.

    1279	Player_AllowAirJump:	.ds 1	; Counts down to zero, but while set, you can jump in the air
    
    smb3.asm line 1279 at 09b1bd8 · upstream ↗
    PRG/prg005.asm at 09b1bd8
    Our readingobject timer, air-jump count ← $102450–2452Y speed + 1, the droop (by the comment)3561air-jump count ← 53564–3565air-jump count ← 84035–4036
    PRG/prg008.asm at 09b1bd8
    Our readingair-jump count not 0: − 12549–2552temp ← the pad's A bit2556–2558not set: past the take-off2559air-jump count not 0: to the take-off2561–2562in the air: past the take-off (not quoted)2564–2565take-off:2567 jump sound (not quoted)2570–2572 star, below full power, not holding, big, not frog: backflip, in the air, air-jump count ← 0 (not quoted)2574–2594 Y speed ← the root jump speed − a boost by X speed2610–2612 in the air ← 12614–2615 wag count, air-jump count ← 0 (not quoted)2617–2619 full power, no flight time: flight time ← $80 (not quoted)2621–2629past the take-off2631

    Claim page

  16. ^ abCodeNoelFB/Celeste · WPI DGMI wiki, “Coyote Time”Player.cs 713–720, 742–744, 1664
    How we know

    The 0.1 s grace and 0.2 s variable-jump timers end on float rounding: a 0.0166667 s step gives 5 and 11 updates, and an exact 1/60 s step gives 6 and 12.

    717                    jumpGraceTimer = JumpGraceTime;
    ⋮
    719                else if (jumpGraceTimer > 0)
    720                    jumpGraceTimer -= Engine.DeltaTime;
    
    Source/Player/Player.cs lines 713–720 at 1b0ce45 · upstream ↗
    743                if (varJumpTimer > 0)
    744                    varJumpTimer -= Engine.DeltaTime;
    
    Source/Player/Player.cs lines 742–744 at 1b0ce45 · upstream ↗
    The player character can jump up to 5 frames after leaving a ledge.
    Examples · archived copy ↗
    1664            varJumpTimer = VarJumpTime;
    
    Source/Player/Player.cs line 1664 at 1b0ce45 · upstream ↗

    Measured by a script. It fails if the result disagrees with the claim.

    Claim page

  17. ^DeveloperNoelFB/CelesteEmulator.cs 268–270
    How we know

    Celeste's developers describe the game as locked to 60 updates per second, so the bundled PICO-8 port skips every second frame.

    268            // this is a pretty dumb hack but because Celeste is locked to 60fps
    269            // and PICO-8 runs at 30 ... we just skip every 2nd frame
    
    Source/PICO-8/Emulator.cs lines 268–270 at 1b0ce45 · upstream ↗

    Claim page

  18. ^ abcWikiFNA-XNA/FNA · NoelFB/Celeste · JamesMcMahon/monocle-engine · WPI DGMI wiki, “Coyote Time”Game.cs 247; Readme.md 28; +1 files
    How we know

    At normal speed, Celeste's time step per update is most likely (float)0.0166667 s, the XNA and FNA default 166,667-tick step, not an exact 1/60 s.

    247			TargetElapsedTime = TimeSpan.FromTicks(166667); // 60fps
    
    src/Game.cs line 247 at 00498b0 · upstream ↗
    If you're playing on macOS or Linux you're on FNA, and on consoles you're on MonoGame.
    Source/Player/Readme.md#L28 · upstream ↗
    198            RawDeltaTime = (float)gameTime.ElapsedGameTime.TotalSeconds;
    199            DeltaTime = RawDeltaTime * TimeRate;
    
    Monocle/Engine.cs lines 198–199 at 759c15a · upstream ↗
    Celeste (2018) – The player character can jump up to 5 frames after leaving a ledge.
    Examples · archived copy ↗

    Claim page

  19. ^ abCodeNoelFB/CelesteEmulator.cs 268–273
    How we know

    Inside Celeste, the Celeste Classic port skips every second frame to run at 30 Hz.

    268            // this is a pretty dumb hack but because Celeste is locked to 60fps
    269            // and PICO-8 runs at 30 ... we just skip every 2nd frame
    ⋮
    271            skipFrame = !skipFrame;
    272            if (skipFrame)
    273                return;
    
    Source/PICO-8/Emulator.cs lines 268–273 at 1b0ce45 · upstream ↗

    Claim page

  20. ^Verified“Castlevania (USA) (Rev 1)”
    How we know

    Simon has no coyote time. The falling state reads no buttons: A after he walks off doesn't jump, B doesn't whip, and the d-pad doesn't steer: he keeps moving the way he was facing when he walked off.

    In the cartridge (“Castlevania (USA) (Rev 1)”): bank 6 $9757-$977A, the falling state: count, floor test, the direction and move routines, Y += 8; no read of the buttons ($F5, $F7); bank 6 $93C5-$93D8, the fall entry: $0584 = facing + 1 (1 right, 2 left); bank 6 $9809-$982D, the direction routine: direction bits from $0584, not the pad. We don't reproduce the bytes.

    Measured by a script in MesenCE 2.2.1 (build 4b8a196), on Castlevania (USA) (Rev 1) (SHA-1 4e3ef47de86a…). It fails if the result disagrees with the claim.

    Claim page

  21. ^ abVerifiedSMWDisXbank_00.asm 9921–9924, 8897–8905
    How we know

    Mario gets no grace window after walking off a ledge; the jump code starts a jump only while his in-air state is 0, and block collision, earlier in the same frame, has already set it to $24.

    9921CODE_00D5F2:
    9922    LDA.B PlayerInAir
    9923    BEQ +
    9924    JMP CODE_00D682
    
    bank_00.asm lines 9921–9924 at 30643c7 · upstream ↗
    8897CODE_00CD24:
    ⋮
    8904  + JSR CODE_00DC2D
    8905    JSR CODE_00E92B
    
    bank_00.asm lines 8897–8905 at 30643c7 · upstream ↗

    Measured by a script in MesenCE 2.2.1 (build 4b8a196), on . It fails if the result disagrees with the claim.

    Claim page

  22. ^CodeXkeeper0/smb1prg.asm 4372–4378, 4391–4415, 4712–4727, 4735–4744
    How we know

    Each frame the player control routine splits the d-pad bits, runs the jump check, the horizontal physics, and the state's routine (which changes the speed, then moves Mario), sets his moving direction from the speed's sign, and only then runs the background collision routine, which lands him.

    src/prg.asm at 1cc3c92
    Our readingA_B_Buttons ← the pad's top two bits (not quoted)4373–4375Left_Right_Buttons ← its low two bits (not quoted)4376–4378the movement routines4392bounding box size by size and crouch (not quoted)4393–4401direction ← 1, right (not quoted)4402speed 0: skip the direction4403–4404positive: keep it4405negative: left, 2 (not quoted)4406Player_MovingDir ← it4408scroll, offscreen bits, position, box (not quoted)4410–4414PlayerBGCollision4415PlayerPhysicsSub, jumping and swimming (by the comment)4713changing size: leave (not quoted)4714–4715not climbing: climb side timer ← $18 (not quoted)4716–4720by the state in A, through JumpEngine (by its label)4722 OnGroundStateSub, JumpSwimSub, FallingSub, ClimbingSub4724–4727GetPlayerAnimSpeed4736left or right held: facing ← it (not quoted)4737–4739ImposeFriction, then MovePlayerHorizontally4741–4742scroll speed ← the result (not quoted)4743

    Measured by a script in MesenCE 2.2.1 (build 4b8a196), on . It fails if the result disagrees with the claim.

    Claim page

  23. ^Verified“Castlevania (USA) (Rev 1)”
    How we know

    Each frame, the standing and crouching states test Simon's floor points before they move him or read A; with no ground under either point, they put him in the falling state and end the frame there, so he doesn't move and A isn't read. The frame whose step carries his second floor point past an edge still reads A after the step, so a press on that frame jumps.

    In the cartridge (“Castlevania (USA) (Rev 1)”): bank 6 $93BB-$9405, the standing state: the floor test $9E70; no floor: fall entry ($93C5) and return; else the move ($9809, $989A), then A pressed this frame ($9401); bank 6 $9539-$9549, the crouching state (and the landing crouch) runs the same floor test first and jumps to the fall entry. We don't reproduce the bytes.

    Measured by a script in MesenCE 2.2.1 (build 4b8a196), on Castlevania (USA) (Rev 1) (SHA-1 4e3ef47de86a…). It fails if the result disagrees with the claim.

    Claim page

  24. ^Verifiedsonicretro/s1disasm · Sonic Retro, “Sonic Physics Guide: Jumping”01 Sonic.asm 1236, 317–323
    How we know

    In the running game, on flat ground, Sonic doesn't move on a jump's press frame, even at top speed: X stays put and Y changes only by the curl (roll-shift), because the jump routine drops its return address, skipping the rest of the grounded routine, the speed-to-position move included.

    1236		addq.l	#4,sp					; run in-air subroutines when we return
    
    _incObj/01 Sonic.asm line 1236 at 15dfa3a · upstream ↗
    317Sonic_MdNormal:	; While Sonic is on the ground and not rolling
    318		bsr.w	Sonic_Jump				; check if we need to jump
    ⋮
    323		jsr	(SpeedToPos).l				; update Sonic's position based on his current velocities
    
    _incObj/01 Sonic.asm lines 317–323 at 15dfa3a · upstream ↗
    If you do press the jump button, it exits the rest of the cycle - so the Player doesn't move at all during the step in which you jump, vertically or horizontally.
    Bugs when Jumping · archived copy ↗

    Measured by a script. It fails if the result disagrees with the claim.

    Claim page

  25. ^Verifiedsonicretro/s1disasmSonic AnglePos.asm 84–116, 59–78; 01 Sonic.asm 317–372, 330–343, 359–372; +1 files
    How we know

    In the running game, at the end of the probe's flat runway, Sonic first counts as airborne on the frame whose move takes his trailing floor sensor past the ledge. Holding Right from a standstill 48 px before it, that is frame 49, his center 9 px past it; rolling toward it from 160 px, frame 95, his center 8 px past. A press on frame 49 still jumps, and one on any of the next 5 frames doesn't.

    100		cmpi.w	#$E,d1
    101		bgt.s	.in_air					; branch if Sonic is > 14px above floor
    ⋮
    113		bset	#status_in_air_bit,obStatus(a0)
    
    _incObj/Sonic AnglePos.asm lines 84–116 at 15dfa3a · upstream ↗
    317Sonic_MdNormal:	; While Sonic is on the ground and not rolling
    318		bsr.w	Sonic_Jump				; check if we need to jump
    ⋮
    348		bsr.w	Sonic_Jump				; check if we need to jump
    
    _incObj/01 Sonic.asm lines 317–372 at 15dfa3a · upstream ↗
    330Sonic_MdJump:	; While Sonic is in the air but not rolling
    331		bsr.w	Sonic_JumpHeight			; handle Sonic's jump height based on whether the jump button is still held
    332		bsr.w	Sonic_JumpDirection			; handle midair direction adjustments while jumping
    333		bsr.w	Sonic_LevelBound			; make sure Sonic stays within level bounds and handle bottomless pits
    334		jsr	(ObjectFall).l				; apply gravity and update Sonic's position based on his current velocities
    ⋮
    341		bsr.w	Sonic_JumpAngle				; steadily return Sonic's angle while jumping to 0
    342		bsr.w	Sonic_Floor				; handle collision with level while airborne
    343		rts						; return
    
    _incObj/01 Sonic.asm lines 330–343 at 15dfa3a · upstream ↗

    Measured by a script. It fails if the result disagrees with the claim.

    3 more excerpts on the claim page

  26. ^Codelsmmega/mm2run_megaman.asm 135–142, 201–228, 84–88, 109–116, 244–251; check_object_vertical_move.asm 45–56, 129–137; +1 files
    How we know

    Each of Mega Man's grounded and jumping states moves him horizontally first, testing for a wall, then vertically, testing the floor under a fall or the ceiling over a rise, and only then acts on the floor test or checks for a jump, so a frame's floor test uses that frame's new X.

    135_run_megaman_running:
    136	JSR _check_shoot_on_ladder
    137	JSR _turn_megaman
    138	JSR _megaman_status_parameter
    139	JSR _check_object_horizontal_move
    140	JSR _check_object_vertical_move
    141	LDA z:z00
    142	BNE _run_megaman_landing_common_2
    
    engine/run_megaman.asm lines 135–142 at 94f0bf3 · upstream ↗
    201@continue:
    202	JSR _check_object_horizontal_move
    203	LDA aobject_ycoord_speed
    204	BMI @jump_down
    205	JSR _check_object_vertical_move
    206	LDA z:z00
    207	BNE @landing
    ⋮
    211	LDA aobject_ycoord_speed
    ⋮
    225@jump_down:
    226	JSR _check_object_vertical_move
    227	LDA z:z00
    228	BEQ @not_landing
    
    engine/run_megaman.asm lines 201–228 at 94f0bf3 · upstream ↗
    45@on_screen_2:
    46@continue:
    47	LDA aobject_ycoord_speed
    48	BMI @down
    49	SEC
    50	LDA aobject_ycoord
    51	SBC #$0C
    
    engine/check_object_vertical_move.asm lines 45–56 at 94f0bf3 · upstream ↗

    5 more excerpts on the claim page

  27. ^GuideKidsCanCode n.d.
    How we know

    KidsCanCode's Godot tutorial traces the name to a cartoon coyote who runs off a cliff and falls only when he looks down.

    The name “coyote time” comes from the famous cartoon coyote, who wouldn’t fall until he looked down
    Origins · archived copy ↗

    Claim page

  28. ^CodeNoelFB/CelesteClassic.cs 223–228, 297–315
    How we know

    Celeste Classic sets a buffer counter to 4 on a fresh jump press, counts it down by 1 on later updates, and clears it when a normal or wall jump starts.

    Source/PICO-8/Classic.cs at 1b0ce45
    Our readingjump ← jump held now, not at the last update223last ← jump held224fresh press: buffer ← 4225–226else buffer above 0: − 1227–228buffer above 0:297 grace above 0, a normal jump (by the comment)299 jump sound (not quoted)302 buffer ← 0303 grace ← 0; Y speed ← −2; smoke (not quoted)304–306 else: wall direction ← a solid 3 px left or right (not quoted)311 a wall beside him312 wall-jump sound (not quoted)314 buffer ← 0315

    Claim page

Sources

Code

Secondary