If you have an interest in game development, you have probably come across a ton of clickbait titles like “How I Made an Entire Game in 5 Minutes Using ChatGPT”. Spoiler alert: no, they didn’t. At least, not anything worth playing. If your idea of a game is a buggy clone of Flappy Bird, then sure, maybe a large language model (LLM) can help you. But, at least for now, game development is a complex intersection between art and science that can’t be fully tackled by our current neural networks. They have their strengths, but they also have significant limitations. So, I wanted to talk about where they shine, where they fail, and what they are actually useful for in game development.
The hype vs. the harsh reality
Contrary to what some companies want you to believe in order to inflate stock prices, AI is not a magic wand that makes all of your development troubles go away. For tasks that require spatial reasoning or geometry (runtime mesh generation, physics, or even UI work), LLMs tend to fail. And it makes sense, as they don’t really “understand” spatial relationships (we might need to redefine the word “understand” at some point), which makes them more of a nuisance than a help.
So… Are they useless in game development? Well, definitely not! They can be massive time savers. While these tools struggle with spatial reasoning, they are incredibly useful in other contexts. The obvious one is solving tasks that have been solved many times before (pathfinding algorithms, camera controllers, basic game logic, persistence, etc).
But I want to focus on something different: they are great when it comes to building the tools you need to make game development easier. Let me give you some examples from my own project “Break, Enter, Repeat”, our game about planning burglaries that’s currently under development.
Editor scripts
Ever spent time tweaking the properties and attributes of the items, tools or weapons in your game to make it balanced? Of course you have. Using a LLM, I was able to write editor scripts that allow me to modify tool effectiveness in the most intuitive way possible. I can tweak the numbers and immediately see real-time charts showing how different character skills affect success probabilities for different types of locks. No more guesswork!
The AI was great at helping me whip up these custom inspectors in Unity, making my life a lot easier. While it doesn’t know anything about my game’s deeper mechanics, it proved to be great at automating the tedious work and freeing up my time to focus on design and gameplay.
Shedding light on things (literally)
One of the hardcore technical challenges I faced while developing “Break, Enter, Repeat” was coming up with a technique to calculate light intensity in a realistic fashion in the game’s world. It was worth it, though, as what’s a game about burglaries if you can’t take cover in the dark?
After implementing the algorithm, I needed to visualise light intensity across the map, so I used AI to create a Python script that could process JSON data exported from Unity. This script gave me a visual representation of how light is distributed throughout the level and provided a useful sanity check. The algorithm was working properly, yay! Plus, seeing these charts makes you feel like a data scientist, which is nice.
Catching prefab problems
Another area where AI came in handy was in developing tools to check that the game’s MANY prefabs are set up properly. You wouldn’t believe how easy it is to overlook mistakes when you have so many objects, including furniture, doors, tools, lootable items and more.
So, I asked my friendly neighbourhood LLM to create a tool that scans all my furniture prefabs for mistakes: a missing thumbnail, a table that doesn’t have its horizontal surfaces configured, or loot that can be picked up but doesn’t have a weight set (for limiting what the player can carry in their inventory). It would have been a tedious task to code all of these rules by hand. But the AI just put together a nice Unity editor script and it worked like a charm, in a matter of seconds.
Conclusion
While LLMs can be great time savers, you shouldn’t rely on them for everything. As I mentioned earlier, their understanding of geometry and spatial reasoning is lacking. They can also introduce bugs, misunderstand the requirements and ignore edge cases. It happens a lot. So, the perspective should be that they are not here to replace us, but to assist with the repetitive tasks and boilerplate code.
In short, AI won’t be making your entire game for you anytime soon (at least not a good one). That might change in the future with better models. But, for now, where LLMs do shine is in helping you build the tools that make game development smoother. While they can’t do everything, they can help with enough of the heavy lifting that they’re definitely worth exploring.
Now, get back to work! As we have established, your game isn’t going to make itself!
- News, Studio News
- October 16, 2024