Godot
GDScript / C#GDScript / C# · 通用 2D/3D
一句话:如果 AI 帮你写游戏时你只能选一个引擎,选 Godot。
In one line: if you can only pick one engine when AI is writing your game, pick Godot.
为什么对 AI 友好
⚠ 下面是我们对「AI 写起来出错的概率」的判断,不是实测。
| 原因 | 说明 |
|---|---|
| GDScript 接近 Python | 缩进语法、动态类型、var/if/for 都与 Python 同源。AI 生成 Python 风格的代码,改成 GDScript 的错率最低 |
| 错误信息友好 | 脚本报错会指出行号与变量名,AI 能据此定位 |
| 官方文档完整 | 类参考有明确的参数与返回值,AI 引用的 API 大多真实存在 |
| 静态类型可选 | GDScript 支持类型标注,AI 可以写出更安全的代码 |
| ⚠ 不用 C# | 选 C# 就要 .NET 环境,AI 常写出版本不匹配的 API |
Why it is AI-friendly
⚠ What follows is our judgement of how likely AI is to get it wrong, not a measurement.
| Reason | Explanation |
|---|---|
| GDScript is close to Python | Indentation-based, dynamically typed, with var/if/for all coming from Python. AI-generated Python translates into GDScript with the fewest mistakes |
| Friendly error messages | Script errors point at a line and a variable name, which is enough for AI to locate the problem |
| Complete official docs | The class reference documents parameters and return types; most APIs AI cites actually exist |
| Optional static typing | GDScript supports type annotations, so AI can produce safer code |
| ⚠ Do not use C# | Choosing C# pulls in a .NET environment, and AI frequently writes APIs from the wrong version |
它的代价
- Web 导出不算完整 —— 存档、性能、加载在大项目上会出问题
- C# 支持仍在推进 —— ⚠ 官方文档自己列了一长串「已知问题」,别当稳定特性用
- 生态比 Unity 小 —— 找现成插件的余地少
What it costs
- The web export is not complete — saves, performance and loading fall apart on larger projects
- C# support is still being worked on — ⚠ the official docs list a long set of known issues; do not treat it as stable
- A smaller ecosystem than Unity — fewer ready-made plugins
⚠ 但对 AI 友好的另一面
Godot 的场景树(scene)系统对 AI 是不友好的:
- 场景是
.tscn文本格式,但它是编辑器生成的,不该手写 - AI 写
.tscn文件经常格式错误
⚠ 正确做法:让 AI 写 GDScript 代码,场景在编辑器里搭。
这与 S2「给明确的边界」是同一条原则。
⚠ The other side of being AI-friendly
**Godot's scene tree is *not* AI-friendly**:
- Scenes are
.tscntext files — but they are generated by the editor and should not be hand-written - AI-written
.tscnfiles are frequently malformed
⚠ The right split: let AI write GDScript, and build the scene in the editor.
That is the same rule as S2's "give explicit boundaries".
什么时候不该选
- 你要做大型商业项目(生态与人才储备都不够)
- 你要完全体的 Web 游戏(导出受限)
- 你不写代码(那该用更简单的方案)
When not to pick it
- You are building a large commercial project (the ecosystem and talent pool are both thin)
- You need a full-fat web game (the export is limited)
- You do not write code (there are simpler options)
可核验事实
| 项 | 值 | 核验源 |
|---|---|---|
| 仓库 | godotengine/godot | GitHub API |
| 许可 | MIT | 同上 |
| 主语言 | C++ | 同上 |
| ★ | 118,127 | 同上 |
| 最后提交 | 2026-10-04 | 同上(活跃) |
| 脚本语言 | GDScript / C# | 官方文档 |
| 核验日 | 2026-10-05 | — |
Verifiable facts
| Item | Value | Source |
|---|---|---|
| Repository | godotengine/godot | GitHub API |
| Licence | MIT | same |
| Main language | C++ | same |
| Stars | 118,127 | same |
| Last push | 2026-10-04 | same (active) |
| Scripting | GDScript / C# | official docs |
| Verified on | 2026-10-05 | — |
术语
⚠ 「GDScript」「.tscn」「导出」这些词在 [Vibe Gaming 词条](../vibe-gaming.html) 里有解释。
Vocabulary
⚠ "GDScript", ".tscn" and "export" are explained in the [Vibe Gaming entry](../vibe-gaming.html).