我是一名有经验的 Unity 游戏程序员,但这个项目我几乎没有手动写代码。
我大约在 6 月 18 日开始构建一个类似 PUBG 的游戏模式,并于九月初上线——大约两个月半后。在那段时间里,我完成了 500 多次提交。
这可不是小型游戏创作马拉松的原型。该项目包括:
- 第三人称移动与射击
- 跳伞与着陆
- 多武器、换弹、瞄准、近战攻击和手雷
- 物品栏、装备、战利品和自动拾取
- 治疗、护甲、击倒、复活与死亡
- 队伍与队友标记
- AI 控制的玩家
- 一个日益缩小的安全区
- 小地图和全屏地图
- 移动操作与战斗界面
- 多人游戏状态同步
- 真实服务器与假服务器后端
- 运行时调试与性能工具
- 针对远程玩家、战利品和大型环境的优化
几乎所有的实现都是由人工智能生成的。我负责决定建造什么、定义架构、审查重要边界、测试结果并修正方向。
我并不完全理解代码的每一行
如果让我把自己归类到以下几类之一:
- 我理解每一个功能和系列。
- 我了解整体结构和职责。
- 我完全不知道代码具体做什么。
我完全属于 2 类。
我知道玩家状态存储在哪里。我知道角色状态机的工作原理,武器和技能的组织方式,UI 如何与游戏数据分离,消息如何在客户端和服务器之间流通,以及哪个系统负责各项责任。
但我记不清每个功能或每一句话。
我认为对于如此规模的项目来说,这并不是一个有价值的目标。即使程序员手动编写所有内容,他们通常也不会把整个实现都记在脑子里。重要的是要足够了解架构、合同、所有权和不变量,以便在必要时定位并调查问题。
我与人工智能的关系类似于领导开发团队。我定义了结构和要求,审查了重要决策,并核实了结果。区别在于,AI 通常比人类开发者更能一致地遵循约定的计划。
生成第一个版本是最简单的部分
人们常常用 AI 编程快速生成原型来评判它。我觉得这并不能证明太多。
真正的考验开始于:
- 需求变化
- 旧系统必须重构
- 修复会破坏另一个功能
- 网络消息的到达顺序出乎意料
- 资源异步加载
- 假服务器的行为与真实服务器不同
- 移动端输入会暴露编辑器中从未出现的问题
- 游戏必须被打包、集成并发布
项目经历了所有这些阶段。
例如,我用多个负责身份、库存、装备和战斗的管理者取代了一个大型玩家数据结构。我把真服务器和假服务器分开在一个通用的后端接口后面。我把战斗界面重新整理成独立的模块。我还为远程玩家和战利品引入了代表性等级,让客户端可以选择无代表、代理、简化版本或完整对象。
那不是一次性的几代。这些都是对现有互联系统的变化,同时项目还在继续推进。
这就是为什么我认为这个项目是人工智能编码的有意义证据。它不仅生成了演示。它经历了数百次后续的改动。
小修改和快速验证比大提示更有效
我最可靠的工作流程是:
- 讨论 AI 的问题。
- 让它检查现有代码。
- 在原因、架构和风险上达成一致。
- 做一个小改动。
- 运行游戏,观察实际行为。
- 记录有用的运行时信息。
- 根据证据进行修正或重构。
当 AI 反复误解系统时,我停止无限期地试图改进提示。相反,我改变了架构,使责任更加明确。
如果两个系统都能修改同一个状态,我就引入了单一所有者。如果调试依赖于读取大量日志,我就添加了结构化的运行时记录。如果真实服务器阻碍了开发,我就搭建了一个假服务器路径。如果对象创建导致帧尖峰,我会将逻辑存在与视觉表现分离,之后创建模型。
换言之,我不仅仅是要求人工智能解决问题。我试图重塑项目,让人类和人工智能都更少误解它。
可观察性比阅读所有内容更重要
因为我没有手动写每一行,运行时的可见性变得极其重要。
对于复杂的同步问题,我记录了如下事实:
- Event name
- Time and frame
- Player identifiers
- Network route
- Current weapon and ammunition
- Whether server data had arrived
- Whether the character body existed
- Current initialization phase
这往往比阅读许多文件并猜测更有用。
我可以问:“为什么玩家在服务器上有正确的弹药,但 HUD 仍然显示为零?” 然后 AI 可以追踪记录的序列,而不是从静态代码中编造解释。
对于 AI 辅助开发,良好的诊断不是可选的。它们是架构的一部分。
The Result Was Stable, but That Doesn’t Mean Perfect
The game went live and received no bug reports during its first three days.
That does not prove there were zero bugs. Player count, playtime and reporting behavior all matter. But it does show that an AI-written complex game module can reach a commercially acceptable level of stability instead of collapsing immediately after release.
The project also had weaknesses.
One colleague thought the shooting feel was terrible. That criticism may be fair.
AI helped me implement systems very quickly, but good game feel still requires taste, repeated playtesting, strong animation and audio, careful tuning and clear references. Finishing a technically complex game mode is not the same as making every part feel excellent.
That was an important lesson: AI greatly reduced the cost of implementation, but it did not remove the need for game design.
What I Think the Human Is Responsible For
In this workflow, the human still needs to decide:
- What is worth building
- What should own each responsibility
- Which trade‑offs are acceptable
- Whether the current behavior actually feels right
- When to patch and when to refactor
- What evidence is required before calling something fixed
- When a feature is complete enough to ship
AI can produce code much faster than I can type it. But speed also creates a new problem: it can generate features faster than I can think through their design.
The bottleneck moved from coding to judgment.
My Conclusion
This project convinced me that a complex commercial game module can be implemented almost entirely by AI and still survive changing requirements, debugging, integration and release.
But “AI wrote the code” does not mean “the AI made the game by itself.”
My role moved upward. Instead of personally implementing every function, I worked on intent, architecture, constraints, verification and product decisions.
The most valuable skill was no longer typing code. It was making the problem clear enough, the architecture stable enough and the feedback loop strong enough that AI could keep contributing without destroying the project.
Generating code is easy.
Keeping an AI-written project understandable, changeable and shippable after the 500th commit is the real challenge.
评论 (0)