Coyote time
Coyote time, also referred to as coyote jumps and ghost jump, is a video game mechanic which describes a, usually very brief, length of time before a player's actions have consequences. It was initially created to make platformer video games less difficult by giving the player more leeway with their jump timing, but the term can also be used to describe similar delays before actions have consequences in any genre of game. The mechanic is named after the cartoon character Wile E. Coyote who was often animated running out over a ledge and not immediately falling.
Contents
Personal
I remember playing A Boy and His Blob: Trouble on Blobolonia in the early 1990s and discovering how the boy would hover in the air if you skidded at the end of a platform. I thought it was a funny homage to cartoons, but didn't see any utility to it. In my 40s, while watching a video about how to program quality controls in a platformer, I learned about how developers used it to improve the player controls of more recent platformers. That enticed me to read more about it and write this article.
History
Probably before it was used as a way to aide player control, coyote time was used in the game A Boy and His Blob: Trouble on Blobolonia (1990) where moving over a ledge while sliding after releasing the D-pad would result in the player's character hovering in the air momentarily, then looking at the player in a forth wall break, looking down, and then covering his face as he falls. If you attempt to run back to the ledge, the character's legs will frantically move to try to reach safety before falling. This game uses a particularly long delay for comedic effect, but it also works to improve player control by preventing the player from accidentally sliding off a ledge, and, if you skid out, and then run further away from the ledge, you can actually span short gaps that would otherwise require you to use a jellybean.
Canabalt (2009) used a precursor to coyote time where the collision box for the player's character was slightly behind where it was drawn. This gives a similar effect, but only works due to the game's fast-paced running in a single direction. Celeste (2018), however, uses coyote time properly giving the player five frames of leeway after running off a ledge when they can still jump.
Usage
Coyote time can be used in a number of ways. For example, in platformers, the designer may allow the character to still jump for a brief time after walking off a platform, like in Celeste. Alternately, the designer may not institute gravity until after a brief moment, allowing the player to quickly turn around and return to the platform, like in A Boy and His Blob. But coyote time doesn't just have to involve jumping in a platformer, it can be used to process directional input in an over-the-shoulder runner, or a game with a ticking clock could use it to make the seconds slightly longer as they tick down to zero giving the player slightly more time.
When used solely as a mechanic to aide in character control instead of for comedic effect, coyote time is best designed when the player doesn't even notice that it exists. Many players don't like the idea that a game is helping them, and may even feel insulted by it, so it's best when designers keep their delays in the range of milliseconds rather than actual seconds.
To implement coyote time in a game's code, the programmer will usually have a variable in memory associated with the player's character. When the player runs their character off a ledge, and collision with the ground is no longer detected beneath the character, the program will load the length of delay into variable. Then, in each frame, this number will be decreased until it reaches zero. If coyote time is associated with jumping, when the player presses the jump button, the code checks to see if the variable is greater than zero, and, if it is, allows the jump. If coyote time is associated with gravity, the game first checks to see if the variable has reached zero before increasing the character's Y coordinate.
Links
- gamerant.com/celeste-coyote-time-mechanic-platforming-impact-hidden-mechanics - Coyote time in Celeste.
- gamedeveloper.com/design/game-feel-tips-i-the-ghost-jump - Ghost jumping.