Skip to content
AI-powered appsNewChat, vision, voice, generationBookings & schedulingAppointments that book themselvesShops & sellingA storefront in every pocketClient & businessRun the operation from one placeCommunities & clubsA home that is not a group chat
Health & wellnessHabits, tracking and calmGames2D, 3D and multiplayerPersonal & toolsThe tool you wish existedInternal toolsThe tool ops never had time for
See all use cases
ArcadeNewPricingSecurity
EngineThe game engine and World EditorHow it worksFrom one sentence to a live productDocsGuides for building and publishingBlogStories, guides and newsChangelogWhat shipped latelyStatusUptime of every serviceSupportGet help from the team
AI-powered appsBookings & schedulingShops & sellingClient & businessCommunities & clubsHealth & wellnessGamesPersonal & toolsInternal tools
See all use cases
ArcadeNewPricingSecurity
EngineHow it worksDocsBlogChangelogStatusSupport
Language
Blog
Game mechanicsNovember 22, 20267 min read

How to Add a Dash Move

A dash is a short burst of fixed speed that overrides normal movement. Get its distance, its ending and its refill rule right and it becomes the move players use most.

Startbase Team
Editorial ink illustration of a small figure streaking along a stone floor with faded ghost copies behind it, the front figure's scarf in ember orange

Key takeaways

  • A dash is a short state, not a push: for about 0.12 to 0.2 seconds the player moves at a fixed speed, ignores gravity and ignores normal input.
  • How the dash ends matters as much as how it starts. Keep some momentum, cut the rest, and give control back immediately.
  • Most dash bugs are collision bugs: tunneling through thin walls, getting stuck in corners, and dashing off the map. Test for them on purpose.

To add a dash, put the player into a short "dashing" state when they press the dash button: for a fixed time (around 0.15 seconds) they move at a fixed high speed in one direction, gravity and normal steering switch off, and then the state ends and normal movement resumes with a little of the speed kept. A cooldown or a refill rule decides when they can dash again. Treating it as a state instead of a one-off impulse is what makes a dash precise: it covers the same distance every time, so players can learn it.

Why a dash should be a state, not a push

The tempting version is "add a big burst of speed when the button is pressed". It feels wrong almost immediately. Friction and air drag eat the burst at different rates on the ground and in the air, gravity bends it into an arc, and a player holding the opposite direction cancels half of it. The distance changes every time, so the move cannot be trusted near a pit.

A dash state fixes all of that. While it runs, the movement code ignores everything except the dash: velocity is set (not added) to direction × dash speed every frame, gravity is zero, and steering input is ignored. When the timer runs out, the state exits through a defined ending. The data is small:

  • dashSpeed and dashDuration: together they set the distance (distance = speed × duration).
  • dashDirection: captured once at the start, from the held stick or keys, falling back to the facing direction when nothing is held.
  • dashTimer: counts down while dashing.
  • dashesLeft and maxDashes, or a cooldownTimer: the refill rule.

The numbers to start with

Think in tiles, then convert. These values suit a 2D action game with 48-pixel tiles at 60 frames per second; for a top-down game or 3D, keep the ratios and scale to your world.

  • Distance: 3 to 4 tiles (about 150 to 200 px). Shorter feels like a stutter step; longer makes it a teleport and breaks your level spacing.
  • Duration: 0.12 to 0.2 seconds (7 to 12 frames). Under 0.1 seconds the eye cannot follow the motion. Over 0.25 seconds the player feels locked out of control.
  • Speed: whatever the two above imply. 4 tiles in 0.16 seconds is about 1,200 px/s, roughly three to four times a typical run speed. If the dash is less than twice run speed, it does not read as a dash.
  • Startup: 0 to 2 frames. A tiny freeze before the burst (1 to 2 frames) adds punch in action games. Platformers usually want zero, because players dash to save themselves.
  • Directions: 8 or horizontal only. Eight-way dashing (including up and diagonals) is more expressive but changes level design a lot; diagonal speed must be normalized so a diagonal dash covers the same distance as a straight one.

Tip

Ask the agent to expose dash speed, duration, end momentum and cooldown as dials. On Startbase they appear in the game's engine panel, so you tune them while playing instead of describing the feel in words (games docs).

How the dash ends

Players remember a dash by its ending. Three choices decide it:

  1. 01End momentum. When the timer runs out, keep a fraction of the dash speed, then let normal acceleration take over. Around 30 to 50 percent of dash speed, or simply your run speed, flows well. Zero momentum gives a crisp, precise stop that suits puzzle platformers. Full momentum makes the dash a speed boost and turns your game into a momentum game.
  2. 02Vertical speed after an air dash. Most games set vertical speed to zero at the end, so the player hangs for an instant before gravity resumes. That small hang is what makes air dashes feel controllable.
  3. 03Early exit. Allow a jump to cancel the last part of a ground dash. Jumping out of a dash and keeping its speed (often called a dash jump) is one of the most satisfying tricks in movement games. Decide whether you want it; it extends jump distance a lot.

Cooldowns, charges and refills

How often a player can dash shapes the whole game. Pick one rule and say it plainly in your brief:

  • Refill on landing (platformers). One dash per airtime, restored when the player touches the ground. Simple, readable, and it pairs with refill crystals in the air. On the ground, add a tiny cooldown (around 0.15 to 0.3 seconds) so players cannot chain ground dashes into flight.
  • Cooldown (action and top-down games). One dash, then a wait of 0.5 to 1.5 seconds. Shorter makes the dash a movement tool; longer makes it an emergency escape you plan around.
  • Charges. Two or three dashes that refill one at a time (say one per 1.2 seconds). Charges let players chain dashes in a crisis and then pay for it, which feels great in twin-stick and roguelike games.
  • Stamina. Each dash costs a chunk of a stamina bar shared with sprinting or blocking. It turns movement into resource management; use it only if stamina already exists.

Show the state clearly. A character tint that drops out while the dash is spent, or small pips under the player for charges, beats a cooldown icon in the corner of the HUD that nobody looks at mid-fight.

Invincibility frames: the dodge question

In action games the dash is also the dodge, and the question is whether it makes the player invincible. If it does, those frames of invincibility (often called i-frames) let players pass through attacks with good timing, which is the core of many action games. If it does not, the dash is pure repositioning and players must go around attacks.

A common middle ground: invincible for the first 60 to 70 percent of the dash, vulnerable for the rest. That rewards dashing at the right moment, not just dashing often. Give it a visible tell (the ghost trail, a flicker) so players learn the window. If your dash has i-frames and a short cooldown, check that enemy attacks are still a threat; otherwise players will dash through everything. The boss fight guide talks about how dodge windows shape attack patterns.

Dash bugs to test for

A dash moves the player several times faster than anything else in the game, which exposes every weak spot in your collision. Try each of these deliberately:

  • Tunneling. At 1,200 px/s the player moves 20 px per frame at 60 fps, and more on a slow frame. Thin walls and one-way platforms can be skipped entirely. Fix: move in smaller substeps during a dash, or sweep the player's collision box along the path.
  • Corner snagging. Dashing along a floor seam or into a corner stops the dash dead on a single pixel. A slightly rounded or narrower hitbox during the dash, or corner correction that nudges the player a few pixels around an edge, fixes most of it.
  • Stuck in walls. If the dash is allowed to end inside geometry (for example after passing through a door that closed), the player is trapped. Always resolve the final position out of solid tiles.
  • Dashing off the map. Level edges that are open, or invisible walls with gaps, become exits. Check every edge with a full dash.
  • Direction from stale input. On touch screens, the dash direction is often read before the stick has moved. Read the direction on the frame the dash fires, with a short window (about 2 to 3 frames) to accept a slightly late stick input.
  • Frame rate dependence. If the dash counts frames instead of seconds, it is shorter on a 120 Hz phone. Run timers in seconds.

How a dash combines with other mechanics

  • With a double jump. Give each its own air budget so players can jump, dash, then jump again. The double jump guide covers the refill rules that keep this from becoming flight.
  • With walls. Dashing into a wall can start a wall slide, and a wall jump can refill the dash. That combination makes vertical shafts fun; see wall jumping and wall sliding.
  • With combat. A dash attack (attack pressed during or right after a dash) is a natural gap closer. Cancelling an attack's recovery into a dash is a design choice that makes combat faster and harder to balance.
  • With level design. Dash gaps (too wide to jump, easy to dash) and breakable walls that only shatter on a dash are the classic gates once the dash is earned. Mark them consistently.

A dash brief to paste

Add a dash to the player on the Shift key and a dash button on the right side of the touch controls. Dashing is its own state: for 0.15 s the player moves at a fixed 1,200 px/s in the held direction (8 directions, normalized, falling back to facing), with gravity off and steering ignored. At the end keep 40 percent of the dash speed horizontally and set vertical speed to zero. One dash per airtime, refilled on landing, with a 0.25 s ground cooldown. Jumping in the last 0.05 s of a ground dash keeps the dash speed. The player is invincible for the first 0.1 s. Move the player in substeps during the dash so it never passes through thin walls, nudge it around corners by up to 6 px, and never let a dash end inside a wall. Show three fading ghost copies behind the player, a short whoosh sound, and dim the player's scarf while the dash is spent. Expose speed, duration, end momentum and cooldown as dials.

Then build one small test room in the World Editor with a thin wall, a corner, a dash-width gap and an open edge, and play it at both a fast and a slow frame rate. If the dash survives that room, it will survive your levels.

Frequently asked questions

How far should a dash go?

A good starting point is 3 to 4 tiles (about three to four times the player's width) over 0.12 to 0.2 seconds. Tune from there by playing, and keep required dash gaps a little shorter than the maximum.

Should the dash have a cooldown?

In platformers, refilling the dash on landing usually works better than a timer. In top-down and action games, a cooldown of 0.5 to 1.5 seconds or two to three charges that refill one at a time keeps dashing a decision.

Why does my player pass through walls when dashing?

At dash speed the player moves further per frame than the wall is thick, so the collision check never sees an overlap. Move the player in several small steps per frame during a dash, or sweep its collider along the path.

Should dashing make the player invincible?

In action games built around dodging, yes, for part of the dash: commonly the first 60 to 70 percent. In platformers and puzzle games, usually no, so hazards still matter.

On this page

  • Why a dash should be a state, not a push
  • The numbers to start with
  • How the dash ends
  • Cooldowns, charges and refills
  • Invincibility frames: the dodge question
  • Dash bugs to test for
  • How a dash combines with other mechanics
  • A dash brief to paste

Keep reading

More in Game mechanics
Editorial ink illustration of a wooden toy figure in mid-air above a gap, the puff cloud under its feet in ember orange
Game mechanicsNovember 22, 2026

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.

8 min read
Editorial ink illustration of a tiny climber kicking between two stone walls of a narrow shaft, the climber's boot in ember orange
Game mechanicsNovember 22, 2026

Wall Jumping and Wall Sliding

Wall jumps turn every vertical shaft into a playground, if the slide speed, the kick-off and the brief loss of control are tuned. Here is how to set each one.

7 min read

Read less. Ship more.

Everything in this post is one prompt away. Describe your app and watch it build.

Start building

Apps, games, backends and publishing from one conversation.

Product

  • Features
  • Use cases
  • Pricing
  • Changelog

Resources

  • Blog
  • Docs
  • Support
  • Status
  • Security

Contact

  • w@startbase.ai
  • X / Twitter
  • LinkedIn
  • Instagram

Legal

  • Terms
  • Privacy

© 2026 Startbase. All rights reserved.