Game loops and formats: core, meta and session loops, and where generative AI fits
Loop design for AI game designers: how core, meta and session loops fit together, the difference between compulsion and meaningful loops, and how each game format shapes them. Also why text-based generative games need a firm loop to stay games rather than drifting chats.
13 October 2026 · 10 min read
When a game idea isn’t working, the most useful question is “what does the player do, over and over, and why do they do it again?” Not what the world is, or who the characters are, or how clever the generation is. Just the repeated thing. Every game that holds attention has a loop at its centre, and most failed prototypes either never found theirs or found a loop that didn’t connect to anything bigger. That question has become more pressing now that so many people are making games with AI. A language model can produce endless text, music and, increasingly, video, but endless content is not a loop. Without one, a text-based generative game drifts into an aimless chat with a narrator who will agree to anything. This piece is written for the AI game designer. It covers a working loop vocabulary, the difference between loops that respect players and loops that exploit them, how the major formats shape their loops, and how to give a generative game a structure it can’t talk its way out of.
Three loops: core, meta and session
Designers use “loop” loosely, so it helps to split it into three nested layers.
The core loop is the smallest repeated unit of play, usually seconds to a minute long. In Tetris it is: see a piece, rotate and place it, clear lines, see the next piece. In a deckbuilder it is: draw a hand, play cards, resolve the enemy’s turn. The core loop is where the feel of a game lives. If it isn’t satisfying on its own, nothing layered on top will save it.
The meta loop is what the core loop feeds. It is the reason the next core loop matters more than the last one: new options, upgrades, a growing collection, a deck that gets stronger, a story that advances. In Hades (Supergiant Games, 2020) the core loop is clearing a chamber, the run loop is an escape attempt, and the meta loop is returning to the House of Hades after each death, spending resources on permanent upgrades and catching up with characters whose dialogue moves on with every attempt. Death advances the meta loop instead of interrupting it, which is why the game feels generous.
The session loop is the shape of one sitting: how a player starts, what a natural stopping point looks like, and what pulls them back next time. It is the most neglected of the three. A game with a strong core loop and no natural stopping point produces “one more turn” at two in the morning, and then guilt. A game whose sessions end cleanly, on a resolved run or a finished chapter, with a reason to return, tends to be played for longer overall.
Daniel Cook’s 2012 Lostgarden essay “Loops and Arcs” adds a useful distinction. A loop is a system the player can repeat and get better at. An arc is content that is consumed once: a cutscene, a story beat, a puzzle with a single solution. Most games mix the two. Generative content blurs the line, because an arc that is regenerated each time can look like a loop while teaching the player nothing transferable. More on that below.
Compulsion loops and meaningful loops
A compulsion loop is a loop designed to be repeated whether or not the player is getting anything from it. The usual ingredients come from operant conditioning: an action, an unpredictable reward, and a short cooldown before the action is available again. Variable-ratio rewards, where the payout comes after an unpredictable number of actions, are the pattern behind slot machines and loot boxes, and they produce persistent repetition precisely because the next attempt might be the one.
A meaningful loop is one where the repetition changes the player as well as the game state. Katie Salen and Eric Zimmerman’s Rules of Play (2003) defines meaningful play as arising when the relationship between an action and its outcome is both discernible, so the player can see what their action did, and integrated, so it matters to the larger game. That gives a practical test for any loop:
- Discernible: after each iteration, can the player say what happened because of what they chose?
- Integrated: does that outcome change their options in later iterations?
- Learnable: is the player better at the loop on the hundredth repetition than the tenth, for reasons they could explain?
A compulsion loop fails the third test and often the first. A slot machine is discernible in the shallowest sense (you lost), but nothing you learn improves your next pull. A roguelike run passes all three: you can see why you died, the run’s choices shaped the outcome, and you play the next run better.
This is not a moral purity test. Most games use a little compulsion as seasoning: a randomised drop, a streak counter, a chest that might hold something good. The design question is whether the compulsion is decorating a meaningful loop or replacing one. Generative systems make the replacement easy. “Ask the model for something new” is a perfect variable-ratio reward: sometimes the output is delightful, usually it is fine, and the player keeps asking. That is engagement, but it is not yet a game.
Formats and the loops they imply
A game’s format is the set of structural commitments it makes before any theme is chosen: how time passes, how long a unit of play lasts, what persists between sessions. Each format pushes the three loops into a characteristic shape.
Roguelike runs. Rogue (1980) established procedural dungeons and permanent death. Modern descendants such as Slay the Spire and Hades add a meta loop of permanent progress between runs. The run is the unit: a self-contained attempt, 20 to 60 minutes long, that ends in success or death. Because each run reshuffles the content, the skill being learnt is the system, not the map.
Idle and incremental. Cookie Clicker (2013) and Frank Lantz’s Universal Paperclips (2017) run their core loop mostly without the player: numbers go up while you are away. The player’s loop is checking in, spending what accumulated and choosing the next multiplier. The interesting decisions are about investment order and when to reset (“prestige”) for a permanent bonus.
Turn-based. Time stops until the player acts, which makes the loop about deliberation rather than reflexes. Into the Breach (Subset Games, 2018) shows every enemy’s intended attack before you move, so each turn is a small perfect-information puzzle.
Real-time. The core loop is continuous and tight: aim, move, react. Decisions happen under time pressure, so the design weight sits on readable feedback and execution.
Puzzle. Each puzzle is an arc in Cook’s sense: solved once, then finished. The loop lives one level up, in learning the rules well enough to see the solution to the next one.
Narrative. Choice-driven stories loop through read, choose, see consequence. Inkle’s 80 Days (2014) wraps narrative choices around a resource loop of money, time and the protagonist’s employer’s health, which gives every choice a cost.
Daily and asynchronous. One puzzle per day, the same for everyone, with no way to play more. Josh Wardle’s Wordle launched in October 2021 and was bought by The New York Times in January 2022. Its session loop is deliberately capped: the scarcity is the hook, and the shared puzzle turns results into conversation.
Format, loop, session and where generative AI fits
Here is the same material as a table, with a column for where AI generation, text and audio now and video later, actually earns its place in each format.
| Format | Core loop | Typical session | Where generative AI fits |
|---|---|---|---|
| Roguelike run | Encounter, choose, resolve, next room | 20-60 min per run | Generated encounters, events and item text inside a fixed rules engine; a narrator who remembers past runs |
| Idle / incremental | Accumulate, spend, choose upgrade, prestige | Minutes, many times a day | Generated flavour for milestones; generative audio that thickens as the economy grows |
| Turn-based | Read the state, plan, commit, see resolution | 15-90 min | LLM opponents that explain or bluff about their intent, with moves chosen by a search or rules engine |
| Real-time | Perceive, act, get feedback, repeat | 5-30 min bouts | Adaptive generative music and barks; latency rules out generating anything on the critical path |
| Puzzle | Observe, hypothesise, test, solve | 5-30 min | Generated clue text and hints; the solution itself should be checked by code, not judged by a model |
| Narrative | Read, choose, see consequence | 30-90 min chapters | Free-text input mapped to bounded actions; generated prose over a state machine; in the future, generated video scenes for interactive film |
| Daily / async | One fixed challenge, share result | 2-10 min, once a day | One generated scenario per day, validated and fixed before release so everyone plays the same thing |
The pattern is consistent. Generation works best on the surface of a loop: the descriptions, voices, music and eventually moving images that dress each iteration. It works worst as the loop’s referee, deciding whether the player succeeded, because then the rules are whatever the model happens to say. The column for interactive film is mostly a future column. Generative video is not yet fast or consistent enough to sit inside a core loop, but a narrative format with chapter-length sessions has room for slower generation between choices, which is why it will likely arrive there first.
Why text-based generative games drift into chat
AI Dungeon, which Nick Walton released in 2019 on top of GPT-2, was the first time many people saw open-ended text generation as a game. You could type anything, and the story continued. It was striking, and it also exposed the problem every text-based generative game since has had to solve. When you can type anything and the narrator accepts it, there is no loop.
Run the three tests from earlier. Discernible: the narrator always responds, but outcomes aren’t tied to choices in any stable way, so you can’t tell what your action caused. Integrated: little persists that constrains later turns, beyond whatever is still in the context window. Learnable: there is no system to get better at, only a model to steer. What remains is a variable-ratio reward, prose that is occasionally wonderful, and the session ends whenever the player gets bored.
The same drift shows up in prototypes. Players start in character, then test the edges (“I find a rocket launcher”), then realise nothing resists them, then stop. The game had a narrator but no rules for the narrator to enforce.
Giving a generative game a firm loop
The fix is to write the loop first, in code, and let the AI model work inside it. A checklist for any text-based generative game:
- A goal with an end state. Escape the ship, solve the murder, survive five nights. Something the engine can check.
- A scarce resource. Time, health, money, trust. Every action spends something, so choices have a cost.
- A small set of verbs. Free text is fine as input, but it should be classified into a bounded set of actions the engine understands: move, inspect, talk, use, attack.
- State the model cannot overwrite. Inventory, location, flags and relationships live in code. The narrator reads them; it proposes changes, and the engine accepts or rejects them.
- A session shape. A run, a chapter, a day. A clean ending and a reason to come back.
In practice the turn loop looks like this:
type Action = { verb: "move" | "inspect" | "talk" | "use"; target: string };
async function turn(state: GameState, playerText: string): Promise<GameState> {
// 1. The model only interprets intent into a bounded action.
const action: Action = await classifyIntent(playerText, legalActions(state));
// 2. The engine decides what that action does, and what it costs.
const result = resolve(state, action); // pure function, no model
const next = { ...result.state, hours: state.hours - result.cost };
// 3. The model narrates the outcome it was given; it cannot change it.
next.log = [...state.log, await narrate(next, action, result.events)];
// 4. The engine checks the end of the loop.
if (next.hours <= 0 || isSolved(next)) next.phase = "ended";
return next;
}
Every piece of the loop vocabulary is visible here. The core loop is one call to turn. The scarce resource is hours. The end state is checked by the engine, not declared by the narrator. The model’s job is interpretation and description, where it is strong, and it never arbitrates. Generative audio fits at the same layer: a score that tracks hours and tension, rather than one the model improvises without reference to state.
Infinite Craft (Neal Agarwal, January 2024) is a useful example of how little structure a generative loop needs to work. The verb set is one action, combining two elements. The model generates the result, but each result is cached, so the same combination always gives the same answer and the space becomes something players can map and share. Discovery is the goal. That consistency turns generation into a system you can learn rather than a slot machine.
Takeaways
- Separate the core loop (seconds), the meta loop (what persists and grows) and the session loop (how a sitting starts and ends). Most weak designs are missing one of the three.
- Test every loop for being discernible, integrated and learnable. Compulsion loops fail the last test; meaningful loops pass all three.
- Each format, whether roguelike, idle, turn-based, real-time, puzzle, narrative or daily, implies its own loop and session length. Choose the format before the theme.
- AI generation belongs on the surface of a loop: text, voices, music and later video. Rules, costs and win conditions belong in code.
- Text-based generative games drift into chat when nothing resists the player. Add a goal, a scarce resource, bounded verbs, engine-owned state and a session shape.
- Make generated results consistent where you want them learnt, as Infinite Craft does by caching combinations, so players can build knowledge rather than just keep asking for more.
