Implement 2D kinematic character movement in Godot 4.7 with CharacterBody2D and moveandslide(): platformer run/jump with gravity, top-down 8-direction motion, slope handling, and reading collisions.

Apache-2.0Auto-check passedGame Development

Install Godot 2D Movement

skills CLI
$ npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill godot-2d-movement -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install gamedev-skills/awesome-gamedev-agent-skills godot-2d-movement --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/gamedev-skills/awesome-gamedev-agent-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/godot/godot-2d-movement .claude/skills/godot-2d-movement && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
godot-2d-movement
GitHub stars
1.4k
Token cost
~1.5k tokens
SKILL.md length
427 words
Files
2 (incl. references)
Skills in repo
53
Repo updated
First seen
Licence
Apache-2.0

At a glance

Implement 2D kinematic character movement in Godot 4.7 with CharacterBody2D and moveandslide(): platformer run/jump with gravity, top-down 8-direction motion, slope handling, and reading collisions.

  • Works in 4 steps: Platformer controller (gravity, jump,… → Top-down 8-direction movement → Reading slide collisions after moving → …
  • Coding a 2D player
  • SKILL.md covers When to use, Core workflow, Patterns and Pitfalls, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Godot 2D Movement is an agent skill from gamedev-skills/awesome-gamedev-agent-skills. Implement 2D kinematic character movement in Godot 4.7 with CharacterBody2D and moveandslide(): 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 moveandslide()/ isonfloor() behavior in a .tscn with a CharacterBody2D.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/controller-recipes.md`).

It sits in Game Development, covering Game development and Slides and decks. It works with Godot. The repository describes itself as: 74 game-dev skills for AI coding agents — Godot, Unity, Unreal, Phaser, PixiJS, three.js, Bevy, pygame, LÖVE, Roblox. Portable SKILL.md Agent Skills (the format Anthropic… The licence is Apache-2.0.

When your agent uses it

  • Coding a 2D player
  • Enemy controller
  • Top-down character
  • Fixing moveandslide()/ isonfloor() behavior in a .tscn with a CharacterBody2D

Example prompts

  • “/godot-2d-movement”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  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)

What it can do on your machine

Read from SKILL.md and the folder at commit 0a70cfc. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are gdscript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Godot 2D Movement loads about 1.5k tokens when it runs, and up to ~2.3k if it reads all its reference files. Until then it costs about 97 tokens; SKILL.md has 427 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~97
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from gamedev-skills/awesome-gamedev-agent-skills at commit 0a70cfc, republished under its Apache-2.0 licence (© gamedev-skills). 427 words, ~1,498 tokens.

Download SKILL.mdSave it as .claude/skills/godot-2d-movement/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
godot-2d-movement
description
Implement 2D kinematic character movement in Godot 4.7 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.

Godot 2D Movement (4.x)

Build responsive 2D character controllers with CharacterBody2D and the argument-less move_and_slide(). Targets Godot 4.7.

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 delta yourself.
  4. Platformer: add gravity to velocity.y each tick, jump by setting velocity.y negative when is_on_floor().
  5. Top-down: build a direction from input and scale by speed; set motion_mode = MOTION_MODE_FLOATING so there is no "floor/wall" distinction.
  6. Read results with is_on_floor(), is_on_wall(), get_wall_normal(), and get_slide_collision(i) after the call.

Patterns

1. Platformer controller (gravity, jump, slopes)
gdscript
extends CharacterBody2D

@export var speed := 200.0
@export var jump_velocity := -400.0
@export var gravity := 1200.0          # pixels/sec^2 (tune to taste)

func _physics_process(delta: float) -> void:
    # Apply gravity while airborne.
    if not is_on_floor():
        velocity.y += gravity * delta

    # Jump only when grounded (Input action set in Project Settings > Input Map).
    if Input.is_action_just_pressed("jump") and is_on_floor():
        velocity.y = jump_velocity

    # Horizontal input: -1, 0, or 1.
    var dir := Input.get_axis("move_left", "move_right")
    if dir != 0.0:
        velocity.x = dir * speed
    else:
        velocity.x = move_toward(velocity.x, 0.0, speed)   # decelerate to a stop

    move_and_slide()   # 4.x: no arguments; uses and updates `velocity`
2. Top-down 8-direction movement
gdscript
extends CharacterBody2D

@export var speed := 220.0

func _ready() -> void:
    motion_mode = CharacterBody2D.MOTION_MODE_FLOATING  # no floor/ceiling concept

func _physics_process(_delta: float) -> void:
    # get_vector returns a normalized-ish Vector2 from four input actions.
    var input := Input.get_vector("move_left", "move_right", "move_up", "move_down")
    velocity = input * speed
    move_and_slide()
3. Reading slide collisions after moving
gdscript
func _physics_process(delta: float) -> void:
    # ... set velocity ...
    move_and_slide()
    for i in get_slide_collision_count():
        var c := get_slide_collision(i)
        var other := c.get_collider()
        if other and other.is_in_group("enemies"):
            take_damage(1)        # touched an enemy while moving
4. Coyote time (forgiving jump just after leaving a ledge)
gdscript
@export var coyote_time := 0.1
var _coyote := 0.0

func _physics_process(delta: float) -> void:
    if not is_on_floor():
        velocity.y += gravity * delta
        _coyote -= delta
    else:
        _coyote = coyote_time

    if Input.is_action_just_pressed("jump") and _coyote > 0.0:
        velocity.y = jump_velocity
        _coyote = 0.0
    # ... horizontal input + move_and_slide() ...
Show full SKILL.md (195 more words)Show less

Pitfalls

  • 3.x signature is gone. move_and_slide(velocity) (returning the new velocity) was removed. In 4.x set the velocity property and call move_and_slide() with no args. move_and_slide(velocity, Vector2.UP) will not parse.
  • Multiplying velocity by delta. move_and_slide() already accounts for the physics delta. Setting velocity = dir * speed * delta makes the body crawl.
  • Movement in _process instead of _physics_process causes frame-rate-dependent, jittery motion. Always move in _physics_process.
  • is_on_floor() always false when up_direction is wrong (default Vector2.UP), there is no CollisionShape2D, or you never called move_and_slide() this frame.
  • Sinking through floors usually means the collision shape is missing/zero-sized, the floor body is on a layer this body's mask doesn't include, or you moved the body via position += instead of velocity + move_and_slide().
  • Slope slipping while idle: keep floor_stop_on_slope = true (default) and set a floor_snap_length so the body sticks to downward slopes.

References

  • For one-way platforms, moving platforms, jump buffering, variable jump height, and move_and_collide() (manual collision response), read references/controller-recipes.md.
  • godot-physics — collision layers/masks, areas, raycasts, rigid bodies.
  • godot-tilemap — building the levels this character walks on.
  • godot-animation — driving sprite/skeletal animation from movement state.
  • camera-systems — follow camera, deadzone, and look-ahead that track this character.
  • platformer / input-systems — full genre template and rebindable input.

© gamedev-skills, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in skills/godot/godot-2d-movement of gamedev-skills/awesome-gamedev-agent-skills.

  • SKILL.md
  • references/controller-recipes.md

Open the folder on GitHubat commit 0a70cfc

Compare with similar skills

Godot 2D Movement next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Godot 2D Movement compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Godot 2D Movement this skillgamedev-skills/awesome-gamedev-agent-skills1.4k—~1.5kAutomated safety check: PassApache-2.0
Godot 2D Physicsthedivergentai/GD-Agentic-Skills821—~4kAutomated safety check: PassLGPL-3.0
Godot Characterbody 2Dthedivergentai/GD-Agentic-Skills821—~3.3kAutomated safety check: PassLGPL-3.0
Godot Gdscript Patterns925236118/AlphaAgent10310 repos~5kAutomated safety check: PassMIT
2D Map and Scene Generator0x0funky/agent-sprite-forge4.4k—~2.9kAutomated safety check: PassMIT
Godot UI Integrationzimo-xiao-zheng/godot-ui-integration285—~1.5kAutomated safety check: PassMIT

Similar skills

  • Godot 2D Physics

    thedivergentai/GD-Agentic-Skills

    Expert patterns for Godot 2D physics including collision layers/masks, Area2D triggers, raycasting, and PhysicsDirectSpaceState2D queries.

    821 GitHub stars~4k tokensUpdated 1 mo ago
    Game DevelopmentAuto-check passed
  • Godot Characterbody 2D

    thedivergentai/GD-Agentic-Skills

    Expert patterns for CharacterBody2D including platformer movement (coyote time, jump buffering, variable jump height), top-down movement (8-way, tank controls), collision handling, one-way…

    821 GitHub stars~3.3k tokensUpdated 1 mo ago
    Game DevelopmentAuto-check passed
  • Godot Gdscript Patterns

    925236118/AlphaAgent

    Master Godot 4 GDScript patterns including signals, scenes, state machines, and optimization.

    103 GitHub starsUsed in 10 repos~5k tokens
    Game DevelopmentAuto-check passed
  • 2D Map and Scene Generator

    0x0funky/agent-sprite-forge

    Plans and builds 2D game maps and scenes, from tilemaps and parallax backgrounds to HD-2D plates, with collision checks, a playable HTML preview and Tiled, Godot or LDtk export.

    4.4k GitHub stars~2.9k tokensUpdated 4 days ago
    Game DevelopmentAuto-check passed
  • Godot UI Integration

    zimo-xiao-zheng/godot-ui-integration

    Build or revise Godot UI from an approved design, separated art, or a visual reference when scene structure, gameplay binding, and runtime visual verification all matter.

    285 GitHub stars~1.5k tokensUpdated 1 mo ago
    Game DevelopmentAuto-check passed
  • Godot Wechat Minigame Adapter

    godothub/godot-minigame

    Apply the bundled self-contained Godot WeChat Mini Game adapter kit to an official Godot checkout.

    187 GitHub stars~1.5k tokensUpdated 25 days ago
    Game DevelopmentAuto-check passed

More from gamedev-skills/awesome-gamedev-agent-skills

All 53 skills in this repo
  • Create Game Assets

    gamedev-skills/awesome-gamedev-agent-skills

    Plan, generate, source, normalize, and validate cohesive visual game assets.

    1.4k GitHub stars~2k tokensUpdated 2 days ago
    Auto-check passed
  • Roblox UI

    gamedev-skills/awesome-gamedev-agent-skills

    Build production Roblox interfaces with ScreenGui/PlayerGui lifecycle, responsive UDim2 layouts, safe insets, reusable editable Instances, cross-device input and selection, restrained motion…

    1.4k GitHub stars~2.9k tokensUpdated 2 days ago
    Auto-check passed
  • AI Behavior Trees Utility AI

    gamedev-skills/awesome-gamedev-agent-skills

    Build a production behavior-tree runtime (Blackboard, action/condition leaves, sequence/selector/parallel composites, decorators) and a Utility AI system (response curves — linear, exponential…

    1.4k GitHub stars~2k tokensUpdated 2 days ago
    Auto-check passed
  • Bevy Ecs

    gamedev-skills/awesome-gamedev-agent-skills

    Structure a Bevy app around its Entity Component System: build the App with plugins, define Component/Resource types, write systems with Query/Res/Commands, filter and order systems, and use the…

    1.4k GitHub stars~2.5k tokensUpdated 2 days ago
    Auto-check passed
  • Card Game

    gamedev-skills/awesome-gamedev-agent-skills

    Build a card game: card data, deck/hand/discard zones, draw/shuffle/reshuffle, a turn structure, costs, and effect resolution.

    1.4k GitHub stars~1.6k tokensUpdated 2 days ago
    Auto-check passed
  • Fps Shooter

    gamedev-skills/awesome-gamedev-agent-skills

    Build a first-person shooter: move+mouse-look controller, hitscan or projectile shooting, weapons, health, and enemy AI.

    1.4k GitHub stars~1.5k tokensUpdated 2 days ago
    Auto-check passed

Works with

Questions about Godot 2D Movement

What does Godot 2D Movement do?

Implement 2D kinematic character movement in Godot 4.7 with CharacterBody2D and moveandslide(): platformer run/jump with gravity, top-down 8-direction motion, slope handling, and reading collisions. Godot 2D Movement is an agent skill from gamedev-skills/awesome-gamedev-agent-skills.7 with CharacterBody2D and moveandslide(): platformer run/jump with gravity, top-down 8-direction motion, slope handling, and reading collisions.

When should I use Godot 2D Movement?

Godot 2D Movement fits situations like: coding a 2D player; enemy controller; top-down character; fixing moveandslide()/ isonfloor() behavior in a .tscn with a CharacterBody2D.

How do I install Godot 2D Movement in Claude Code?

Run `npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill godot-2d-movement -a claude-code`. Or copy the skill folder (skills/godot/godot-2d-movement in gamedev-skills/awesome-gamedev-agent-skills) into .claude/skills/godot-2d-movement in your project. Claude Code loads it when a task matches its description.

How do I install Godot 2D Movement in Codex?

Run `npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill godot-2d-movement -a codex`. Or copy the skill folder (skills/godot/godot-2d-movement in gamedev-skills/awesome-gamedev-agent-skills) into .agents/skills/godot-2d-movement in your project. Codex loads it when a task matches its description.

Can I use Godot 2D Movement in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill godot-2d-movement -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/godot-2d-movement, .gemini/skills/godot-2d-movement, .github/skills/godot-2d-movement and .opencode/skills/godot-2d-movement in your project.

What does Godot 2D Movement need to run?

SKILL.md names no scripts, command-line tools or credentials: Godot 2D Movement is instructions for the agent only.

Does Godot 2D Movement access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Godot 2D Movement safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Godot 2D Movement use?

Godot 2D Movement is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Godot 2D Movement use?

About 1.5k tokens (SKILL.md is roughly 6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 811 tokens, read only when the agent opens those files.

What are the alternatives to Godot 2D Movement?

Skills that share tags, products or a category with Godot 2D Movement: Godot 2D Physics (thedivergentai/GD-Agentic-Skills, 821 stars), Godot Characterbody 2D (thedivergentai/GD-Agentic-Skills, 821 stars), Godot Gdscript Patterns (925236118/AlphaAgent, 103 stars) and 2D Map and Scene Generator (0x0funky/agent-sprite-forge, 4.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Godot 2D Movement?

gamedev-skills (a GitHub organization) maintains it in gamedev-skills/awesome-gamedev-agent-skills, which has 1,389 GitHub stars. The repository holds 53 skills in this directory. The repository was last updated on October 9, 2026.

Source: gamedev-skills/awesome-gamedev-agent-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.