Unreal Engines, Real Monsters: Generative AI in Videogames
Oct. 14, 2023.
4 min. read. Interactions
Is Generative AI the key to the future of gaming? It's reshaping the player experience with NPCs displaying genuine emotions, cozy dungeons, and a revolution in engagement like no other.
You’re trapped in a demonic world filled with monsters. You, a single heroic supersoldier, crash through their alien world wreaking carnage. You are the one they fear. You stand ready to execute another but, instead of running away like usual, this one talks to you.
You’re shocked, you didn’t even realise it could speak – and it begs for its life. Says that it is just trying to protect its demon wife and child. You spare it. It runs away. From that point on, every demon you talk to speaks, pleading to be spared – while they secretly plot their revenge.
Doom 2030, perhaps? With the rise of neural nets and generative AI, it’s possible.
Making Worlds Seem Real
AI has always been crucial for the player experience in videogames, having the inhabitants of the world react intelligently. Videogame AI has been basic for most of its existence, a bag of clever-but-simple developer tricks masking rote-response by the digital people and creatures you meet. NPCs, for the most part, speak a few stock phrases, and have only on-rails reactions to various player activities.
Game devs succeeded in creating believable NPC behaviour at the cost of 1000s of hours of writing, voice acting, animation, and code. The labor poured in producing titles like Cyberpunk 2077, Grand Theft Auto and Mass Effect is legendary.
But the illusion’s never quite perfect, despite clever tricks like ‘random’ pathing trees for behaviour, and procedural generation of the gameworld. There’s only so much you can do. The shopkeeper will never leave the town, the farmer’s wife will never fall in love with you, and the demons will never beg for their life – it’s simply not in the codebase. They were never told to act that way.
How Generative AI Will Change Videogames
Generative AI in gaming has the ability to change all this. A well-trained neural net with the task of, say, producing the entire dialogue set for a dragon-themed fantasy game world, is now entirely possible.
NPCs could make free choices powered by their neural nets. Whether Gerald the Innkeeper chooses to give you a discount is, truly, up to him. The ironmonger Derek Longfang may change his objective and become Lord of the High Vale through a brutal reign of terror. Everyone may love you, everyone may hate you, and their opinions might change. It would, indeed, feel real.
Or grotesquely surreal. Generative AI could create truly unique nightmare dungeons, trained on a dataset of every dungeon ever created by a human designer. Intrepid adventurers would crawl through a unique dungeon every time, outstripping the strictly-defined procedural generation models that currently exist. Imagine stepping into the warped imagination of a devilish AI, replete with eldritch monsters who themselves generate their own behaviour. A true test for the continued relevance of human bravery and resourcefulness. It’s you versus the machine, and the effect is unsettling in the best possible way.
Videogames Perfect Training Ground for AI
The world’s largest creative industry is gaming – bigger than movies and music combined. As AI continues to develop rapidly, gaming will be one of its first major use cases. Efforts have already begun. Videogame users are digital natives looking for a simulated experience, so the ‘uncanny’ barrier that AI faces in movies and music is not there.
Gamers are used to fighting digital prometheans, ever since the first Cacodemon chased them into the next room in a ‘lifelike’ display of monstrous ingenuity. What if the first true AGI arises by accident, when the developers give Derek Longfang, Lord of High Vale (a popular current storyline) just a bit too much processing time and the ability to rewrite his own code.
The willingness to engage in virtuality makes videogames a fertile soil with which to experiment with technology’s latest razor edge – and it won’t be long before assets generated by neural nets appear in games. Writing and voice acting, both of which can be cheaply and effectively produced by common AI models, will likely become the norm. The bottleneck is the cost of running it – and who exactly has the resources to cover these costs. Running, training, and maintaining neural nets is fearsomely resource intensive. The idea of an always-on online world being overseen entirely by a generative AI would be an effort only the world’s wealthiest companies could even hope to pull off.
All the Possible Worlds
Yet AI will get cheaper over time. Self-trained neural nets will be ever more common. And game developers will be some of the first users of the latest tools. ChatGPT just announced its ability to see and hear and react to its surroundings. It’s not a leap to imagine virtual friends and enemies reacting authentically to everything a player does, in worlds crafted and ruled by AI gods.
Humans love to play. AI will too. If done right, generative AI will revolutionise gaming, and create truly unique, immersive worlds for players to inhabit. With improvements in VR, graphics, and processing power, we might play for eternity in infinite worlds, and soar over the silicon demesnes of our dreams.