godot-2d-movement
Implement 2D kinematic character movement in Godot 4.x with CharacterBody2D and move_and_slide(): platformer run/jump with gravity, top-down 8-direction motion, slope handling, and reading collisions. Use when coding a 2D player or enemy controller, a platformer or top-down character, or fixing move_and_slide()/ is_on_floor() behavior in a .tscn with a CharacterBody2D.
npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill godot-2d-movement --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Godot 2D Movement (4.x) Build responsive 2D character controllers with `CharacterBody2D` and the argument-less `move_and_slide()`. Targets **Godot 4.3+**. ## When to use - Use when scripting a 2D player/enemy that moves and collides: platformer (gravity + jump) or top-down (free 8-direction), slope walking, or wall/floor detection. - Use when `move_and_slide()` "does nothing", the character sinks through floors, or `is_on_floor()` is always false. **When *not* to use:** dynamic rigid bodies, areas, raycasts, collision layers → `godot-physics`; tile-based levels → `godot-tilemap`; full platformer game template → the `platformer` genre skill; engine-agnostic feel tuning → `physics-tuning`. ## Core workflow 1. **Use `CharacterBody2D`** with a `CollisionShape2D` child. It is script-driven: it does not fall or react to forces on its own. 2. **Set the `velocity` property, then call `move_and_slide()`** (no arguments in 4.x). The method reads `velocity`, moves the body, slides along surfaces, and updates `velocity` to reflect what actually happened. 3. **Do it in `_physics_process(delta)`** — `move_and_slide()` uses the physics step's delta internally, so do not multiply `velocity` by `
- When to use
- Core workflow
- Patterns
- 1. Platformer controller (gravity, jump, slopes)
- 2. Top-down 8-direction movement
- 3. Reading slide collisions after moving
- 4. Coyote time (forgiving jump just after leaving a ledge)
- Pitfalls
- References
- Related skills
What does the godot-2d-movement skill do?
Implement 2D kinematic character movement in Godot 4.x with CharacterBody2D and move_and_slide(): platformer run/jump with gravity, top-down 8-direction motion, slope handling, and reading collisions. Use when coding a 2D player or enemy controller, a platformer or top-down character, or fixing move_and_slide()/ is_on_floor() behavior in a .tscn with a CharacterBody2D.
How do I install it?
Run `npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill godot-2d-movement --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From gamedev-skills/awesome-gamedev-agent-skills, a repository with 406 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
