How to Add a Double Jump to Your Game
A double jump is one counter and one reset rule, but the details decide whether it feels like control or like cheating. Here are the values and the bugs to watch for.

Key takeaways
- A double jump is an air-jump counter that refills on landing. The bugs live in what else refills it and how it interacts with coyote time.
- Make the second jump a fresh, slightly weaker jump that resets vertical speed, around 75 to 90 percent of the first jump's height.
- Adding a double jump changes every gap in your game. Decide early whether it exists from the start or is earned, and measure levels against both.
To add a double jump, give the player an air-jump counter (usually 1) that is spent when they press jump while not on the ground and refilled when they land. The second jump should set vertical speed to a fixed launch value rather than add to the current one, so it works the same whether the player is rising or already falling. Make it a little weaker than the ground jump, give it its own sound and a small puff of particles, and refill the counter only on real landings. That is the whole mechanic; the rest of this guide is the numbers and the bugs that make it feel right.
How a double jump works under the hood
A ground jump is triggered by "jump pressed while grounded". A double jump adds a second rule: "jump pressed while airborne and air jumps remaining above zero". The game keeps three pieces of state for it:
- maxAirJumps: how many extra jumps the player gets. 1 is a double jump, 2 is a triple jump. Store it as a number, not a boolean, so an upgrade can raise it later.
- airJumpsLeft: the counter, set to maxAirJumps whenever the player touches the ground.
- lastJumpKind: ground, coyote, air or wall. Animation, sound and some bug fixes need to know which jump just happened.
The order of checks matters. On a jump press, the game should try the ground jump first (grounded or inside the coyote window), then a wall jump if your game has one, and only then spend an air jump. Getting this order wrong is the source of half the double-jump bugs further down. If you have not tuned your base jump yet, do that first: the platformer guide covers apex height, time to apex, fall gravity and coyote time, and every number here builds on those.
Starting values that feel right
The second jump is not a copy of the first. These are sensible starting points for a 2D platformer running at 60 frames per second, with a ground jump that peaks around 3 tiles in 0.35 seconds:
- Set, do not add, vertical speed. On an air jump, replace the current vertical speed with the air-jump launch speed. If you add instead, a double jump at the top of the arc sends the player to the moon, and one pressed while falling fast barely slows them. Setting it makes the second jump predictable from any point of the first.
- Height: 75 to 90 percent of the ground jump. A slightly shorter second jump reads as a correction, not a rocket. Compute its launch speed from its own target height (launch speed = 2 × height ÷ time to apex) so it obeys the same gravity.
- Variable height still applies. Releasing jump early during the second jump should cut upward speed exactly as it does on the first, so a quick tap gives a small hop to adjust a landing.
- Horizontal redirect. Let the air jump snap horizontal speed toward the held direction, either fully or by 50 to 100 percent. This is what lets players fix a jump they started in the wrong direction, and it is most of why double jumps feel good.
- Fall gravity resets. If your game uses a heavier fall multiplier (1.5 to 2 times), the air jump starts a new rise, so switch back to normal gravity until the new apex.
- A short input lockout. Ignore a second air jump for about 0.05 to 0.08 seconds after the first jump fires. This stops a bouncy key or a double tap on a touch button from spending both jumps on one press.
Make the second jump readable
Players need to know, at a glance, whether they still have their double jump. Without that, every missed jump feels like the game ignored them. Four signals cover it:
- 01A different animation. A flip, a spin or a tuck for the air jump, so it never looks like the ground jump.
- 02A puff under the feet. A small burst of particles or a ring where the player kicked off the air. It shows exactly where the second jump started, which helps players learn its reach.
- 03A distinct sound. Higher pitched or lighter than the ground jump sound, so the ear tells the two apart.
- 04A spent state. Something on the character that changes when the air jump is used: a scarf that dims, a glow that goes out, wings that fold. Refill it with a tiny flash on landing.
Keep the feedback small. A double jump can fire every couple of seconds, so a big screen shake or a long particle trail turns into noise fast. The game feel guide explains how to scale juice to how often something happens.
The bugs a double jump usually causes
Almost every double-jump bug is a refill or ordering mistake. Test for each of these on purpose, and describe them to the agent by name if you see them.
Coyote time eats the double jump
The player runs off a ledge and presses jump inside the coyote window. If the game checks "airborne" before "coyote", it spends the air jump instead of giving the free ground jump, and the player has nothing left. Fix: the coyote jump counts as a ground jump. The opposite bug also exists: after a real ground jump, the coyote window must close immediately, or a fast second press reads as a second ground jump and the player gets a triple jump.
Refills from things that are not landings
If the refill runs on "touching anything", the counter resets when the player brushes a wall, the underside of a platform or an enemy's head, and they can climb forever. Refill only when the player is standing on something from above: grounded and vertical speed at or below zero. Decide deliberately which other events refill it: stomping an enemy and grabbing a ledge often should, because that is fun and readable; touching a wall usually should not unless you also have wall jumping.
One-way platforms and the ground check
Jumping up through a one-way platform can make the ground check report "grounded" for one frame as the feet pass its top edge, which refills the counter mid-air. Only count a one-way platform as ground when the player is moving down onto it.
Jump buffer fires the air jump on landing
A jump buffer remembers a press for about 0.1 seconds and fires it on touchdown. If the press also triggered the air jump just before landing, the buffer fires again on the ground and the player bounces. Clear the buffer whenever a jump actually fires.
Ceiling bonks and moving platforms
An air jump under a low ceiling should still spend the jump (players accept that), but the vertical speed must be zeroed on the hit so the player does not stick to the ceiling. On a platform moving upward, launch speed should be measured relative to the platform, or jumps from rising elevators feel huge and those from falling ones feel dead.
What a double jump does to your levels
A double jump roughly doubles the player's vertical reach and extends horizontal reach by about half again, and, more importantly, lets them correct mistakes in the air. That changes level design in two ways. Gaps that were hard become trivial, and players can reach places you never meant them to. Measure the new limits with the real values (max height with both jumps, max distance at full run) and write them beside the single-jump limits.
Then decide when the player gets it. From the start makes the whole game more forgiving and suits casual and mobile games. Earned partway is the classic metroidvania gate: ledges that were out of reach become the way forward, and earlier levels hide secrets only the double jump can reach. If it is earned, every level before the pickup must be checked against single-jump limits only, and nothing in those levels should require it. The metroidvania guide covers ability gates and softlock checks in depth.
On Startbase you can test those limits by hand in the World Editor: press P and the level starts with the player where the camera is, so you can try one ledge again and again without walking there, and drag the ledge a tile closer if it is out of reach.
How it combines with other moves
- With a dash. Decide whether a dash and the double jump share one air budget or have separate counters. Separate counters (one jump, one dash per airtime) give the most expressive movement; a shared budget makes each air action a choice.
- With wall jumps. Most games refill the air jump on a wall jump or wall grab, so wall sections and open air feel connected. If you do, make sure wall contact itself does not refill it.
- With stomps. Bouncing off an enemy's head and refilling the air jump turns enemies into stepping stones. It is a great reward for aggressive play.
- With pickups. Floating orbs that refill the air jump when touched let you design long chains over pits without giving the player infinite flight. They are the double jump's best level-design tool.
- With gliding. Holding jump after the second jump can open a glide. Keep the two on clearly different inputs or timings, or players will glide when they meant to jump.
A double jump brief to paste
Paste this into a game that already has a working run and jump, and change the values to fit your character:
Add a double jump to the player. One air jump, refilled only when the player lands on ground from above (not from touching walls or ceilings), when they stomp an enemy, or when they touch a refill orb. Check jumps in this order: ground jump (including the 0.1 s coyote window), then air jump. The air jump sets vertical speed to a launch value for 80 percent of the ground jump height, switches back to normal gravity until the apex, keeps variable height on early release, and snaps horizontal speed 75 percent toward the held direction. Ignore a second air jump within 0.06 s of the first. Clear the jump buffer whenever a jump fires. Give the air jump a flip animation, a small puff of dust where it starts, a lighter jump sound, and dim the character's scarf while it is spent, with a tiny flash when it refills. Expose air jump height, horizontal redirect and the lockout as dials. Then place three refill orbs over a wide pit in level 2.
Before you send it, save a checkpoint so you can compare the old and new feel side by side. Then play every existing level once: the double jump is the kind of change that quietly makes an old puzzle too easy.
Frequently asked questions
Should a double jump be as high as the first jump?
Usually not. A second jump at 75 to 90 percent of the first jump's height feels like a correction instead of a second launch, and keeps levels easier to design. Games built around aerial movement sometimes use a full-height second jump on purpose.
Why does my double jump feel weak when I use it while falling?
The game is probably adding the jump force to the current vertical speed. When the player is falling, part of the force just cancels the fall. Set vertical speed to the launch value instead, so the second jump is the same from any point.
How do I stop players from double jumping off walls forever?
Refill the air jump only when the player is grounded and moving down or standing still, not on any contact. Then choose specific extra refills on purpose, such as stomping an enemy or a wall jump.
Is a double jump realistic?
No, and players do not mind. Give it a visual reason (a puff of air, wings, magic boots) and consistent rules, and it reads as part of the world.

