A jump button has two states: pressed and not pressed. Variable jump height is the trick that turns those two states into a continuous range of arcs, and it is one of the highest-value features in the genre.
The problem it solves
With a single fixed jump height, every obstacle has exactly one answer and the player has no expressive control.
Worse, a fixed height must be tall enough for the tallest obstacle, which means every small hop becomes a full arc — and in a runner, a full arc over a small crate leaves you airborne when the next obstacle arrives.
Variable height fixes both. Tap for a hop, hold for a full jump.
Implementation one: extra force while held
Ninja Dash applies an additional upward acceleration for as long as the key is held, up to a maximum window:
if (d.holding > 0 && g.held.up) {
d.vy += HOLD_BOOST * dt; // -1500 px/s²
d.holding -= dt; // window: 0.16 s
}
Release early and the boost stops; hold the full window and you get the maximum arc.
Feel: smooth and continuous. The jump grows while you hold it, which reads as effort.
Implementation two: cut the rise on release
The alternative: launch at full velocity, and when the player releases while still rising, slash the upward velocity.
if (released && vy < 0) vy *= 0.4;
Feel: snappier and more precise, with a distinct "clipped" quality. Common in precision platformers where predictability matters more than smoothness.
Neither is better in the abstract. The first suits games where the jump should feel powered; the second suits games where the player wants exact control.
What it costs on a touchscreen
A swipe has a beginning and an end. There is no way to swipe and keep holding, so a swiping player cannot express a held jump at all.
This is a design problem, not a control problem, and it has to be solved in level design:
Nothing required for survival may need a held jump.
In Ninja Dash, gap widths are calculated against the un-boosted jump arc:
var airTime = (2 * -JUMP_V) / GRAVITY; // excludes the hold boost
var reach = speed * airTime;
var width = rand(90, Math.min(200, reach * 0.62));
The hold boost is deliberately excluded. A swipe always clears every gap, and holding becomes a bonus for reaching coin arcs rather than a requirement.
Games that skip this step ship a mobile version that is quietly unfair, and usually do not realise it, because the developer tested with a keyboard.
For players who do want the extra height on a phone: the on-screen Jump button supports holding, unlike a swipe.
How to use it well
Tap for anything small. A crate, a low obstacle, a short hop between close platforms. Minimum air time means maximum time to react to what comes next.
Hold for height you actually need. Coin arcs peak about 90 pixels above the roof in Ninja Dash and are only reachable on a held jump.
Combine with fast-fall. Hold to reach an arc, then press Down to drop quickly afterward. That pairing is how experienced players take coin arcs without being punished for the extra air time.
Related mercies
Variable jump height usually travels with two other features that correct the gap between what a player perceived and what the simulation recorded:
Coyote time — the jump stays available for a short window after walking off a ledge, 90 milliseconds in Mystic Ninja.
Jump buffering — a jump pressed slightly before landing fires on touchdown rather than being discarded.
Together the three make a jump feel responsive in a way that is very hard to identify when present and immediately obvious when absent.
Key takeaways
- Variable jump height turns a binary button into a continuous range of arcs.
- Two implementations: add force while held, or cut the rise on release. The first feels powered, the second precise.
- A swipe cannot express "hold", so nothing required for survival may need a held jump.
- Ninja Dash sizes its gaps against the un-boosted arc for exactly this reason.
- Tap for small obstacles, hold only for height you need, and pair a held jump with fast-fall.
Frequently asked questions
Why does my ninja jump higher when I hold the button?
Because the game applies extra upward force for a short window while the key is held. Releasing early produces a shorter hop.
Do I need to hold jump to survive?
Never, in any game on this site. Obstacle sizes are calculated against the plain jump so that touch players are not disadvantaged.
Can I get a full-height jump on mobile?
Yes, using the on-screen Jump button, which supports holding. A swipe gives the plain jump.
What is coyote time?
A short window after walking off a ledge during which a jump press still works. It compensates for the fact that players genuinely believe they pressed before leaving the ground.
Ready to put this into practice?
Everything above is easier to feel than to read about. Open the game and try one run with just one of these ideas in mind.