Skip to main content
Coding Quests

Godot Top-Down Controller

A top-down character that only walks feels flat. This controller adds the pieces that make it feel responsive. Aim follows the mouse, the dash is one you can rely on, and the camera looks where you aim.

Free Godot 4.7 project · MIT licensed · v1.0.0

No account needed. Or download the v1.0.0 ZIP directly.

A knight moving, aiming a sword at the mouse and dashing, leaving an afterimage trail.

What is in it

  • 8-direction movement on a CharacterBody2D, the Godot node for a character you move from code. Diagonals are not faster.
  • Mouse aim. The weapon points at the cursor and the body turns to face it.
  • A dash in your movement direction, or toward the mouse when you stand still.
  • I-frames during the dash: a short window where the player cannot be hurt.
  • Dash juice: an afterimage trail, a stretch before the dash and a squash after it.
  • A follow camera that leans toward your aim, with shake, kick and zoom punch you can call from any script.
  • Every tuning number is exported, so you can adjust it in the Inspector while the game runs.

Quick start

Download the project from GitHub and unzip it. In the Godot Project Manager, click Import and pick the project.godot file inside the folder.

  1. Press F5.
  2. Move with WASD and aim with the mouse.
  3. Dash with Space.
  4. Select the Player node, change move_speed or dash_speed in the Inspector, and run again.

The README on GitHub explains how each part works and how to copy it into your own game.

Compatibility and limits

Made for
Godot 4.7, standard build. GDScript only, no .NET needed.
Tested on
Godot 4.7.2 stable, on Windows. Earlier versions of Godot 4 are untested. Uses the Mobile renderer, which needs Vulkan, Direct3D 12 or Metal.
Renderer
Mobile
Code license
MIT. You can use it in commercial games. Read the license
Art and fonts
Knight and sword sprites from Kenney's Tiny Dungeon pack (CC0 1.0).
Release
v1.0.0, commit 856168f, published 2026-10-03

Known limits

  • Keyboard and mouse only. Aiming with a right stick needs a few extra lines.
  • The demo arena has no walls, so collision is not shown.
  • The i-frames are a flag. Nothing in this project damages the player until your own damage code reads it.
  • There is no sound.

Learn to build it

Copying a system works until you need to change it. These quests build it with you, one small step at a time. You write the GDScript in your browser and each step is checked before you move on.

2D Roguelike: Top-Down Controller

Builds this controller one piece at a time, written and checked in your browser.

Free, 8 lessons

2D Roguelike: Combat Core

Carries on from here with health, hitboxes, hurtboxes and a weapon.

First 4 lessons free

See all the free Godot projectsReport a problem with this project