In the past, I used to do this: I would copy and paste an entire C++ file into Grok3, enable Deep Think mode, and tell it what I wanted to achieve. It would then basically understand all the details of my thousands of lines of code and provide an almost perfect modification. The code would compile without errors, wouldn’t miss details, and in most cases, the logic would be quite accurate. Using this method, I was able to write a huge amount of code with very little time and effort, allowing the project to grow larger and larger!
But how should I approach this in Godot? Obviously, not all the code is in the same file, and it’s difficult to describe my code structure, scenes, and so on to the AI. Right? I’ve thought about whether I could write a simple script to merge all files into one for easier input to the AI. This is just an idea—I haven’t implemented it yet because I’m not sure how effective it would be. Has anyone here been using AI extensively to write Godot code?
Unfortunately, LLMs are known to not be good with GDScript and Godot in general. Godot develops fast enough that LLMs just can’t keep up with the changes and frequently suggest incorrect and outdated syntax that doesn’t work.
Working with Unity previously, I was using LLMs much more often and found it much more useful than when I am working now with Godot. I tend to use the Godot documentation a lot more than I was using Unity’s previously though.
From time to time, I still ask ChatGPT questions on how to solve some more complex issues, or to suggest optimizations in the code. However, these are very local and specific questions and I treat the answers more as suggestions on how to solve the problem, rather than a fully plug-and-play solution. I wouldn’t even consider trying to run a whole codebase through it.
I don’t think there is anyone using AI extensively with Godot, because it’s simply not that useful as with other game engines and languages.
AI code might look correct, and it might even work the way you expect it at first, but in almost every case, it’s flawed. Flawed in ways that will only become apparent later down the line, when you try to make modifications to it or do more than just one thing with it. I would highly recommend first learning programming overall, it might take a long while, but once you’re comfortable with the basics, and you had some experience writing things on your own, then you’ll be able to use AI in such a way that it won’t hurt your project. You’ll be able to filter out problematic parts of the code, and know when the AI made a mistake. At that point, AI becomes a tool to write some boilerplate faster, rather than the one and only way to write code.