AI NPCs: How they’ll transform gameplay
With all the talk about how generative AI is set to revolutionize the gaming industry, gamers and game devs alike are particularly excited for how this tech could transform NPCs (non-playable characters).
In a recent study conducted by Bryter Market Research, 99% of gamers said AI NPCs would enhance game play, 79% believed they would spend more time playing, and 81% would spend more money on games with AI NPCs. The last few months have also seen popular Twitch personalities like Doug Doug, Moist Critical, and HasanAbi excitedly testing out games with AI NPCs.
On the game developer side, well-respected publishers and studios are already integrating generative AI-powered NPCs into their games. For example, NetEase added a generative AI-powered companion in their game Cygnus Enterprises and Niantic, the studio responsible for Pokemon Go, recently released a new augmented reality experience called Wol, powered by Inworld AI.
And the industry has only begun experimenting with how AI NPCs can radically transform gameplay and introduce novel game mechanics. In November, 2023, Xbox announced a co-development partnership with Inworld to create tech that powers AI NPCs. In this article, we’ll give you an overview of AI NPCs, explain the tech that powers NPC artificial intelligence, talk about how AI NPCs could radically transform games, and share a list of games and AI mods with AI NPCs available for you to play now.
What is an AI NPC?
While NPCs have always been powered by some form of AI, an AI NPC generally refers to an NPC that’s powered by generative AI. Creating generative AI-powered NPCs can be as simple as connecting an NPC to a large language model like ChatGPT for dynamic text conversations.
However, an AI NPC can also be powered by a number of orchestrated models including cutting-edge natural language, text-to-speech, machine vision, and emotions models. Multi-modal AI NPCs like these can often speak to players voice-to-voice, possess awareness of their environment, and have autonomous motivations and goals.
Some of the core benefits of adding generative AI to NPCs is that it allows NPCs to engage in complex, real-time dynamic conversations, show awareness of their surroundings, build relationships with players, add new gameplay dynamics, and give gamers more player agency.
Because of this added complexity, games can be more challenging, replayable in a variety of exciting ways, more immersive, and so much more. They also hold the potential for truly novel gameplay possibilities by enabling emergent player-centric gameplay.
AI NPCs represent a huge leap in NPC artificial intelligence
Prior to generative AI being implemented in NPCs, the AI that powered NPC interactions and behaviors was relatively rudimentary. There were two key types of AI used: deterministic AI and nondeterministic AI.
Deterministic NPC AI
Deterministic NPC AI models create NPCs that follow very specific and predictable algorithms. For example, background NPCs often can be seen moving in circles or back and forth along the same route like some bystanders in Grand Theft Auto. Similarly, the Goombas in The Super Mario Bros can only move back and forth in a very limited way.
Ever been chased in a video game? That was likely deterministic NPC AI at work whether you were playing PacMan or a more modern game. Deterministic NPCs often don’t speak or have only a few phrases they repeat over and over if you try to interact with them. Fighting a deterministic AI boss is often easier because they’ll always make the same moves or use the same attack strategies. Because of this, games with deterministic AI-powered NPCs can be less challenging.
Nondeterministic NPC AI
Nondeterministic NPC AI models, meanwhile, are more advanced. NPCs powered by these AI models are allowed to behave in less predictable ways. They’re generally focused on NPCs learning and reacting to player behavior, however, how responsive they are depends on the complexity of the algorithm powering the character. In these cases, developers don’t code all possible behavior and NPCs can learn on their own and engage in emergent behavior.
For example, in the strategy game Black and White, there’s a creature whose actions and personality are developed in concert with the player’s interactions with it. The player can teach it not to eat innocent villagers by punishing it when it does. Another example of these types of NPCs are bosses that are able to learn your fighting style and adapt their technique. Fighting a nondeterministic NPC AI boss tends to be more complicated for this reason.
Talking to a nondeterministic NPC, however, isn’t a huge difference than deterministic AI since they are still dependent on pre-written dialogue that’s been inputted into a dialogue tree, which means there are only a limited number of potential interactions with any character. That kind of static dialogue leads to gamers’ common complaint about repetitive NPCs.
Generative NPC AI
Generative NPC AI represents an entirely new way to power NPCs – and it’s expected to result in an even bigger leap forward when it comes to game mechanics and NPC sophistication than the move from deterministic to non-deterministic NPC AI.
Generative AI is powered by neural networks that are able to generate completely original text, image, or video content in response to prompts. While this tech has been used for asset and environment generation such as the re-creation of terrain in Microsoft Flight Simulator, it has particularly exciting applications for NPC artificial intelligence.
Who hasn’t wanted to speak voice-to-voice to their favorite NPCs and ask them anything? And who hasn’t wanted to play a game with a companion who chats with them while they play like in Cygnus Enterprises’ recent integration of AI NPCs? But talking to NPCs is just the beginning of the possibilities when it comes to AI NPCs.
With generative AI, NPCs have the potential to be far more responsive to their environment and a player’s actions, engage in autonomous goals and actions, build evolving relationships with players, and completely transform game mechanics. Once fully implemented, games with NPC artificial intelligence powered by generative AI are likely to have dramatically different gameplay experiences.
How it began: ChatGPT NPCs
With all the excitement in late 2022 around ChatGPT, many people first heard of AI NPCs by watching videos where indie game devs or modders integrated characters powered by large language models like ChatGPT (or more accurately GPT-3.5) into popular video games. The most talked about versions of this trend included two VR Skyrim integrations. Some videos even showed people how to create ChatGPT-powered NPCs themselves in their own projects.
While these sample videos demonstrated the possibilities of the tech, they were often criticized for things like characters’ long pauses, rambling answers, soulless intonation, and out-of-character responses. They looked like quickly put together demos that only hinted at what might be possible.
Many creators had to edit or fast forward interactions with their NPCs to account for the significant response latency. Meanwhile, how-to videos showing how to create these generative AI-powered characters had runtimes of up to an hour and a half long and still showed extremely rudimentary implementations.
The present and future: Character Engines
While these direct OpenAI API integrations demonstrated the potential of generative AI for powering NPCs, Character Engines are set to realize that potential by offering features and functionalities that will breathe life into the dialogue AI NPCs generate – while also controlling other AI NPC behaviors like actions, relationships, decisions, and more.
Inworld AI’s fully integrated no-code Character Engine, for example, allows game developers, narrative designers, and writers to create NPCs that can speak or type to players in real-time. Rather than accessing one generative AI model via an API, Inworld orchestrates multiple models for game devs including: an emotions engine, machine vision, text-to-speech, speech-to-text, animations, and more. It does this via a generative AI architecture that’s optimized for real-time performance and scale. That makes the process of integrating AI NPCs simple as it greatly reduces the work that game devs have to do to make generative AI work for gaming use cases.
Inworld also has purpose-built features for video games through its Character Brain and Contextual Mesh layers. Inworld’s Character Brain includes features like a highly customizable personality, an emotions engine that orchestrates intonation, animations and dialogue, autonomous goals and actions, long-term memory, and more. The Contextual Mesh layer, meanwhile, adds things like a fourth wall, personal and common knowledge, configurable safety, player profiles, and relationship progression.
Solutions like Inworld also allow for scripted dialogue through triggered goals and actions, something necessary to move the game narrative forward in many gaming use cases. It ensures game devs and players get the best of both worlds – scripted dialogue for important information and the ability to ask NPCs anything you want powered by cutting edge NPC artificial intelligence.
10 ways AI-powered NPCs will transform gameplay
While many gamers are excited for the potential to talk to video game characters via AI on any topic they want, that might not be the most exciting thing that will come from the addition of AI characters in video games. The integration of generative NPC AI promises to revolutionize the very fabric of gaming, offering more immersive, adaptive, and challenging gameplay experiences.
AI NPCs will shape game mechanics and gameplay profoundly, diversifying the player experience in a multitude of ways:
1. Autonomous goals and actions
Traditional NPCs follow predetermined paths and actions, but with generative AI-powered NPCs, they’ll have autonomy, independent goals, and their own decision-making processes. This could significantly enhance game depth and player engagement. Imagine an enemy who can get creative in how they plot your downfall. Or a merchant who can tell you about a secret all-powerful sword only if you mention weapons. How a game unfolds – and how it can be replayed – is about to be transformed.
2. Unlocking clues and quests
AI-powered NPCs will offer dynamic, player-centric journeys, providing clues or initiating quests based on player interactions with characters or the environment. This feature would ensure a more organic and engaging narrative progression. Think of AI characters in video games that will only give you a clue if you ask the right question or earn their trust. Or a quest giver that will decide which quest to send you on based on your conversation and interests.
3. Player-centric gameplay and narratives
AI-powered NPCs are capable of learning and adapting to a player's actions, customizing their interactions based on a player’s profile, and developing and deepening relationships with players across interactions. This opens up new ways the player could influence the narrative and gameplay, adds much deeper personalization, and greatly enhances immersion. Imagine playing a game as a member of one faction and having NPCs treat you differently because of that and then replaying the game as a member of another faction. Or consider how your helpful interactions with an NPC could mean they come and help you later on in the game narrative.
4. Relationship-based mechanics
In a game with AI-powered NPCs, relationships with characters could evolve based on interactions over time. A slighted NPC might hold a grudge, while a frequently helped NPC might become an ally. This can lend a new dimension to the relationships established within the game. Imagine game mechanics where you’re required to gain the trust of an NPC before they tell you a secret or you can get to the next level. Or consider a game where you could beat a boss by fighting him or making him your friend - your choice!
5. Long-term memory
AI-powered NPCs can remember player decisions and actions via their long-term memory, introducing lasting consequences and continuity to the gaming experience. This could greatly impact a player’s strategic decisions and elevate the emotional connection to the game world. Think of how you’d feel in a game world where AI characters in video games remember details of things you shared with them last week. How would that increase how much time you want to spend in that game world? Conversely, think about what it would be like to play a game where a bystander NPC starts plotting against you because you bumped into them earlier in your gameplay.
6. Emergent enemies
What if you could play a game where any NPC could become your enemy? Or one where your enemies were able to adapt their tactics to you? Generative AI can create AI-power NPC enemies that dynamically adapt to player tactics, providing a continually adaptive challenge. This means more engaging gameplay where players are met with unpredicted combat strategies. It can also allow players to have individual relationships with each NPC – and that opens the potential for non-traditional enemies.
7. Cascading Consequences
Generative AI provides a wide range of reactions from NPCs to player actions, leading to cascading consequences. These consequences can trigger new scenarios, new game narratives, and new opportunities for interactions with NPCs. While this adds to player excitement by ensuring the game narrative is always surprising, it also makes games significantly more replayable and gives the player significantly more player agency (something which has been found to boost play time). Imagine playing games where the narrative changes significantly based on small choices you make so it feels like you’re playing an entirely new game every time. Or think about how you’ll need to strategize when you won’t know the full consequences of any of your actions.
8. More enjoyable core game loops
AI NPCs can enhance the underlying repetitive cycle of actions that the gameplay revolves around, diversifying and enriching it. It can dynamically adjust the difficulty or unpredictability of the core game loop, for example, keeping the players intrigued and ensuring they’re appropriately challenged. Or it can create new emergent game loops based on the AI characters in video games that the player interacts with most and seems to like best. Imagine a game where you can go on a quest with a character that isn’t traditionally involved in quests – and see how they perform. Or what about a combat game loop where you choose a completely harmless NPC to be your enemy.
9. Easter egg characters
Generative AI promises a fun surprise element with easter egg NPCs. As each NPC has a distinct personality, game developers can create some peculiar and funny ones that players can randomly discover if they interact with all NPCs. Imagine a world where you think you’re talking to a boring bystander only to find out they’re actually a character called the Almighty Ruler who sees robot ghosts. Or maybe you’ll find characters from another one of the studio’s popular titles hiding within a crowd that you can grill about the studio’s next release. This lends excitement to exploring the world as you never know what the NPCs you’ll meet will say.
10. Generative worlds
The future of gaming might be worlds that are truly dynamic and evolve almost entirely based on the players' actions. In these worlds – which are currently only dreamed of – entire ecosystems, societies, and environments could potentially organically grow, change, and react to the players' strategies and decisions. AI NPCs with more advanced NPC artificial intelligence would be essential in these kinds of game worlds.
Released AI mods and games with AI NPCs
There are a number of studios who have already released games with AI NPC. Modders have also been on the forefront of efforts to integrate AI characters in video games creating AI mods of popular games like Skyrim, Bannerlord, and Grand Theft Auto and enabling interactive experiences unlike anything players have seen before.
These early demos of the tech are an exciting glimpse into the future of gaming. Each of these games present fascinating examples of how AI technology can be incorporated to enhance the player's real-time interactions and gameplay experience.
Games with AI NPCs
AI mods with AI NPCs
If you’re interested in learning more about AI games as they get released, sign-up for our Early Access program to play the latest releases first.
Upcoming AI games with advanced NPC artificial intelligence
Following the explosion of interest in generative AI in 2022, an increasing number of studios have unveiled plans to integrate generative AI.
Each of these games signifies the increasing adoption of AI NPCs in the gaming industry, serving as a testament to their transformative potential – and a sign that in the future of gaming AI NPCs will be the norm rather than an exception.
How to make AI-powered NPCs
Before you sign up for OpenAI’s API and start queuing up all the hour and a half long ‘how-to integrate ChatGPT into game engines’ videos, you might want to test out AI NPCs by using a Character Engine like Inworld.
We offer a no-code studio where you have the option to autogenerate a character based on a short description. Then, you can easily tweak that character to better fit your game. We have a number of integrations including Unreal and Unity SDKs and Roblox, Minecraft, Simple, and Node.js APIs to make it easier for game devs wanting to test out the tech. And you can do that without having to start a new time consuming weekend side project and learn everything about text-to-speech and machine vision yourself.