Jumping
Learning paths through this topic
A player who digs a pit or falls into one must always have a way out
In a world where players dig, the walls of a hole soon rise higher than any jump. Players then sit at the bottom, with no idea if it is a puzzle or a bug. Here is a check that says whether the jump is enough, and if not, how many blocks must be stacked or when to step in and help.
Teleporting, respawning or entering water must not count as a fall
A player teleports home from a mountaintop and dies on arrival from a fall that never happened. Fall damage that tracks the highest point is easy, but everything that moves a character without walking must tell it to forget. Here is the list of events and how to handle each.
Pulling up onto a ledge after a jump, only when it should work
Open-world characters should haul themselves over a ledge at the top of a jump, but not climb every wall, not while plummeting past it, and not into a space too small to stand. Here is the check that sorts a step, a mantle and a miss, with the distances and speed to use.
A trampoline where well-timed presses bounce you higher each time
On a trampoline the bounces should die away by themselves, and grow if the player presses with the rhythm. The trick is deciding which press counts, how much it gives and when the bouncing is over. Here is the rule, with a ceiling so nobody leaves the level.
After a wall jump the character just climbs back into the wall
The player holds toward the wall, kicks off, and the character barely leaves it, or leaves it and slams straight back. Wall jumps need a moment where the player's steering is overruled. Here is how long, how strongly and what breaks otherwise.
Running up a wall for a moment, once per landing
Running up a wall is a thrilling move that can break a level: climb forever, climb again after every touch, or start from a fall. Here is a version that gives a defined height, kicks you off at the end and cannot be repeated until the feet touch the ground.
Wall sliding feels slippery and the wall jump is missed by a hair
Players slide down a wall and tap away just before jumping, and the game has already let go. A slide that clings for a heartbeat and forgives late jumps feels right. Here is how long to cling and when to slow the fall.
Strong wind on a mountain should push jumps sideways, but not forever
Wind makes an open world feel alive, but the easy way to add it sends a leaping character faster and faster until a fall from a peak crosses the whole map. Here is a push that has a natural limit, how shelter changes it, and the exact drift for a given jump.