Skip to content
SkillModel-led1,827 tokens in use

godot-2d-movement

Writes Godot 4.7 CharacterBody2D movement in GDScript for platformers and top-down games, then proves it lands, jumps and runs with a headless test.

9,684 stars on the repository Apache License 2.0gamedev-skills/awesome-gamedev-agent-skills · skills/godot/godot-2d-movement
npx skills add gamedev-skills/awesome-gamedev-agent-skills
View source

Install command as written in the repository's README

Skill label

measured from its files

What installing godot-2d-movement costs

113tokens idle
1,827tokens in use
2,640tokens, up to

Idle is what sits in context while the skill is installed. In use is its instructions, loaded when it runs. Up to adds the files its instructions link. Counts are approximate, made offline with cl100k_base.

Model dependence Model-led

Script-ledMixedModel-led

Mostly instructions, so how well it works depends on the model that follows them.

This describes the skill's structure, how much of it is scripts. It does not say how well it works.

Touches

shelldetected

Declared tags come from the skill's frontmatter; detected ones from its scripts, its code blocks and the commands it names in inline code. This is detected, not audited.

How it scores

Quality

How well the skill is written, counted from its own files: its frontmatter, its steps, examples, stated output and constraints, its size and whether every file it ships is one it names.How we score it →
Excellent
  • Frontmatter12/15
  • Structure25/25
  • Examples12/15
  • Output10/15
  • Size13/15
  • Resources15/15

Security

Starts at 100 and loses points for each thing in the skill's files that a reader should look at first.How we score it →
Excellent
  • File that was not read−15

    a file the skill ships that was not read, so what it does is unknown

    assets/test_character_controller.gd

Repository health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
Good
  • Development activity92
  • Maintenance96
  • Community60
  • Maturity24
  • Momentum40

This skill teaches an agent to write CharacterBody2D controllers the way Godot expects: set velocity, call move_and_slide() once per physics tick, then read floor and wall state after the call. It covers platformer run and jump, top-down 8-direction motion in floating mode, slopes, one-way platforms and collision reactions.

A bundled GDScript test runs the controller scene headless and fails with a line per broken behaviour, such as a body that never lands or drifts. The gotchas section explains why is_on_floor() stays false, why a body falls through the floor and why 3.x movement code no longer parses.

What You Get

  • A step-by-step workflow from reading the player scene to verifying behaviour
  • Typed GDScript patterns for a platformer controller, top-down movement and reacting to slide collisions
  • A headless test script that checks landing, jumping and running, or two-axis floating motion
  • A gotcha list for crawling characters, floor detection, fall-through, jitter and slope sliding

Common Use Cases

  • Building a first platformer or top-down player in Godot 4
  • Debugging a controller where is_on_floor() is always false
  • Fixing a character that falls through the floor or teleports through walls
  • Porting Godot 3 movement code to the 4.x move_and_slide() API

What Makes It Unique

Most movement snippets stop at the controller code. This skill ships a headless behaviour test and tells the agent to run it, so each behaviour gets a pass or fail result. It also names the engine-version facts that trip people up, such as the 4.7 one-way collision direction and the argument-free move_and_slide().

Under The Hood

The agent loads the SKILL.md and, when needed, a reference of controller recipes. It then runs commands in your project: it copies a GDScript test into a tests folder, edits the action names, and starts the Godot binary headless on the player scene, plus an optional Python project checker from the godot-nodes-scenes skill. It may run an asset import first on a fresh checkout. It reads scene and project files and writes the test file; it makes no network calls. The shipped GDScript test is a file type the scanner cannot read, so what it does was not analysed and is worth a look before you run it.

Join founders building with open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on SubstackJoin 750+ subscribers