Godot Signals & Groups
/godot-signals-groups
Decoupled Godot 4.7 gameplay with signals and groups: custom signals, Callable connections and broadcasts with call_group.
- 许可证
- 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 上通过 31/31 项检查(2026-10-30):能触发、有可运行示例、有截图和自检清单、单一职责、中英文文档齐全。触发检查是把提示词和 skill 描述做匹配,不是真实 agent 运行。
测试报告这个 skill 做什么
什么时候触发
7 gameplay with signals and node groups: declare and emit custom signals, connect with Callables (incl. bind/one-shot), and broadcast to many nodes via groups and call_group.x connect("sig", self, "method") code. …
GameSkill 测过的版本
GameSkill 调优版:skill 文件取自提交 19d93f97c9c1,按我们的 skill 流程加上可运行示例、测试报告、自检清单和中文指南。
协议:基于 gamedev-skills/awesome-gamedev-agent-skills(作者 gamedev-skills),协议 Apache-2.0。ZIP 保留协议文件(LICENSE, NOTICE),CHANGES.md 列出了 GameSkill 加的所有文件。

自检清单
- 子节点向上 emit,父节点 connect,子节点不认识监听者 / Child emits upward, parent connects; the child does not know its listeners
- 连接前用 is_connected 检查,避免重复连接 / Guard with is_connected before connecting to avoid duplicates
- 一次性事件用 CONNECT_ONE_SHOT,额外上下文用 bind / Use CONNECT_ONE_SHOT for fire-once and bind for extra context
- 组名是全局的,重名会共享成员,必要时加前缀 / Group names are global to the SceneTree; namespace them if needed
- call_group 会静默忽略没有该方法的节点,契约重要时用信号 / call_group silently skips nodes without the method; use a signal when the contract matters
中文指南
这个 skill 做什么
这个 skill 讲 Godot 4.7 里用信号和节点组做事件驱动的解耦:声明和发出自定义信号,用 Callable 连接(含 bind 和 one-shot),用组和 call_group 一次通知多个节点。也讲把 3.x 的 connect("sig", self, "method") 写法改成 4.x。
什么时候用
- 一个节点要告诉别的节点“发生了某事”,但不想持有对方的引用
- 要一次对所有同类节点做事,比如暂停所有敌人、保存所有检查点
- 把 3.x 的 connect("sig", self, "method") 改成 4.x 的 Callable 写法
怎么装
下载本页的 ZIP,把 godot-signals-groups/ 整个文件夹放进 agent 的 skills 文件夹:Claude Code 用 .claude/skills/,Codex、Gemini CLI、OpenCode 用 .agents/skills/,Cursor 用 .cursor/skills/,Copilot 用 .github/skills/,Windsurf 用 .windsurf/skills/,然后重启 agent。也可以直接对 agent 说:Install the skill from https://gameskill.dev/skills/godot-signals-groups/install.md
最小示例
gameskill/examples/ 里是一个小场景:enemy.gd 和 pickup.gd 发出信号,main.gd 连接并处理,events.gd 是信号总线,main.tscn 是场景。tests/run_tests.gd 是检查,tests/screenshot.gd 渲染截图。
我们怎么测的
总分 31/31。在 Godot 4.7.2 无头模式下跑 19 项检查:带类型的信号能发出值;connect 后 is_connected 为真;重复连接不会叠加;disconnect 后不再触发;one-shot 只触发一次并自动断开;bind 把额外参数追加在后面;deferred 连接不会同步执行,而是在下一帧执行;组的加入和移除;call_group 能设置属性,方法不存在时静默跳过;发出者被释放后连接被清理;监听者被释放后 emit 不报错;信号总线能送达;参数不匹配的处理器被干净地断开;get_first_node_in_group 和 set_group 可用。初稿在 SceneTree 脚本里调用 get_tree(),无法解析,已改为直接用 SceneTree。结果在 gameskill/test-report.json。
和站内其他 skill 的区别
GodotPrompter 套件里自带事件总线,这个 skill 是单独讲信号、连接标志和组的。它不覆盖场景结构和实例化,也不讲信号语法基础,那些交给别的 skill。
搭配
godot-nodes-scenes:场景结构和实例化,以及用 autoload 做全局事件总线godot-gdscript:信号和 await 的语法基础godot-prompter:GodotPrompter 套件里的事件总线做法
安装
告诉你的 AI
Install the skill from https://gameskill.dev/skills/godot-signals-groups/install.md
GameSkill 测过的版本
mkdir -p .claude/skills
curl -fsSL https://gameskill.dev/dl/skills/godot-signals-groups.zip -o /tmp/gameskill-godot-signals-groups.zip
unzip -oq /tmp/gameskill-godot-signals-groups.zip -d .claude/skills
rm /tmp/gameskill-godot-signals-groups.zip包含内容
- Worked steps: Emit upward, connect from the parent; Connect flags: one-shot and bind extra arguments; Groups: broadcast to many nodes; Await a signal inline
- A pitfalls section with the mistakes to avoid
- Bundled 1 reference doc the agent reads when needed
- Written for Godot 4.7
适合
- Wiring node communication in a Godot project, replacing tight references with signals, emitting/connecting events
- Porting 3.x connect("sig", self, "method") code
试试这条提示词
Replace direct node references with signals and broadcast game over to a group.关于这个 Skill
Build event-driven, decoupled Godot 4.7 gameplay with signals and node groups: declare and emit custom signals, connect with Callables (incl. bind/one-shot), and broadcast to many nodes via groups and call_group. Use when wiring node communication in a Godot project, replacing tight references with signals, emitting/connecting events, or porting 3.x connect("sig", self, "method") code.
From the godot-signals-groups SKILL.md in gamedev-skills/awesome-gamedev-agent-skills.
What's inside
- Emit upward, connect from the parent
- Connect flags: one-shot and bind extra arguments
- Groups: broadcast to many nodes
- Await a signal inline
环境要求
- 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。
GDScript for Godot 4
Write idiomatic GDScript for Godot 4.7: static typing, the node lifecycle (_ready/_process/_physics_process), @export/@onready/@tool annotations, signals, and await for asynchronous flow.
Godot Nodes & Scenes
Structure Godot 4.7 projects: reusable scenes, runtime instancing, safe node access and autoload singletons.
Game AI: FSM, Behavior Trees & Pathfinding
NPC and enemy decision-making with state machines, behavior trees, steering and A* pathfinding, paired with your engine's navigation API.
Awesome Gamedev Agent Skills 中的更多 Skills
查看全部 45 个2D Platformer
Build a 2D platformer: run/jump control with coyote time, jump buffering, and variable jump height, plus tiled levels and hazards.
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.
相似 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.