---
title: "Platformer dash: fixed distance and a 45 ms freeze"
description: "A platformer dash is a fixed-speed burst with gravity off: 900 px/s for 0.16 s, 3.6 tiles every time. See its freeze and buffer on a timeline and play it."
date: 2026-11-18
url: https://valdemird.com/blog/platformer-dash/
lang: en
tags: ["game-feel", "game-design", "godot", "platformers"]
---

**Playable sheet: Dash** (the real game, in the page)

- Video: https://valdemird.com/videos/play/platformer-lab/plataformas-dash.mp4 (Jump and dash at the top over 8 tiles of spikes, jump plus dash upward on the 6-tile wall, and a dash through the 1-tile tunnel over a pit. After T the same dashes lose their 45 ms freeze.)
- Play: https://valdemird.com/play/platformer-lab/index.html?plano=plataformas&lamina=dash&lang=en

How to try it:
1. Run right with →. At the eight spikes, jump with Space and, at the top of the jump, dash with X.
2. At the six-tile wall, jump and dash upward: hold ↑ and press X near the top of the jump.
3. In the one-tile tunnel there's no room to jump. Dash across the pit with X.
4. Press T and do all three again. The distances don't change, but the dashes lose their 45 ms freeze, and an X pressed just before landing no longer waits for the recharge.

# Platformer dash: fixed distance and a 45 ms freeze

> A platformer dash is a fixed-speed burst with gravity off: 900 px/s for 0.16 s, 3.6 tiles every time. See its freeze and buffer on a timeline and play it.

A **dash** is a short burst at a fixed speed for a fixed time, with gravity switched off: 900 px/s for 0.16 s, 3.6 tiles every time, in any of eight directions. Because the distance never changes, a level can be measured against it.

**An air dash, then landing.**
- freeze (45 ms): with the technique, The whole game stands still as the dash starts. The dash is spent: the press does nothing. Without it, No freeze: the dash is already moving. It's spent: the press does nothing.
- dash buffer (100 ms): with the technique, Kept: you dash the moment you land, n ms later. Without it, Lost: n ms too early, and you land without dashing.

Dash: a fixed distance you can design around

Speed, duration and direction are fixed the instant you press, so nothing can bend the dash once it starts. A diagonal dash is normalized and covers the same 3.6 tiles along the diagonal. Jump first and dash at the top, and the reach goes from 6.4 tiles to about 9.5.

Dash freeze and buffer: what T switches off

T leaves speed, duration and distance alone and removes the two things around the dash. The freeze is a hitstop: the whole game stops for 45 ms as the dash starts, and that pause is what makes it hit. The buffer keeps a press for 100 ms while the dash isn't available, like the [jump buffer](/blog/coyote-time-jump-buffer/). Celeste freezes its dash for 50 ms.

How to implement a dash

1. **Make the dash its own state.** While it lasts, skip the normal step, which is where gravity, air control and jumping live.
2. **Fix the direction at the press** and set the velocity again every tick. On the floor, drop the downward part.
3. **Cut the speed on the way out**: sideways to the run speed (340 px/s), upward to 40%. Without that cut the character leaves at 900 px/s and slides past the spot the level was measured for.
4. **Recharge it on the floor or a bounce**, one per flight, with a cooldown on the floor.

**The code in Godot 4.**

`addons/platformer_kit/player/player.gd`:

```gdscript
func _start_dash(on_floor: bool) -> void:
	var dir := Vector2(input_x, input_y)
	if on_floor and dir.y > 0.0:
		dir.y = 0.0
	if dir == Vector2.ZERO:
		dir = Vector2(facing, 0.0)
	dash_dir = dir.normalized()
	# ...
	velocity = dash_dir * params.dash_speed

func _step_dash() -> void:
	# Durante el dash la velocidad es constante y la gravedad no actúa:
	# la distancia recorrida es siempre la misma (predecible = diseñable).
	velocity = dash_dir * params.dash_speed

func _end_dash(boosted: bool) -> void:
	state = State.NORMAL
	# Al terminar se recorta la velocidad: el dash acaba donde el diseñador espera.
	var limit := params.max_speed * (params.dash_jump_speed_mult if boosted else 1.0)
	velocity.x = clampf(velocity.x, -limit, limit)
	if velocity.y < 0.0:
		velocity.y *= params.dash_end_up_mult
```

`boosted` is the dash jump: jumping during a dash on the floor keeps 1.4 times the run speed.

Quick answers

How long should a dash last?

0.16 s here and 0.15 s in [Celeste](https://github.com/NoelFB/Celeste/blob/master/Source/Player/Player.cs). Short enough to read as one burst, long enough to cover a few tiles.

Should gravity apply during a dash?

No. Without gravity the distance is speed times time and nothing else, which is what makes it measurable. Handle the vertical after the dash: this lab keeps 40% of the upward speed, Celeste 75%.

How long should the dash cooldown be?

If the dash makes the player invulnerable, at least twice the protection: 0.45 s here for 0.21 s, so mashing can't become a shield. Otherwise it only limits mashing on the floor. Celeste uses 0.2 s.
