Hobby project: game remake
Prologue
经过百般思虑,我决定将我的闲暇之余所制作的游戏的项目“砍掉重练”。有诸多原因。主要原因就是现有的代码过于不理想,让我很难继续。
第二,现在有 AI (LLM),我能够更容易学习到制作游戏的基本技巧和知识,减少试错和错误的决定。
第三,如果玩游戏可以重来,哪为何制作游戏又不可重来?
Story
Finally, I decided to restart my hobby game development project. Previously I built it based on full-stack engineering knowledge. But that’s not right. It makes everything super complicated. Luckily, we have AI today, which I can learn game development more efficiently.
I choose Godot Mono (C#), as it is free and open source. Unity though is more popular, the license is complicated. Godot has its own language, GDScript, which is similar to Python, yet I don’t like Python syntax. C# is more universal comparing to GDScript.
What I went wrong? I built the game (incomplete) with the mindset that the game logic is like backend engine, everything can be done with pure C# without Godot; and Godot is like frontend engine that manage the nodes, like HTML document tree. This design, which I am looking back now, is damn silly. It makes everything difficult to develop. Especially I used the state machine design for the scene. It is not wrong to use state machine in game, but how I wrote it makes everything difficult to manage.
With the AI today, especially AI acts like interactive encyclopedia, I can learn to solve the problem with very specific requirements. This helps me learn game development with Godot efficiently. For instance, since I am using Godot for the game, I should design the game based on Godot, not the other way round as using Godot to fit my requirements. Everything should be done in Node; utilize .tres to store data; create Tool to generate .tres; write various singletons as globals to manage the logic. These are what I have learnt so far from AI. This makes the code simpler and makes more sense.
(Photo by Castorly Stock from Pexels)