A game with AI NPC behavior can mean two very different things: characters driven by classic game AI, like the ghosts in Pac-Man, or characters wired to a language model that answer whatever you type. This guide explains both, shows how to tell which one a game uses, walks through how talking NPCs work under the hood, and then builds one with a short JavaScript example you can drop into your own project.
What is a game with AI NPC characters?
A non-player character (NPC) is any character in a game that the player does not control: shopkeepers, guards, enemies, companions, quest givers. The term comes from tabletop role-playing games, where the game master voiced everyone the players did not.
“AI” in the phrase is where the confusion starts. In game development, AI has always meant the systems that decide what NPCs do. As the Wikipedia overview of game AI points out, most of it is not “true” artificial intelligence at all. It is a set of rules, state machines and pathfinding tuned to feel believable and fun, not to think.
Since language models became cheap enough to call from a game, a second meaning has taken over: a game with AI NPCs is now often a game where you can talk to characters in your own words and get an original reply. Both meanings are valid, and a good design usually mixes them.
Scripted game AI vs language-model NPCs
Scripted game AI
Classic NPC behavior is built from predictable parts:
- Finite-state machines (FSMs): an NPC sits in one state at a time (idle, patrol, chase, flee) and switches when a condition is met. Pac-Man’s ghosts alternate between a “chase” mode and a “scatter” mode, and each ghost targets the player in its own way, which is why they feel like they have personalities.
- Schedules and goals: Bethesda’s Radiant AI lets NPCs in the Elder Scrolls games make choices about how to meet goals like eating or sleeping, instead of following one fixed script.
- Pathfinding: algorithms such as A* that find a route around walls.
- Behavior trees and utility scoring: structured ways to pick the most sensible action from many options.
Scripted AI is fast, cheap, testable and runs offline. Its weakness is conversation: dialogue is a tree of options a writer prepared in advance.
Language-model NPCs
A language-model NPC sends the player’s words, plus a description of the character and what it remembers, to a large language model, then shows the reply. The player can ask anything. The character can react to things no writer anticipated.
The cost is real: every reply takes time (often a second or more), usually costs money per request, needs a network connection unless you run a local model, and can drift off-script. That is why shipped games almost never let the language model control everything. It handles the talking, while ordinary game code still decides who attacks, what quests unlock and what items exist.

Examples of games with AI NPCs you can talk to
The idea is older than most players assume. Façade, released in 2005, let players type freely to two characters in an interactive drama, years before modern language models existed. The Sims series is often praised for NPCs that run their own lives without player input, and Radiant AI did similar work for the Elder Scrolls games.
For typed or spoken conversation powered by language models, the landscape splits into three groups:
- Released commercial games marketed with free-text NPC conversation, such as Where Winds Meet and inZOI.
- Mods for existing games: community projects connect Skyrim NPCs to language models and voice synthesis, so you can speak to a guard and get a new, voiced answer. Similar experiments exist for other moddable open-world games, including GTA V police mods. Talk about big upcoming open-world releases getting language-model NPCs is speculation until the studio says otherwise.
- Indie and game-jam projects: small detective games, interrogations, social deduction and roleplay sims, often playable in the browser. This is where most experimentation happens, because a tiny team can build a game with AI NPCs in a weekend.
The best designs give the conversation a purpose. A suspect you must trick into contradicting herself, a merchant you can haggle with, or a guard you need to talk past are all stronger than “chat with a villager” because the player has a goal and the game can check whether they reached it.
How to tell if a game uses AI NPCs
A quick checklist:
- Check the input. A menu of dialogue choices means scripted dialogue. A free text box or microphone input points to a language model.
- Repeat a question with different wording. Scripted NPCs give identical lines; model-driven ones rephrase.
- Reference something odd. Ask about an event from ten minutes ago, or something outside the game world. A model-driven NPC will usually try to answer, sometimes revealing guardrails (“I don’t know about that, traveller”).
- Watch the timing. A short pause before every reply often means a network round trip.
- Read the store page. Online requirements and generative AI disclosures are strong hints.
Remember that “good AI” in older reviews almost always means scripted behavior done well, not conversation.





