v0.1 ⌊ALPHA⌉
On this page
  1. How it works
  2. Implementations
  3. Name and history
  4. Related
  5. References
  6. 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.

#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, JumpGraceTime, is 0.1 s1. It follows the loop above, subtracting Engine.DeltaTime before the player state runs2.

At 60 updates per second4, 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 window5.

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

#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 rate7. Its 5 airborne updates match the 2018 game’s likelier window but last twice as long7.

#Super Mario Bros. and Sonic the Hedgehog

Neither has coyote time. Super Mario Bros. starts a jump only from Mario’s “on the ground” state8. Sonic the Hedgehog checks for a jump only in its two grounded modes9.

#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 down10.

References

  1. ^ abJumpGraceTime, Celeste's coyote time, is 0.1 s. T3NoelFB/Celeste · Source/Player/Player.cs L48
  2. ^ abcGrounded updates refill jumpGraceTimer; airborne ones subtract Engine.DeltaTime before NormalUpdate, which jumps on a press while it is above zero. T3NoelFB/Celeste · Source/Player/Player.cs L713–720, L2970–2975
  3. ^ abcCeleste 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. T3NoelFB/Celeste · Source/PICO-8/Classic.cs L233–243, L297–304
  4. ^Celeste's developers describe the game as locked to 60 updates per second, so the bundled PICO-8 port skips every second frame. T2NoelFB/Celeste · Source/PICO-8/Emulator.cs L268–270
  5. ^The 0.1 s grace and 0.2 s variable-jump timers end on float rounding; a (float)0.0166667 step gives 5 and 11 updates, and (float)(1/60) gives 6 and 12. T4NoelFB/Celeste · Source/Player/Player.cs L713–720, L742–744WPI DGMI wiki, “Coyote Time” · Examplesprobe probes/jump-physics/jump-heights.mjs
  6. ^ abAt normal speed, Celeste's Engine.DeltaTime is most likely (float)0.0166667 s, the XNA and FNA default 166,667-tick step, not an exact 1/60 s. T1FNA-XNA/FNA · src/Game.cs L247NoelFB/Celeste · Source/Player/Readme.md L28JamesMcMahon/monocle-engine · Monocle/Engine.cs L198–199WPI DGMI wiki, “Coyote Time” · Examples
  7. ^ abInside Celeste, the Celeste Classic port skips every second frame to run at 30 Hz, so its 5 grace updates last about 0.17 s. T2NoelFB/Celeste · Source/PICO-8/Emulator.cs L268–273
  8. ^Mario gets no grace window after leaving a ledge; ProcJumping refuses airborne jumps unless he is swimming. T3Xkeeper0/smb1 · src/prg.asm L4921–4925
  9. ^Sonic gets no grace window after leaving a ledge: only the grounded modes, Sonic_MdNormal and Sonic_MdRoll, call Sonic_Jump. T3sonicretro/s1disasm · _incObj/01 Sonic.asm L113–116, L318, L348
  10. ^KidsCanCode's Godot tutorial traces the name to a cartoon coyote who runs off a cliff and falls only when he looks down. T1KidsCanCode n.d. · Origins
  11. ^Celeste Classic sets its jump buffer, jbuffer, to 4 on a new press and otherwise counts it down by 1 each update. T3NoelFB/Celeste · Source/PICO-8/Classic.cs L223–228, L297

Sources

Code

Secondary