Why Character Engines are game engines for AI NPCs
In the early days of game development, each game was coded from scratch.
Let’s say you were designing games in the 1970s for early game consoles like Atari 2600 or Magnavox Odyssey. You would have had to carefully design your game to make optimal use of the gaming console it would be played on. And if you wanted to release it on more than one platform? You would have needed to code both versions from scratch.
Once game consoles advanced, many video game companies developed in-house game engines so they didn’t have to recode the logic for each game they created. Nintendo’s early game engines, for example, brought side scrolling to games like Super Mario Bros (1985) and Excitebike (1984). This allowed Mario to run and walk rather than just move at a constant speed as was the norm in platformers at the time. Re-using the same game engine meant game devs could work on adding even more functionalities rather than just reinventing the side scrolling wheel.
Nowadays, reusable game engines like Unreal, Unity, and Godot make developing games – and their sequels – faster and much more streamlined. That’s allowed game devs to focus on creating better games and expanding the possibilities of what games can do.
With the advent of ChatGPT, smarter NPCs are expected to be the next big evolution set to expand our collective idea of what’s possible in games, according to publications like GamesBeat and GameSpot. It’s an evolution that gamers desperately want. In a recent study conducted by Bryter Market Research, 99% of gamers felt AI NPCs would enhance game play and 79% believed they would spend more time playing. Major Twitch influencers like Doug Doug, Moist Critical and HasanAbi have also tested games with AI NPCs recently – to great viewer excitement. As the industry implements this technology, game developers are likely to turn to another type of game engine to power these dynamic characters - a Character Engine.
In this article, we’ll examine the ways a Character Engine is similar to a game engine and share more about what it does and how it helps game devs streamline and implement AI NPCs.
What is a game engine?
You likely already know this definition – but a game engine is the underlying software development environment used to create video games. Essentially, it’s the framework that brings a game's virtual world to life. It offers a suite of visual development tools that could potentially eliminate the need for complex programming for everything from rendering graphics, simulating physics, handling memory and sound, creating artificial intelligence (AI), and networking.
Without a game engine, developers would have to build many components from scratch for every game they develop – a very time-consuming and inefficient process. Game engines allow developers to focus on the more creative tasks involved in game dev such as game mechanics, storylines, character design, and more.
By leveraging game engines, developers can drastically cut down the time, effort, and resources needed to create games. They help in crafting immersive gaming experiences with efficient workflows while maintaining high quality and optimizing performance. They also allow for platform abstraction, ensuring that the same game can run on various gaming platforms.
An effective game engine provides several key utilities and systems that are critical to game development. This includes but isn't limited to:
- Rendering engines for 2D or 3D graphics
- Physics engines for collision detection and response
- Level editors
- Localization support
- Video support
- Memory management
- And more!
What is a Character Engine?
A Character Engine is a development environment that offers a suite of tools and features that help game developers create and deploy real-time generative AI-powered NPCs in video games. Essentially, it’s like a game engine but for generative AI character creation.
Without a Character Engine, developers would have to integrate a large language model API directly, add in speech-to-text, set up text-to-speech, build an emotions engine, connect a character’s emotions to their lip sync, facial expressions, and animations, engineer an efficient backend architecture to ensure low latency, build in scalability, create ways to support concurrent sessions, customize their safety settings, write dynamic prompts, tackle LLM hallucinations, and much more. That’s a lot of additional work!
Like game engines, Character Engines are efficient and cost-effective ways for developers to add dynamic interaction capabilities to their gaming experiences without having to hire a machine learning team and architect it all themselves for every game they create.
Using a Character Engine to implement AI NPCs into a video game allows game devs, narrative designers, and writers to focus on the creative tasks of character design and game storytelling rather than orchestrating multiple models to reinvent the AI NPC wheel. It makes AI-powered NPCs more accessible to game developers of all sizes. It also allows game developers to deploy the characters to multiple game engines, gaming platforms, and experiences.
By using Character Engines, game devs can save a significant amount of time that would have gone into prompt engineering, building machine learning architectures, and features.
Character Engines focus on character behaviors and interaction. They allow you to integrate the NPC personality with any avatar or character design. An effective Character Engine provides a number of key features and functionalities critical to creating high quality AI NPCs. This includes but isn't limited to:
- Real-time performance
- Real-time emotional voices
- Goals and action triggers
- Knowledge systems
- Configurable safety
- Character memory
- Player profiles
- Relationship frameworks
- Fourth walls
- And more!
Inworld AI: A Character Engine example
Wondering what an individual Character Engine looks like and what kinds of features it offers for developers?
Inworld’s Character Engine orchestrates multiple multimodal AI models to deliver an interactive and holistic real-time character performance that ensures your NPCs stay in-character and in-world. Production-ready and optimized for real-time experiences, Inworld’s Character Engine was designed to instantly scale without additional configuration and to integrate seamlessly into any experience.
Think talking with NPCs voice-to-voice is cool? That’s just the beginning. AI NPCs are able to adapt and learn, build relationships with players, remember players and events, autonomously initiate goals and actions, and follow their intrinsic motivations.
- Autonomous Goals and Actions: Defined, intent recognition, and motivation Goals and Actions triggers allow game devs to customize how NPCs respond to certain situations and helps drive interactions in gameplay.
- Long-Term Memory: Characters have both flash and long-term memory ensuring they remember players and past interactions.
- Personality: A character’s personality drives both verbal and non-verbal behavior including voice inflection, facial expressions, and body language.
- Emotions: Characters can express emotions that are mapped to animations, goals, and triggers.
- Real-Time Voices: Real-time voices that can be configured for age, gender, pitch, and the talking speed of your character. You can also integrate third-party voices from ElevenLabs.
Context matters. The last thing you want is for an NPC to start talking about things that don’t exist in your game world or to speak about topics that aren’t appropriate for your game rating. We provide context for interactions and dialogue through things like knowledge, configurable safety, player profiles, relationship progression frameworks, and fourth walls.
- Knowledge: Add both personal and common knowledge to your NPCs so they know about their worlds, contexts, backgrounds, rivalries, favorite sayings, and more.
- Player Profiles: Imagine if your NPCs could react differently to players depending on what character they’re playing within the game world? Our Player Profiles ensure NPCs customize their interactions based on player information.
- Relationships: How could game play change if you had to earn the trust of a companion before they’ll help you? Or what if you could make enemies who would plot against you if you slight them? Our Relationships feature creates relationship frameworks that allow each player to build relationships with each NPC over time.
- Configurable Safety: What’s safe for an NPC to say in a first-person shooter game won’t necessarily be safe for an NPC to say in a game made for everyone. Configurable Safety allows game devs to decide what NPCs can talk about.
- Fourth Wall: Large language models like ChatGPT are notorious for answering every question asked and for what’s known as ‘hallucinations’ where they make up information. In video games both are likely to break immersion. Our Fourth Wall ensures that a character draws only from knowledge that exists in their world.
Real-Time AI Performance
Inworld’s real-time performance is the final layer of our Character Engine. Latency is critical when every millisecond counts in real-time experiences. Inworld is production-ready and designed to scale.
- Scalability: We allow you to scale your experience to meet your needs – without the need for additional configuration.
- Low latency: We’re obsessed with latency. We’ve orchestrated our engine to deliver the lowest latency possible so that NPCs respond to players in real-time.
- Concurrency: No matter how many players are speaking to the same NPC, we ensure they receive consistent and high-quality responses.
Ready to try out a Character Engine?
Game developers are already starting to integrate AI NPCs into their games in order to meet player interest and demand. Niantic, for example, added Inworld’s Character Engine to their Meet Wol augmented reality experience and NetEase recently added Inworld to their Cygnus Enterprises game. More games are set to explore the dynamic gameplay possibilities of generative AI and Inworld’s Character Engine soon.
With the promise that AI NPCs will help improve core gaming metrics like player retention, replayability, and more, expect to see games with generative AI-powered characters increasingly become the norm over the next few years.
Interested in testing a Character Engine? Create your own AI NPC today in Inworld Studio.