Jumping
Learning paths through this topic
A jump pressed just before landing should still happen
Players mash jump a moment too early and nothing happens, which feels like the game ate the input. Remembering the press for a moment helps, but remembered presses can fire twice or at the wrong time. Here is the careful version.
A few frames of crouch before the jump, without making it feel laggy
A crouch before leaving the ground gives a jump weight, but players who tap the button briefly can end up with the wrong jump, or with a delay they notice and hate. Here is how short the crouch must be and what the tap and the direction should do during it.
Can a rolling hazard be jumped, or is it too slow to clear?
A barrel rolling slowly along the floor is harder to jump than a fast one, which surprises designers. The time spent in the air above it is short, and a wide, slow hazard can be impossible to clear. Here is the arithmetic for how fast it must come.
Every jump uses a little food, but the hunger bar shows whole points
Survival games tie effort to hunger, and a single jump costs far less than one point. Round each jump to nothing and jumping is free; round it up and ten hops starve the player. Here is how to collect the small costs so that the bar drops at the right rate, with no drift from decimals.
Jumping and landing make noise that nearby enemies can hear
In a game with sleeping predators and guards, a leap on gravel should be a mistake and a hop on moss a safe choice. The pitfalls are noise that ignores how hard you land, sneaking that silences everything, and walls that do not matter. Here is how to turn a jump into a hearing radius.
Far from the starting point, movement and jumps start to stutter
Explore far enough in a huge world and the character moves in jerks, small steps vanish and a jump lands short. Nothing in your game logic changed; the numbers simply run out of fine detail. Here is how to keep positions in small pieces so a step is always as exact in the far corner as at the camp.
Landing half on a haystack and half on stone: how much does it hurt?
Soft landings are a great survival trick, but bodies are wider than one block. Check only the spot under the middle and a player on the very edge of a hay bale is saved or hurt for no visible reason. Here is how to weigh what the feet actually touch.
A hard landing should cost time, unless the player rolls
A drop from a ledge and a drop from a rooftop should not feel the same, but a long freeze after every little hop makes the game sluggish. Here is how to tie the pause on landing to the fall, measure the fall correctly and reward a well-timed roll.
A roll just before landing should soften a long fall, if it is well timed
Survival games reward players who press the roll key just before they hit the ground. Make the window too wide and it is automatic, too narrow and nobody ever sees it. Here is how to judge the press, what it saves, what happens above a certain height and what the character keeps of its speed.
Jumping onto farmland should trample crops, but not every time
Farmers in a survival world dislike visitors who hop across their fields. Trampling must depend on how hard you land, happen once per landing, and not be decided by a lottery drawn every frame. Here is how to turn a drop into a chance, and how to keep the result repeatable for tests and saves.
Grabbing a ledge with the hands, even when falling fast
The character should catch a ledge it just barely reaches, yet never snap onto one it is rushing past, and never grab the same ledge again right after letting go. Most first versions miss fast falls or loop forever. Here is a catch zone that behaves.
Swinging on a rope and letting go to cross a chasm
Rope swings promise a long flight, but the launch speed is not what most people guess, and letting go at the very bottom is rarely best. Here is how the swing turns into a flight, and a way to find the best moment to release for the longest reach.