I have seen multiple game developers posting about their experience with AI tools lately. However I missed a few important steps in these posts, that I find extremely useful.
I started "vibe coding" more than two years ago when stuff like copilot or codium were not able to generate even a whole class if it was bigger than 150 lines of code and was leaving comments like "// here is the rest of implementation unchanged".
And now when modern tools can generate a whole feature in one go and sometimes even without bugs (rarely).
Here is what two years of vibe coding taught me.
I don’t start with code. I start with design.
Every new feature, system, or refactor begins with requirements and PlantUML diagrams, often generated with AI and then refined by me. I visualize how everything fits together.
No AI touches my codebase unless there’s a diagram first.
If I can’t explain it in a diagram, it’s not ready to be implemented by AI. When I code manually, I have full control and can easily start without design and iterate on the fly. AI can’t do that. Without clear technical constraints in the form of diagrams, it quickly creates unmaintainable chaos.
Why PlantUML?
Because it’s code.
Text-based, versioned, reusable, tweakable. I can store diagrams next to the codebase, review them in PRs, and evolve them as systems change.
Visual consistency matters.
PlantUML diagrams look the same whether you’re a UML expert or a beginner. That removes noise and keeps everyone focused on the system, not the drawing style.
Hand-drawn diagrams?
Beautiful, but useless after a week. Hard to maintain, impossible to diff, and AI can’t update them.
With PlantUML, I can iterate fast. Combined with LLMs, it’s even faster:
“Generate a sequence diagram for this flow.” Done. Then I validate responsibilities, avoid circular dependencies, and refine the design before coding. What is more these diagrams are used in the future as prompts to add new functionality to existing features.
Implementation comes last. By then, I know exactly what to build and can verify the implementation against the design.
Does this guarantee bug-free code? No.
In almost every case there are bugs in a low level. And AI struggles with bug fixing and can get stuck in loops. It's especially true for multiplayer games where AI has a hard time figuring out which calls must be networked and which not.
I still debug a lot of low-level details manually. But the number of bugs drops significantly with proper preparation, and overall, it’s a faster, more controlled workflow.
And when sometimes a feature is generated in one go and comes out bug-free, it feels incredibly satisfying.
How do you keep AI-generated code maintainable?
Below is the real generated class diagram from my pet project. While it can be improved for clarity by reorganizing entities and arrows, that was never the goal, it serves well for verification and as a prompt.
Post #2523
765
- 🔥 13
- 👍 2