AI Game Master: Run an RPG Session With an AI Dungeon Master
Make your own ai game master
An AI game master runs the world, the NPCs and the rules so you just play. Try an AI-driven RPG session in your browser — no table, no prep, no code.
An AI game master is a runtime system that holds the world state, voices NPCs, adjudicates rules, and reacts to what you try — so you play instead of preparing. In Neta Studio, the AI game master runs inside a real 3D world in the browser, not a chat box. You type or say what your character does; the world changes.
The term covers a few different intents. If you want a dungeon-rpg session, the AI GM generates the rooms, populates them, and resolves combat. If you want an mmorpg-maker, the same systems scale to persistent shared worlds with many players. The common mechanism is a loop: read state, produce narration or action, write state back. This page describes how that loop actually works, where it breaks, and how to build the smallest playable version yourself.
Quick Answer
An AI game master is the systems layer that replaces a human referee's bookkeeping, not the human referee's judgment. It tracks hit points, inventory, positions, quest flags, and time. It generates or selects NPC dialogue. It resolves rolls and applies outcomes. It reacts to any action the player attempts, within the constraints of the world model. All of that runs continuously while the player is in the session.
It is not a replacement for a good human GM. A human GM reads the room, notices when a player is bored, bends a rule to keep the story alive, and remembers a throwaway detail from six sessions ago because it mattered to someone. An AI GM removes prep time, removes the need for four other people to be free on the same evening, and removes the rules-lookup pause. It does not remove the value of a table that knows each other.
For dungeon-rpg and mmorpg-maker intents, the same core answers: a world state store, a rules resolver, an NPC layer, and a spatial world. The difference is scale. A single-player dungeon session runs one state object. An MMO world runs one canonical state that many clients read and write, which introduces the shared-state and moderation problems covered later.
What an AI Game Master Does
The AI GM does four jobs every turn. If any one of them is missing, the session feels broken in a specific, diagnosable way. The failure modes are predictable, which is useful when you are tuning one.
The four jobs below are the minimum viable loop. Everything else — voice acting, art generation, music — is decoration on top of these.
Hold the world state
State is the last committed truth: who is where, what they carry, what has been killed, what has been opened, what time it is. In a Neta Studio world this lives as a scene graph plus a key-value store. The NPC position is a transform. The quest flag is a boolean. The player's torch fuel is an integer that decrements per tick. When the AI GM narrates, it narrates from state, not from a prompt summary it half-remembers.
The common bug: the model invents a detail not in state — a door that was never placed, a guard who was already killed. The fix is to serialize only what exists and to reject or rewrite generated text that contradicts a hard state key. Soft details (weather, smell) can float. Hard details (alive/dead, locked/unlocked) cannot.
Voice the NPCs
Each NPC needs a stable persona: name, role, what they know, what they want, and what they will not say. The AI GM generates dialogue conditioned on that persona and on current state. A blacksmith who has not seen the player before greets differently than one who was robbed last session. This is where a persistent world feels alive rather than random.
In practice you keep a per-NPC memory buffer with a token cap. When it overflows, summarize the oldest entries into a single line and keep going. Without this cap, a long session drifts: the NPC starts contradicting earlier statements because the earlier statements fell out of context.
Adjudicate rules
Rules resolution is deterministic code, not model output. The model proposes an action; the resolver checks it against the ruleset and returns a result. 'I swing at the goblin' becomes an attack roll, a damage roll, and a state write. The model then narrates the result. If you let the model decide damage numbers, balance becomes noise.
This also makes the system debuggable. You can log every roll, every modifier, and every state delta. When a player says 'that should not have hit,' you have the numbers.
React to what the player tries
The hard part is responding to unscripted input. A player types 'I throw the lantern at the rope bridge.' The system has to decide: does the lantern exist in inventory, is the bridge in range, does fire affect rope, what happens next. A prose-only GM can describe all of this. A spatial GM must also compute it, because the bridge geometry and the lantern projectile both live in the scene.
The reaction loop is: parse intent into a structured action, validate against state and rules, apply effects, then generate narration from the resulting state. Parsing to a schema is what keeps the world consistent. Free-text narration without a structured action is where sessions go soft.
AI Dungeon Master vs a Human GM
The honest comparison is about which one wins on which axis, because they are not the same tool. A human GM is better at reading people. An AI GM is better at never being tired and never needing a calendar. Most groups should use both, not choose.
The table below is what actually differs in a session, based on running both. Prep time, improvisation, consistency, and table feel are the four axes that matter in practice.
| Axis | AI Game Master | Human GM |
|---|---|---|
| Prep time | Zero before the session. World is generated at session start from a seed and a difficulty curve. | Hours per session if run well. Maps, NPCs, encounters, contingency notes. |
| Improvisation | Strong within the world model. Weak outside it — will refuse or hallucinate if the action has no spatial or rules grounding. | Strongest asset. Can invent a whole faction on the spot because it feels right. |
| Consistency | High. Same state, same rules, same NPC memory across sessions. Does not forget what happened last week. | Variable. Depends on notes, memory, and energy. Often the source of the best stories and the worst continuity errors. |
| Table feel | Low for group energy. No laughter, no timing, no reading the room. Good for solo or asynchronous play. | High. The social layer is the point for many groups. |
| Rules fairness | Deterministic. Same roll, same outcome, logged. | Depends on the GM's mood and the story. Can fudge for drama. |
| Best at | Solo sessions, off-hours play, testing builds, running the same dungeon for two different characters. | Long campaigns, character arcs, groups who play for the company as much as the game. |
Play a Session
The proof is a session, not a demo. A session has a goal, characters who respond to you, and at least one obstacle that can be solved more than one way. These are the Neta Studio worlds that run as AI-GM sessions in the browser right now.
Each one starts with a stated objective. You are not dropped into a sandbox with no thread; you are given a reason to move and a set of NPCs who acknowledge what you do. The AI GM tracks your progress against the objective and adjusts NPC behavior accordingly.
- The Cyclops' IslandA single-island session with a stated goal: get off the island. The cyclops has a patrol route and a sleep cycle. You can fight it, steal from it, lure it, or avoid it entirely. The AI GM tracks whether it has seen you and adjusts its behavior on later encounters.
- Mini WorldA smaller session world designed for short play. Good for testing how the AI GM handles a compact state space: fewer NPCs, fewer items, faster turns. Useful when you want to see the loop clearly without a large map.
- Agent Sprite ForgeThe character and sprite system that gives NPCs a visual presence in the world. When the AI GM voices an NPC, Sprite Forge supplies the avatar and animation state, so dialogue and body language stay in sync.
- 3D game builderThe editor where worlds are assembled. You place geometry, define NPC personas, set the difficulty curve, and seed the layout. The AI GM runs on top of the world you build.
01
Open a session world in the browser. No install, no account gate for the first run.
02
Read the stated objective. It tells you what the AI GM is tracking.
03
Talk to an NPC. Their response depends on state, not a fixed script.
04
Attempt an obstacle one way. If it fails, the world changes — a guard is alerted, a path closes, an item is consumed.
05
Attempt the same obstacle a different way. The AI GM resolves it through the same rules and writes new state.
06
End the session. The state is what the next session starts from if you continue.
Why Prose-Only AI GMs Break
A text-only AI GM has no geometry. That is the whole failure. When you type 'I climb the wall,' there is no wall with a height, no player with a climb speed, no consequence if you fail. The model produces a plausible sentence and moves on. The session feels fine for a few turns and then feels hollow, because nothing you do can actually fail in a way that changes the space.
The symptom players notice first is that distances stop mattering. You can 'run to the other side of the room' and it costs nothing. You can 'hide behind the pillar' whether or not a pillar exists. The model is generating description, not simulating a space. After twenty minutes, the player stops trying creative actions because they have learned that creative actions have no mechanical weight.
When the world is a real 3D space, that changes. The wall has a height in world units. The player has a climb speed. The attempt either succeeds, fails, or partially succeeds, and the result is written to state. The AI GM narrates from the resolved state instead of inventing it. Failure is possible, which is what makes success mean anything.
The second break is memory. A prose GM keeps the whole world in a token window. Past a certain session length, early facts fall out and the model contradicts itself. A spatial world externalizes the state. The AI GM does not need to remember that the door is locked; the door object has a locked flag. This is why spatial worlds hold up over longer sessions than chat-only ones.
AI MMO and Multiplayer Worlds
The mmorpg-maker intent is a persistent shared world: many players, one canonical state, sessions that continue while you are offline. The AI GM still runs the four jobs, but now it runs them against shared state, which introduces two problems that solo worlds do not have.
The first is shared state. If two players are in the same town and one burns down the tavern, the other must see it. That means the AI GM cannot hold state per player; it holds one world state and every client reads from it. The failure mode is conflict: two players try to loot the same chest in the same tick. You need a commit order and a lock, or one player's action silently overwrites the other's.
The second is moderation. An AI GM that generates NPC dialogue from player input will eventually generate something a player should not see, or a player will use the input channel to produce it. In a shared world this is not a personal bug; it is everyone's problem. The practical answer is a filter on generated text, a report path, and per-player rate limits on the input channel.
Shared state
Keep one authoritative world state. Clients send intents, not state. The server validates the intent against current state, applies the effect, and broadcasts the delta. If you let clients write state directly, you get desync and duplication within minutes. The AI GM reads from the authoritative state, so its narration is consistent for all players in the area.
For persistent worlds, the state must survive server restarts. Snapshot the world on a fixed interval and write deltas between snapshots. Replaying deltas from the last snapshot is how you recover from a crash without rolling back the whole session.
Moderation
Two surfaces need it: generated dialogue and player input. Generated dialogue passes a content filter before broadcast. Player input is rate-limited and filtered before it reaches the AI GM. Log the input and the generated output together so you can review a report without guessing what happened.
The AI GM should also have a hard refusal path. If an action is outside the world model or the content policy, the GM declines in-character and states an alternative. A refusal that stays in the fiction is less disruptive than a system error message.
Roguelike and Dungeon Generation
A roguelike needs two things that pull against each other: a dungeon that feels different every run, and a dungeon that is fair every run. Randomness on both axes produces unfair runs. Fixed layout on both axes produces a boring one. The resolution is to separate the axes: seed the layout, fix the difficulty curve, vary the dressing.
Seed the layout means the room graph, corridor connections, and key placements are generated from a seed, so a given seed always produces the same dungeon. This makes runs reproducible for debugging and lets you compare two builds on the same map. Fix the difficulty curve means the encounter budget per depth is a constant, not a random draw. Vary the dressing means the tileset, enemy skins, and loot table can change per run without changing the curve.
The AI GM sits on top of this as the dungeon master. It reads the generated graph, populates rooms with NPCs whose personas match their placement, and runs the rules during play. The generation is deterministic; the session is not.
01
Pick a seed. The layout generator produces a room graph from it.
02
Apply the difficulty curve. Each depth gets a fixed encounter budget, not a random one.
03
Populate rooms. NPC personas are assigned based on room role — guard, merchant, boss.
04
Vary the dressing. Tileset, enemy skins, and loot table are drawn from a run-level palette.
05
Hand the graph to the AI GM. It runs the session against this graph and the rules resolver.
06
Log state deltas. If a run feels unfair, replay the seed and inspect the budget at the depth where it broke.
Build One
The smallest playable AI-GM session needs four things: a world with geometry, one NPC with a persona, one obstacle with two solutions, and a state store that persists between turns. That is it. You can add rules, art, and a difficulty curve later. If you build the four-part version first, you will find the loop problems early, when they are cheap to fix.
Start with a single room and one guard. The guard has a name, a reason to be there, and a rule: will not leave the door. The obstacle is the door. You can fight the guard, distract them, or find a key. Each path writes a different state flag. If the AI GM can run that room without contradicting itself over ten turns, you have a session.
From there, add the parts that scale: more NPCs with memory buffers, a rules resolver with logged rolls, a seeded layout generator, and eventually shared state if you want multiplayer. Each addition has a specific failure mode you can test for. Build the smallest thing, break it on purpose, then extend.
- 3D game builderThe editor for placing geometry, defining NPC personas, and setting the difficulty curve. This is where the world that the AI GM runs on gets assembled.
- GeneratorThe layout and content generator for dungeon-style worlds. Takes a seed and a difficulty curve and produces a populated room graph ready for the AI GM.
- Agent Sprite ForgeSupplies the visual layer for NPCs so dialogue and body language stay in sync as the AI GM voices characters.
- The Cyclops' IslandA worked example of the full loop: stated goal, reactive NPC, obstacle with multiple solutions. Useful as a reference build when yours does not behave.
Walk into the world it belongs to
The only way to judge a game master is to play a session. Open one: a small world where four characters each give you something to do, and the obstacles respond to how you approach them. It was built the same way as everything on this site — from a description, published as a page.
Back to the 3D Game Builder
All 31 finished 3D worlds, games and scenes live on one page — every one of them playable.