November 28th, 2026

9 ways to make a platformer jump feel good, from variable height to wall jumps

A plain gravity jump works, but it feels stiff and unfair. Nine small tricks that fix it, from variable jump height, fast fall and apex hang to coyote time, jump buffering, corner and ledge correction, wall jump reach and squash and stretch, with Celeste's numbers, tested Godot code and a prompt for each.

Paste it into Claude Code, Codex, Cursor or any coding agent.

Copied. Want one of these every week?

The week's game techniques in one free email on Sunday, each with a prompt like this one.

# Add nine jump feel tricks to my platformer

My 2D platformer's jump works but feels stiff and unfair. Add these tricks, most of them from Celeste's player code: variable jump height, fast fall, apex hang, coyote time, jump buffering, corner correction, ledge correction, wall jump reach, and squash and stretch with dust.

Before you write code, look at my project: the engine and language, the player controller, how it detects the ground and reads input, whether movement runs in a fixed physics step, my tile size, and how the sprite is attached to the body. Fit this into the existing controller instead of writing a second one. Keep my run speed. If I have no player controller yet, ask me before inventing one. If I already have some of these tricks, keep them and tell me how mine differ.

## How it works

- Variable jump: for a short time after a jump starts, while jump is held, the character keeps rising at the full jump speed. Releasing ends it, and so does hitting a ceiling. On the tick a jump starts, set the speed and skip gravity; the checks below assume this.
- Fast fall: while moving down, gravity and the top fall speed are both multiplied by a factor.
- Apex hang: while jump is held and the vertical speed is small either way, use half gravity.
- Coyote time: a jump still works for a short time after leaving the ground. A jump closes that window.
- Jump buffer: a press is remembered for a short time and fires on the first tick a jump is possible. A jump uses it up.
- Corner correction: a move upward in the air blocked by a few px of a ceiling corner shifts the body sideways past it.
- Ledge correction: a sideways move in the air blocked by a few px of a ledge lifts the body onto it.
- Wall jump reach: in the air, a press with a wall within a few px is a wall jump, when a normal jump is not possible. The kick ignores left and right for a moment.
- Squash and stretch: stretch the sprite on a jump, squash it on landing by how hard it hit, ease back to normal. Dust at the feet on jumps and hard landings. Only the sprite, scaled from the feet; never the collision box.

## Numbers that matter

These are Celeste's numbers at its scale: 8 px tiles, an 8 x 11 px body, 60 ticks a second. Multiply px values (speeds, gravity, distances) by my tile size / 8 and keep the times.

- Plain jump: 105 px/s up, gravity 900 px/s^2, top fall speed 160 px/s, run 90 px/s. Alone that is a 7 px hop.
- Variable jump: 0.2 s. A tap is still 7 px, a full hold 26 px.
- Fast fall: factor 2 (fall speed up to 320 px/s). Not Celeste's; Celeste only falls faster while holding down.
- Apex hang: half gravity under 40 px/s.
- Coyote time and jump buffer: 0.1 s each, 6 ticks.
- Corner and ledge correction: 4 px each, whole numbers. Less than 4 px is corrected.
- Wall jump: reach 3 px, kick 130 px/s away for 0.16 s (10 ticks), the normal jump speed up.
- Squash: 0.6 x 1.4 on a jump. Landing: k = min(fall speed / 240, 1), scale (lerp(1, 1.6, k), lerp(1, 0.4, k)). Ease back at 1.75 per second. Dust on landings from 80 px/s (half the normal 160 cap, not the fast fall cap).
- Make every one a setting I can tweak, with an off value: 0 for the times, sizes and the apex threshold, 1 for the fall factor, 0 reach for "touching only", false for squash.

## Pseudo code

```
every fixed tick:
    ease sprite.scale toward (1, 1) by 1.75 * dt on each axis
    air_ticks   = 0 if on_ground() else air_ticks + 1        # both start at BIG
    press_ticks = 0 if jump_pressed_this_tick() else press_ticks + 1
    can_jump   = air_ticks   <= round(coyote_time * tps)
    wants_jump = press_ticks <= round(jump_buffer * tps)
    wall = wall_side()                       # +1 / -1 if a wall is within reach in the air, else 0
    if wants_jump and can_jump:      jump(0)
    else if wants_jump and wall != 0: jump(-wall)
    else if not on_ground():
        g = gravity; cap = max_fall
        if velocity.y > 0: g *= fall_factor; cap *= fall_factor     # y points down
        if abs(velocity.y) < apex_speed and jump_held: g *= 0.5
        velocity.y = min(velocity.y + g * dt, cap)
    if hold_ticks > 0:
        if jump_held: hold_ticks -= 1; velocity.y = min(velocity.y, -jump_speed)
        else: hold_ticks = 0
    if kick_ticks > 0: kick_ticks -= 1; velocity.x = kick_dir * wall_kick
    else: velocity.x = input_x * run_speed
    correct_corners()            # ledge: try lifting 1..ledge_px; ceiling: try shifting 1..corner_px
    fall = velocity.y
    move with collisions
    if hit_ceiling: hold_ticks = 0
    if just_landed and fall > 0:
        k = min(fall / 240, 1); sprite.scale = (lerp(1, 1.6, k), lerp(1, 0.4, k))
        if fall >= max_fall / 2: dust.burst()

jump(dir):
    velocity.y = -jump_speed
    air_ticks = BIG; press_ticks = BIG        # one jump per landing, one per press
    hold_ticks = round(var_jump_time * tps)
    if dir != 0: kick_dir = dir; kick_ticks = round(wall_kick_time * tps)
    sprite.scale = (0.6, 1.4); dust.burst()
```

`correct_corners` and `wall_side` need one query, "would the body hit something moving by this much from here". Godot: `test_move`. Unity: `Rigidbody2D.Cast` or `Physics2D.BoxCast`. A tile engine: the box against tiles check. For the ceiling, only shift the way the character moves sideways, or either way when it doesn't.

## Pitfalls

- Coyote time must not give a double jump. Close the window when a jump starts.
- Count fixed ticks or seconds, never rendered frames. In Unity, latch the press in Update and use it in FixedUpdate.
- A held variable jump pushes into ceilings. End it on a bonk.
- Never correct corners on the ground; small bumps turn into stairs. Check the shift itself is free, and the move after it.
- Clear the buffered press on death, respawn and when a menu closes.
- Squash the sprite only. A taller collision box on takeoff hits ceilings.

## Check that it works

Write a small automated test with scripted input, or a debug view with keys to switch each trick off and on. Count "6 ticks after leaving" as the tick on which `air_ticks` becomes 6, and the landing tick as the first tick that starts on the ground. In Godot, an action pressed from a script during a physics tick only counts as just pressed on the next tick, so measure that in the test. At Celeste's scale:

- A 1 tick tap peaks at 7 px, a held jump at 27 px with everything on (26 without the apex hang).
- A full held jump without the apex hang comes down in 11 ticks with the fall factor at 2, 15 at 1.
- Coyote: a press 6 ticks after leaving the ground jumps, 7 does not. Buffer: 6 ticks before landing fires on landing, 7 does not.
- A ceiling overlap of 3.5 px slides past, 4.5 px bonks. Feet 3.5 px under a ledge top get lifted, 4.5 px do not.
- A wall 2.5 px away allows a wall jump, 3.5 px does not. The kick holds 130 px/s for 10 ticks.
- Don't test exactly 4 px or exactly 3 px: whether touching counts as a hit depends on the engine (Godot: yes, Celeste: no).
- The sprite is 0.6 x 1.4 on the jump tick, 1.4 x 0.6 landing at 160 px/s, back to 1 x 1 14 ticks later.
- With every trick off it is the plain 7 px jump again, and a second press in the air never jumps.

Then tell me which values you used and where I can tweak them.

Source: SpriteCook (2D game assets made by your coding agent, for Claude, ChatGPT and Cursor)
Full guide with a video of each trick and a tested Godot project: https://www.spritecook.ai/blog/platformer-jump-feel-variable-height-coyote-time-wall-jump

My first platformer jump was three lines. Set an upward speed, add gravity every frame, done. It worked, and it felt stiff. Every jump I've written since got a few more small tricks, and each one fixed something players kept running into. Here are all nine, most with Celeste's numbers, so you can pick the ones your game needs.

Same hero, same run, six levels. Each level brings an obstacle the jump before it can't handle, and the next trick fixes it. The hero and the cave were generated by a coding agent with SpriteCook.

The plain jump

This is where everyone starts. On the tick you press jump, set the vertical speed to the jump speed. After that, gravity pulls it down every tick until you land.

With Celeste's numbers (105 px/s up, 900 px/s² of gravity, at its scale of 8 px tiles and an 8 x 11 px body) that jump is 7 px high. Tap the button or hold it, you get the same 7 px. The rest of Celeste's jump comes from the tricks below.

Every clip below runs the same input twice, first with the trick off, then with it on. Where the first run fails, its path stays on screen as grey dots.

1. Variable jump height

Players expect a tap to hop and a long press to jump high. With a plain jump both give the same arc, so a player who holds the button to clear a wide pit still falls in.

Celeste's fix is simple. For 0.2 s after the jump starts, as long as jump is held, the character keeps rising at the full jump speed. Let go and gravity takes over at once. In Celeste's Player.cs that's VarJumpTime.

A tap is still the 7 px hop. A full hold rises for 18 ticks instead of 7 and reaches 26 px, almost four times as high.

Another common way is to cut the upward speed in half when the button comes up. That works too. I like Celeste's version because letting go never cuts the speed all at once. Gravity just starts slowing the jump from there.

2. Fast fall

A jump that comes down as slowly as it went up feels floaty. Most good platformers fall faster than they rise. Kyle Pittman's GDC talk Building a Better Jump makes the case for this with the math.

Once the character is moving down, multiply gravity by 2, and the top fall speed with it (160 px/s becomes 320). The way up stays the same. The held jump still rises for 18 ticks but comes down in 11 instead of 15.

Nothing fails here, both jumps land. Compare the grey arc with the yellow one. Celeste doesn't do this one; it has a faster fall only while you hold down. This is my own addition, and the factor of 2 is where I'd start.

3. Apex hang

At the top of a jump the character barely moves up or down. That moment is where players line up a landing, and with full gravity it's gone in a blink.

While jump is held and the vertical speed is under 40 px/s either way, use half gravity. Celeste calls the 40 HalfGravThreshold. The character spends 8 ticks near the top instead of 4, and the full jump grows from 26 to 27 px.

It's a small number and a small change on paper. You feel it more than you see it, mostly as a bit of extra reach on the longest jumps. The cyan dots in the clip are the half gravity ticks.

4. Coyote time

Players press jump a moment after they run off a ledge. On their screen they were still on it. A plain jump only works on the ground, so the press is ignored and the character drops.

Let a jump work for 0.1 s after the character leaves the ground. That's 6 ticks at 60 ticks a second. A press 6 ticks after leaving the ledge jumps, 7 ticks after doesn't. Celeste uses the same 0.1 s, JumpGraceTime.

Close the window the moment a jump starts, or the player gets a free second jump in the air.

5. Jump buffer

The other side of the same problem. Players press jump just before they land, to chain into the next jump. A plain jump throws that press away because the character is still in the air.

Remember the press for 0.1 s, and jump on the first tick the character can. A press up to 6 ticks before landing fires on landing, 7 ticks before doesn't.

Celeste's input buffer lives outside its public player code, so I can't give you its exact number. 0.1 s is the common starting point. Much longer and a press the player already forgot about fires on landing.

6. Corner correction

A jump that clips the corner of a ceiling with the edge of the head stops dead, even when it looked like it would make it past.

When a move upward is blocked, check if the same move would be free with the body shifted sideways by 1, 2, 3 or 4 px. If one is, shift it and keep the jump. Celeste's UpwardCornerCorrection is 4 px, half its 8 px wide body.

Only shift the way the character is already moving, or either way when it's going straight up. A character moving into the block should just bonk.

In my Godot version an overlap of 3.99 px slides past and exactly 4 px bonks, because Godot's test_move counts touching as a hit. Celeste's check doesn't, so there exactly 4 px still slides. The same goes for the ledge and wall jump limits below.

7. Ledge correction

The same idea at the feet. A jump that reaches a ledge a few pixels too low hits its side and slides down the wall, while on screen the feet were basically on top.

When a sideways move in the air is blocked, check if it would be free with the body 1 to 4 px higher. If it is, lift the body by that much. Feet less than 4 px under the top get lifted on, 4 px doesn't.

Celeste does this during a dash (DashCornerCorrection, also 4 px). I use the same 4 px for every move in the air. Never do it on the ground, or every small bump turns into a stair.

8. Wall jump reach

If your game has wall jumps, the wall has to be close enough to kick off. Make it "touching" and players miss by a pixel all the time, because they press as they arrive, not after.

A wall jump works when there's a wall within 3 px of the body, Celeste's WallJumpCheckDist. In the tests 3 px away still kicks off and 3.5 doesn't. Set the reach to 0 and only touching works.

The kick itself: the normal jump speed up, 130 px/s away from the wall, and for 0.16 s left and right are ignored so the player can't steer straight back into the wall. Those are WallJumpHSpeed and WallJumpForceTime. The 0.16 s is 10 ticks.

9. Squash, stretch and dust

The last one leaves the movement alone and changes how the jump reads. A stiff sprite that leaves the ground and lands without a reaction looks like it weighs nothing.

On the jump tick, scale the sprite to 0.6 wide and 1.4 tall. On landing, squash it by how hard it hit: 1.4 x 0.6 at 160 px/s, up to 1.6 x 0.4 at 240 px/s or faster. Each tick, move both scales back toward 1 by 1.75 per second, which takes 14 ticks from 1.4 x 0.6. Those are Celeste's numbers.

Scale from the feet, so the sprite stays on the ground. Only the sprite gets scaled, never the collision box.

Add a puff of dust at the feet on every jump and on every landing at 80 px/s or faster. Celeste uses the same half of the max fall speed for its landing dust.

The code

One Godot 4 script has all nine, and every trick is a setting with an off value. Put it on a CharacterBody2D with an 8 x 11 px CollisionShape2D. It uses Godot's built-in ui_left, ui_right and ui_accept actions, so it runs in an empty project.

For squash, stretch and dust, set visual to a Node2D at the feet that holds the sprite, and dust to a one-shot CPUParticles2D.

The numbers are at Celeste's scale. If your tiles are 16 px, double every px value (speeds, gravity, distances) and keep the times as they are.

This is the part that runs every tick. Coyote time and the jump buffer are tick counters, a jump sets counters for the variable jump and the wall kick, and the fall uses the fast fall and apex hang gravity.

func _physics_process(delta: float) -> void:
	_ease_back(delta)
	var tps := Engine.physics_ticks_per_second
	var was_on_floor := is_on_floor()
	var holding := Input.is_action_pressed("ui_accept")
	_air_ticks = 0 if was_on_floor else _air_ticks + 1
	_press_ticks = 0 if Input.is_action_just_pressed("ui_accept") else _press_ticks + 1

	var can_jump := _air_ticks <= roundi(coyote_time * tps)  # coyote time
	var wants_jump := _press_ticks <= roundi(jump_buffer * tps)  # jump buffer
	var wall := _wall_side()
	if wants_jump and can_jump:
		_jump(0.0)
	elif wants_jump and wall != 0:
		_jump(-wall)  # a wall jump, away from the wall
	elif not was_on_floor:
		var g := gravity
		var cap := max_fall
		if velocity.y > 0.0:  # fast fall
			g *= fall_gravity
			cap *= fall_gravity
		if absf(velocity.y) < apex_speed and holding:
			g *= 0.5  # apex hang
		velocity.y = minf(velocity.y + g * delta, cap)

	if _hold_ticks > 0:  # variable jump
		_hold_ticks = _hold_ticks - 1 if holding else 0
		if holding:
			velocity.y = minf(velocity.y, -jump_speed)

	var axis := Input.get_axis("ui_left", "ui_right")
	if _kick_ticks > 0:
		_kick_ticks -= 1
		velocity.x = _kick_dir * wall_kick
	else:
		velocity.x = axis * run_speed

	_correct_corners(delta)
	var fall := velocity.y
	move_and_slide()
	if is_on_ceiling():
		_hold_ticks = 0  # a bonk ends the held jump
	if is_on_floor() and not was_on_floor and fall > 0.0:
		_landed(fall)

And the wall check, a test_move a few pixels to each side:

# 1 for a wall within wall_reach_px on the right, -1 on the left, 0 for none or on the ground.
func _wall_side() -> int:
	if is_on_floor():
		return 0
	var reach := maxf(wall_reach_px, 0.5)
	for side in [1, -1]:
		if test_move(global_transform, Vector2(side * reach, 0.0)):
			return side
	return 0

The rest of the script is the jump itself, the squash on landing and the corner and ledge correction. Download the Godot project (10 KB) for all of it. It has player.gd, a gray-box level to play with keys 1 to 9 to switch each trick off and on, and the tests.

Tested in Godot 4.6 with scripted input, tick by tick, at 60 ticks a second:

  • The plain jump is 7 px high, tapped or held.
  • Variable jump: a tap is 7 px, a full hold 26 px.
  • Fast fall: the full jump comes down in 11 ticks instead of 15, and the top fall speed is 320 px/s instead of 160.
  • Apex hang: 8 ticks under 40 px/s at the top instead of 4.
  • Coyote time: a press up to 6 ticks after leaving the ground jumps, 7 doesn't.
  • Jump buffer: a press up to 6 ticks before landing fires on landing, 7 doesn't. A press 20 ticks before never fires.
  • Corner and ledge correction: an overlap under 4 px gets past (3.99 px does), 4 px doesn't. A character moving into the ceiling block always bonks.
  • Wall jump: works from 3 px away, not 3.5. The kick holds 130 px/s for 10 ticks, then normal running is back.
  • Squash: 0.6 x 1.4 on the jump tick, 1.4 x 0.6 landing at 160 px/s, back to 1 x 1 in 14 ticks. Dust on a jump and a hard landing, none on a soft one.
  • With every trick off it's the plain jump again, and a second press in the air never jumps.

Other engines

None of this needs Godot. The windows are counters, the feel tricks are a few lines in your gravity code, and the corrections need one question: would this body hit something if it moved by this much from here. In Unity that's Rigidbody2D.Cast or Physics2D.BoxCast; in your own tile engine it's your box against tiles check.

In Unity, count ticks in FixedUpdate but read the button in Update and keep it in a flag. GetButtonDown is only true for one rendered frame, and a FixedUpdate can miss it.

Common pitfalls

Coyote time gives a free double jump. If the check is only "left the ground less than 0.1 s ago", a jump that just started can jump again inside the window. Push the counter out of range the moment a jump starts.

Counting rendered frames. "6 frames" in a per-frame update is 0.1 s at 60 fps and 0.04 s at 144 fps. Count physics ticks or seconds.

The variable jump sticks to ceilings. While jump is held the vertical speed stays at the jump speed, so a character that bonks keeps pushing up for the rest of the 0.2 s. End the held part when the head hits something.

Fast fall without a faster top speed. Doubling gravity barely matters if the fall speed is capped before it gets going. Raise the cap with it.

Scaling the collision box. Squash and stretch is for the sprite. A box that gets 1.4 times taller on takeoff hits ceilings it shouldn't.

An old press fires later. Clear the jump buffer when the character dies, respawns or a menu closes. Otherwise the button that closed the menu makes the character jump.

Where to next

Add this to your game with your coding agent

The prompt has the numbers, pseudo code, pitfalls and checks from this guide, written so your agent can fit it into your own project.

Copied. Want one of these every week?

The week's game techniques in one free email on Sunday, each with a prompt like this one.

# Add nine jump feel tricks to my platformer

My 2D platformer's jump works but feels stiff and unfair. Add these tricks, most of them from Celeste's player code: variable jump height, fast fall, apex hang, coyote time, jump buffering, corner correction, ledge correction, wall jump reach, and squash and stretch with dust.

Before you write code, look at my project: the engine and language, the player controller, how it detects the ground and reads input, whether movement runs in a fixed physics step, my tile size, and how the sprite is attached to the body. Fit this into the existing controller instead of writing a second one. Keep my run speed. If I have no player controller yet, ask me before inventing one. If I already have some of these tricks, keep them and tell me how mine differ.

## How it works

- Variable jump: for a short time after a jump starts, while jump is held, the character keeps rising at the full jump speed. Releasing ends it, and so does hitting a ceiling. On the tick a jump starts, set the speed and skip gravity; the checks below assume this.
- Fast fall: while moving down, gravity and the top fall speed are both multiplied by a factor.
- Apex hang: while jump is held and the vertical speed is small either way, use half gravity.
- Coyote time: a jump still works for a short time after leaving the ground. A jump closes that window.
- Jump buffer: a press is remembered for a short time and fires on the first tick a jump is possible. A jump uses it up.
- Corner correction: a move upward in the air blocked by a few px of a ceiling corner shifts the body sideways past it.
- Ledge correction: a sideways move in the air blocked by a few px of a ledge lifts the body onto it.
- Wall jump reach: in the air, a press with a wall within a few px is a wall jump, when a normal jump is not possible. The kick ignores left and right for a moment.
- Squash and stretch: stretch the sprite on a jump, squash it on landing by how hard it hit, ease back to normal. Dust at the feet on jumps and hard landings. Only the sprite, scaled from the feet; never the collision box.

## Numbers that matter

These are Celeste's numbers at its scale: 8 px tiles, an 8 x 11 px body, 60 ticks a second. Multiply px values (speeds, gravity, distances) by my tile size / 8 and keep the times.

- Plain jump: 105 px/s up, gravity 900 px/s^2, top fall speed 160 px/s, run 90 px/s. Alone that is a 7 px hop.
- Variable jump: 0.2 s. A tap is still 7 px, a full hold 26 px.
- Fast fall: factor 2 (fall speed up to 320 px/s). Not Celeste's; Celeste only falls faster while holding down.
- Apex hang: half gravity under 40 px/s.
- Coyote time and jump buffer: 0.1 s each, 6 ticks.
- Corner and ledge correction: 4 px each, whole numbers. Less than 4 px is corrected.
- Wall jump: reach 3 px, kick 130 px/s away for 0.16 s (10 ticks), the normal jump speed up.
- Squash: 0.6 x 1.4 on a jump. Landing: k = min(fall speed / 240, 1), scale (lerp(1, 1.6, k), lerp(1, 0.4, k)). Ease back at 1.75 per second. Dust on landings from 80 px/s (half the normal 160 cap, not the fast fall cap).
- Make every one a setting I can tweak, with an off value: 0 for the times, sizes and the apex threshold, 1 for the fall factor, 0 reach for "touching only", false for squash.

## Pseudo code

```
every fixed tick:
    ease sprite.scale toward (1, 1) by 1.75 * dt on each axis
    air_ticks   = 0 if on_ground() else air_ticks + 1        # both start at BIG
    press_ticks = 0 if jump_pressed_this_tick() else press_ticks + 1
    can_jump   = air_ticks   <= round(coyote_time * tps)
    wants_jump = press_ticks <= round(jump_buffer * tps)
    wall = wall_side()                       # +1 / -1 if a wall is within reach in the air, else 0
    if wants_jump and can_jump:      jump(0)
    else if wants_jump and wall != 0: jump(-wall)
    else if not on_ground():
        g = gravity; cap = max_fall
        if velocity.y > 0: g *= fall_factor; cap *= fall_factor     # y points down
        if abs(velocity.y) < apex_speed and jump_held: g *= 0.5
        velocity.y = min(velocity.y + g * dt, cap)
    if hold_ticks > 0:
        if jump_held: hold_ticks -= 1; velocity.y = min(velocity.y, -jump_speed)
        else: hold_ticks = 0
    if kick_ticks > 0: kick_ticks -= 1; velocity.x = kick_dir * wall_kick
    else: velocity.x = input_x * run_speed
    correct_corners()            # ledge: try lifting 1..ledge_px; ceiling: try shifting 1..corner_px
    fall = velocity.y
    move with collisions
    if hit_ceiling: hold_ticks = 0
    if just_landed and fall > 0:
        k = min(fall / 240, 1); sprite.scale = (lerp(1, 1.6, k), lerp(1, 0.4, k))
        if fall >= max_fall / 2: dust.burst()

jump(dir):
    velocity.y = -jump_speed
    air_ticks = BIG; press_ticks = BIG        # one jump per landing, one per press
    hold_ticks = round(var_jump_time * tps)
    if dir != 0: kick_dir = dir; kick_ticks = round(wall_kick_time * tps)
    sprite.scale = (0.6, 1.4); dust.burst()
```

`correct_corners` and `wall_side` need one query, "would the body hit something moving by this much from here". Godot: `test_move`. Unity: `Rigidbody2D.Cast` or `Physics2D.BoxCast`. A tile engine: the box against tiles check. For the ceiling, only shift the way the character moves sideways, or either way when it doesn't.

## Pitfalls

- Coyote time must not give a double jump. Close the window when a jump starts.
- Count fixed ticks or seconds, never rendered frames. In Unity, latch the press in Update and use it in FixedUpdate.
- A held variable jump pushes into ceilings. End it on a bonk.
- Never correct corners on the ground; small bumps turn into stairs. Check the shift itself is free, and the move after it.
- Clear the buffered press on death, respawn and when a menu closes.
- Squash the sprite only. A taller collision box on takeoff hits ceilings.

## Check that it works

Write a small automated test with scripted input, or a debug view with keys to switch each trick off and on. Count "6 ticks after leaving" as the tick on which `air_ticks` becomes 6, and the landing tick as the first tick that starts on the ground. In Godot, an action pressed from a script during a physics tick only counts as just pressed on the next tick, so measure that in the test. At Celeste's scale:

- A 1 tick tap peaks at 7 px, a held jump at 27 px with everything on (26 without the apex hang).
- A full held jump without the apex hang comes down in 11 ticks with the fall factor at 2, 15 at 1.
- Coyote: a press 6 ticks after leaving the ground jumps, 7 does not. Buffer: 6 ticks before landing fires on landing, 7 does not.
- A ceiling overlap of 3.5 px slides past, 4.5 px bonks. Feet 3.5 px under a ledge top get lifted, 4.5 px do not.
- A wall 2.5 px away allows a wall jump, 3.5 px does not. The kick holds 130 px/s for 10 ticks.
- Don't test exactly 4 px or exactly 3 px: whether touching counts as a hit depends on the engine (Godot: yes, Celeste: no).
- The sprite is 0.6 x 1.4 on the jump tick, 1.4 x 0.6 landing at 160 px/s, back to 1 x 1 14 ticks later.
- With every trick off it is the plain 7 px jump again, and a second press in the air never jumps.

Then tell me which values you used and where I can tweak them.

Source: SpriteCook (2D game assets made by your coding agent, for Claude, ChatGPT and Cursor)
Full guide with a video of each trick and a tested Godot project: https://www.spritecook.ai/blog/platformer-jump-feel-variable-height-coyote-time-wall-jump

More game techniques

All techniques