跳过主要内容
GDT
Skill免费GameSkill 出品 · 调优版

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 出品
下载 ZIP

所属合集

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 加的所有文件。

Godot 2D Movement

自检清单

  • 角色用 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 测过的版本

测过的版本装到 .claude/skills/
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

常见问题

同赛道 PRO 商业源码$8.25/mo

肉鸽构筑白标起步工程(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。

Awesome Gamedev Agent Skills 中的更多 Skills

查看全部 42 个

相似 skills