As an avid gamer for decades, I’ve played just about every type of game. But I’ve noticed that as I’ve gotten older, my playing time has declined. This is not uncommon, of course, as increasing responsibilities get in the way, leaving less time to pick up the controller. Still, I’m not sure that tells the whole story
Fancy Space Invaders
Immersion is the main draw for me. I want to be swept up in a fantastical world, part of a story I control, where nothing from the real world can distract me1. Lately though, that has been elusive. You might say imagination fades as we get older, but I refuse to believe that. A few recent games have recaptured that feeling2 but it wears off as the hours pile up.
I turn to what is considered one of the most influential video games ever: 1978’s Space Invaders. Enemy variety, escalating difficulty, continuous combat, a high-score chase. I started wondering, are modern games just a fancy version of Space Invaders?
Combat, combat, combat…
OK, it’s not that simple. Games today are far too varied for a blanket statement like that. But a few years ago I started getting into game development, and it was tutorial after tutorial: enemies, weapons, hitboxes. Combat is the most enduring mechanic in game history. This makes sense. Combat at its core is just movement and collision detection. In a medium built on things moving through space, that’s the first mechanic you get.
Combat is so common we’ve stopped noticing it’s a choice. For my part, I can’t do it anymore. I can only shoot so many guns, navigate so many skill trees, grind so many levels before it all blurs together. That’s a big part of why I play less than I used to. The games I most want to love are littered with the same mechanics.
Combat v2
Now, I don’t want to entirely eliminate combat. Drama is driven by conflict, and there is no greater conflict than wanting to obliterate your enemy. I just want to make it less binary than kill or be killed. In his 2006 GDC talk introducing GOAP3, Jeff Orkin observed that the average NPC survives roughly twelve seconds once engaged. However sophisticated the behavior underneath, most of it is never witnessed. The encounter is over before the intelligence has anywhere to go.
I am directly challenging the notion that NPCs must have such a short lifespan. It’s the consequence of a medium built around combat from the very beginning. From Space Invaders to now, cannon fodder is the norm. But what if combat were something you could talk your way through? You could lie. You could stall. You could push someone to the edge of violence and then walk them back from it. Life or death would be only one of many possible outcomes.
Every Encounter is a Boss
Boss encounters are the most intricate the medium has to offer. They unfold in phases, they shift as they go, and they last long enough to be remembered. So why shouldn’t every encounter be a boss encounter? That’s the question that started this journey. I set out to reinvent the NPC, while keeping the relationship adversarial. Strip out the conflict and you strip out the reason to care.
On Your Guard
In early 2023 after finishing a graduate course in game AI, I began researching this idea. ChatGPT had been out only a couple of months and was still thought of mostly as a chat bot. But I already knew that dynamic conversation would be central to the NPCs I had in mind. I didn’t know much about large language models then, and what I found was Inworld, which at the time offered customizable LLM-backed NPCs for games. Nearly every demo was about conversation and personality. I wondered how much further it could be pushed.
Enter the guard archetype. It gives you an adversary and a clear objective in a single character: get past him. Every iteration since has been built on it. Introducing Stair-bot.
Crude in places. But this is where it all started!
You Never Go Full LLM…
I wasn’t thrilled about relying on a third-party service, and sure enough, in the summer of 2024 Inworld announced it would soon be dropping its community offerings. What I had built up to that point was a hybrid: traditional game AI underneath, a state machine and behavior trees, with text driving it at the top level. So I started experimenting with an NPC brain that was fully backed by an LLM, handling both conversation and decision-making. A few months later I had the second prototype, and it was a real step toward my goal.
This version added a rudimentary action set, memory, RAG and multiple outcomes.
Present Day
The second prototype was a successful proof of concept. Armed with everything I had learned, I rebuilt from the ground up, focusing solely on LLM-driven NPC behavior. What emerged was an event-driven behavior system that supports real-time interaction in a 3D world. Toss in a game setting and some standard mechanics, and it’s starting to look like the real thing.
Since that video last spring, I’ve built a playable demo with a storyline and a real quest to solve, along with multiple characters whose behavior comes entirely from text.
A single encounter can run ten minutes. Hostility accumulates, gets walked back, accumulates again as the conversation turns. The guard never stops being an adversary, and it never has to kill anyone to prove it. A standoff can end on a piece of information rather than a health bar.
That is the encounter I wanted. Not twelve seconds of sophisticated behavior that nobody sees, but something intricate enough and long enough to be worth remembering. There’s still plenty to refine, and the technology itself is just getting started. The journey is a lot further along than it was, and nowhere near over.
- Some years ago I was searching the internet for a way to turn off that blasted light on the XBOX controller. I like to play in the dark (immersion!) and the light was incredibly distracting. I found a message board where someone was asking the same question and in most replies, people were wondering why anyone would want to do that. Anyway, the answer is electrical tape, works like a charm. ↩︎
- Some of my recent favorites: Outer Wilds, Stray, Indiana Jones, Blue Prince, Baldur’s Gate 3, KCD2 ↩︎
- https://www.semanticscholar.org/paper/Three-States-and-a-Plan%3A-The-A.I.-of-F.E.A.R.-Orkin/012ef03d0f951092b8645b69aebdbce900ac03e4 ↩︎
Leave a Reply