Godot 2D Movement
/godot-2d-movement
2D character movement in Godot 4.7 with CharacterBody2D: platformer jumping, top-down motion, slopes and reading collisions.
- 许可证
- Apache-2.0
- 出品
- GameSkill 出品
所属合集
Awesome Gamedev Agent Skills
77 portable SKILL.md skills across 12 engines (Godot, Unity, Unreal, Phaser, PixiJS, three.js, Bevy, pygame, LÖVE, Roblox, Defold, Ebitengine), with a router.
我们测过
在 Godot 4.7.2 上通过 25/25 项检查(2026-10-28):能触发、有可运行示例、有截图和自检清单、单一职责、中英文文档齐全。触发检查是把提示词和 skill 描述做匹配,不是真实 agent 运行。
测试报告这个 skill 做什么
什么时候触发
7 with CharacterBody2D and move_and_slide(): platformer run/jump with gravity, top-down 8-direction motion, slope handling, and reading collisions.tscn with a CharacterBody2D. …
GameSkill 测过的版本
GameSkill 调优版:skill 文件取自提交 184b72be0288,按我们的 skill 流程加上可运行示例、测试报告、自检清单和中文指南。
协议:基于 gamedev-skills/awesome-gamedev-agent-skills(作者 gamedev-skills),协议 Apache-2.0。ZIP 保留协议文件(LICENSE, NOTICE),CHANGES.md 列出了 GameSkill 加的所有文件。

自检清单
- 角色用 CharacterBody2D,并带 CollisionShape2D / Uses CharacterBody2D with a CollisionShape2D
- 先设 velocity 再调用无参数的 move_and_slide(),没有乘 delta / Sets velocity, then calls move_and_slide() with no arguments and no extra delta
- 移动代码写在 _physics_process 里 / Movement runs in _physics_process
- 落地后 is_on_floor() 为 true,只有落地或土狼时间内才能跳 / is_on_floor() is true after landing; jumps only when grounded or within coyote time
- 俯视角用 MOTION_MODE_FLOATING,斜向速度不超过设定速度 / Top-down uses MOTION_MODE_FLOATING and diagonal speed stays at the set speed
中文指南
这个 skill 做什么
让 AI 用 Godot 4.7 的 CharacterBody2D 写 2D 角色移动:平台跳跃(重力、跳跃、斜坡)、俯视角八方向移动、读取碰撞结果,以及土狼时间(刚离开平台边缘的一小段时间内仍可起跳)。
什么时候用
- 写 2D 玩家或敌人的移动控制器
move_and_slide()没反应、角色穿过地面、is_on_floor()一直是 false- 从 Godot 3 迁移,旧的
move_and_slide(velocity)写法报错
怎么装
下载本页的 ZIP,把 godot-2d-movement/ 整个文件夹放进 .claude/skills/(Claude Code)或 .agents/skills/(Codex、Cursor),重启 agent。
最小示例
ZIP 里的 gameskill/examples/ 是一个 Godot 4.7 工程:方向键移动,空格跳,左边是平台角色,右边是俯视角角色。用 Godot 4.7 打开 project.godot 直接运行。
我们怎么测的
在 Godot 4.7.2 无头模式下跑 13 项检查:落地、按速度奔跑且没有被 delta 拖慢、松手减速停下、起跳、空中不能二段跳、土狼跳、俯视角斜向速度归一化等;再用 OpenGL 渲染一张截图。命令和结果都在 gameskill/test-report.json。
搭配
input-systems:可重新绑定的按键和输入缓冲physics-tuning:手感参数、固定步长game-feel和 GameSkill 的 hit-juice:落地和受击反馈
安装
告诉你的 AI
Install the skill from https://gameskill.dev/skills/godot-2d-movement/install.md
GameSkill 测过的版本
mkdir -p .claude/skills
curl -fsSL https://gameskill.dev/dl/skills/godot-2d-movement.zip -o /tmp/gameskill-godot-2d-movement.zip
unzip -oq /tmp/gameskill-godot-2d-movement.zip -d .claude/skills
rm /tmp/gameskill-godot-2d-movement.zip包含内容
- Worked steps: Platformer controller; Top-down 8-direction movement; Reading slide collisions after moving; Coyote time
- A pitfalls section with the mistakes to avoid
- Bundled 1 reference doc the agent reads when needed
- Written for Godot 4.7
适合
- Coding a 2D player or enemy controller, a platformer or top-down character
- Fixing move_and_slide()/ is_on_floor() behavior in a .tscn with a CharacterBody2D
试试这条提示词
Write a CharacterBody2D platformer controller that handles slopes and coyote time.关于这个 Skill
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.
From the godot-2d-movement SKILL.md in gamedev-skills/awesome-gamedev-agent-skills.
What's inside
- Platformer controller (gravity, jump, slopes)
- Top-down 8-direction movement
- Reading slide collisions after moving
- Coyote time (forgiving jump just after leaving a ledge)
环境要求
- Godot 4.7
常见问题
肉鸽构筑白标起步工程(Godot 4 + Web + 平衡表)
告别空工程从零搭架子!开箱即玩的白标肉鸽构筑商业起步模板(Godot 4 完整工程 + Web 可玩版):含开局三槽赐福、无交叉 DAG 地图、扇形出牌、Boss 半血锁血、篝火/商店删牌、32 位校验防坏档 SaveStore、中英切换、30 牌/18 遗物/15 怪平衡表与 1,000 局 HTML 压测工具。
- 完整 Godot 4.3+ 工程(打开即 F5 运行,内置防坏档原子 SaveStore + 中英实时切换 LocService)
- 零构建 Web HTML5 可玩起步版(扇形手牌、2 帧受击闪白、震屏与 Boss 半血锁血全跑通)
基于 gamedev-skills/awesome-gamedev-agent-skills (作者 gamedev-skills,协议 Apache-2.0)。ZIP 里保留原作者的 LICENSE 和 NOTICE,ATTRIBUTION.md 和 CHANGES.md 写明来源提交和 GameSkill 加的内容。
搭配使用
作者标注的相关 Skills,或更适合相邻任务的 Skills。
Godot Physics
Use Godot 4.7 physics bodies and detection in 2D and 3D: RigidBody, StaticBody, Area, and CharacterBody; collision layers vs masks; contact/overlap signals; and raycasts (RayCast nodes and direct space-state queries).
Godot TileMap
Tile-based 2D levels in Godot 4.7 with TileMapLayer: collision and navigation on tiles, terrain autotiling and editing cells from code.
Godot Animation
Animate in Godot 4.7 with AnimationPlayer clips, AnimationTree state machines and blend spaces, and code-driven Tweens.
Game Camera Systems
Cameras that feel good: 2D follow with deadzone and look-ahead, 3D orbit with collision, first-person look, multi-target framing and shake.
Awesome Gamedev Agent Skills 中的更多 Skills
查看全部 42 个Behavior Trees & Utility AI
Build a behavior-tree runtime and a Utility AI system with response curves, plus hybrid agents where the behavior tree drives utility scoring.
Bevy ECS
Structure a Bevy app around ECS: plugins, components and resources, systems with Query and Commands, system ordering and Time.
Card Game
Build a card game: card data, deck/hand/discard zones, draw/shuffle/reshuffle, a turn structure, costs, and effect resolution.
Create Game Assets
Plan, generate, source, normalize, and validate cohesive visual game assets.
相似 skills
Claude Code Game Studios
Turns Claude Code into a full game studio: 49 agents and 72 workflow skills arranged like a real studio hierarchy.
Godogen
Autonomous game development with Claude Code and Codex. Publishes a ready game repo for Godot, Bevy, Babylon.js or three.js.
pixelfx
244 pixel-art effects written as code (fire, explosions, magic, weather, UI, pickups, critters) plus a draft, render, look, refine loop for making new ones; every effect exports a sprite sheet with Aseprite-style JSON for Godot, Unity, Phaser or any engine.
Godot AI
Production-grade MCP server and editor plugin for Godot 4.7+: 46 tools and 120+ operations for scenes, nodes, scripts, UI and more.