← Back to blog

Build a 2D Platformer with Godot MCP: Movement, Levels, and Enemies

Ship a Godot 4 platformer prototype via MCP: CharacterBody2D feel, TileMap levels, simple enemies; bring in VberAI AI Studio when you need real HUD/title UI.

Published
  • Godot MCP
  • 2D platformer
  • Godot 4
  • GDScript
  • AI game development

A demoable 2D platformer usually needs: tunable move/jump feel, a collidable level, at least one enemy behavior, and a title/HUD wired to game events. Work in that order. Default setup: Cursor (or Claude Code) driving a Godot 4 project through Godot MCP.

Install: Godot MCP install guide.

Define a minimum playable scope

First milestone:

  1. Move, land, variable-height jump (optional double jump / dash)
  2. One level with floor, platforms, spikes or pit fail
  3. One patrolling enemy that damages or knocks back
  4. Simple HUD: health or Restart

Art can be colored placeholders. When menus/HUD must look designed, use the canvas step below.

Player: CharacterBody2D with tunable feel

Suggested skeleton:

Player (CharacterBody2D)
├── CollisionShape2D
├── AnimatedSprite2D / Sprite2D
└── Coyote / jump-buffer as script timers (keep the tree lean)

Prompt MCP with physics and input constraints:

Create res://scripts/player.gd on a CharacterBody2D: A/D or arrows to move; variable jump height (cut jump on release); short coyote time; after move_and_slide(), reset jump count with is_on_floor().

Then tune:

Max speed ~180, accel ~900, jump velocity ~-320 (scale to your pixels); play dust on the frame you become grounded.

Review for: stable ground checks, air control, double-jump not firing while still grounded. Feel matters more than “script generated.”

Levels: TileMap collision and checkpoints

Keep level logic in-engine:

  • Separate solid vs hazard layers
  • Moving platforms via AnimatableBody2D or path follow
  • Checkpoints / pit Area2D for respawn

Build one level from the existing tileset: teach jump → moving platforms → spike corridor; secret heal room behind the waterfall. Spikes: Area2D body_entered damages.

Swap placeholder tiles for authored art later.

Enemies: a small state machine

Three states are enough: Idle → Patrol → Chase.

Enemy GDScript: patrol two points; chase within 120px; return to patrol 1.5s after losing the player; body_entered damages with brief i-frames.

Add AnimationPlayer when you have frames; otherwise flip the sprite for facing.

UI: introduce AI Studio when you need finished screens

Until gameplay works, placeholder Label / ProgressBar via MCP:

Bind player health_changed to the HUD bar; on death show Restart and reload_current_scene().

When title/settings/inventory need design-grade UI (PSD/Figma, NL-generated panels, layer split, Godot-ready export), use VberAI AI Studio:

  1. Generate or import menus/HUD in Studio
  2. Export to e.g. res://ui/
  3. Wire buttons/signals with Cursor + Godot MCP

Hard cutouts → Super Matting, then Studio. Canvas owns UI structure; MCP owns gameplay bindings—don’t expect a full player.gd from the canvas.

Suggested order

MCP: player feel → one collidable level → one enemy → placeholder HUD
        ↓ (optional)
AI Studio: finished title/HUD → export

MCP: bind finished UI to health / pause / restart

Commit before large edits; keep MCP on localhost.

Acceptance checklist

  • Short vs long jump feel distinct
  • Pit/spikes give clear fail feedback
  • Enemy patrol doesn’t clip through walls
  • HUD or Restart works after death
  • (Optional) Studio UI replaced placeholders

Next steps

  1. Godot MCP install
  2. Ship “move + one level + one enemy”
  3. Open AI Studio only when you need finished UI

Also: Godot MCP vs manual scripting.

More guides you might like