Game Lore in the Order the Player Finds It, Not the One You Wrote

The demo is playing itself. Press a key or a button to take over.
Three stories, in 3, 2 and 1 pieces. A piece is new until you read its story; the red number on the book counts the stories with something unread. Looking at a carving you already have changes nothing. A story gets its gold star only when every piece is found and read.
Try it: Look at the hive carving, open the book and read: the yellow mark goes. Look at the same carving again: it only glows grey, and its page gets no new mark. Find the hive's next piece: the mark comes back, for that one piece only. Read the hive after its third piece and watch the star.
←→ walk, pick a story X open the book Space look, read
In a game the player learns the story in her own order, and often not all of it. A scene that leans on something she may not have seen lands on nothing, and a scene that tells her what she was meant to find later takes the finding away. This lesson walks the cave above out of order, reads what its book knows about her, and then has your AI check every scene against what the player can have seen by the time she gets there.
Also in this lesson 5 things to read up on 3 questions to check yourself
The idea
You write a story from its beginning. The old hive's story in the game above was written that way, in three pieces: the hive, the wasp, the bee. On the cave wall they stand apart, with a storm and a flower between them, and nothing makes her look at them in that order, or at all.
Henry Jenkins puts the difference plainly: the author of a film or a book has a high degree of control over when we receive a piece of information, while a game designer can only partly control it, by spreading the information across the game's space. Emily Short writes about letting the player get three pieces of information in any order, and why a simple branching script needs a lot of repetition for it. Both are in the reading list.
So the order in which the player learns things belongs to each play, not to your script. A scene that needs her to know something has to ask the game whether she does. In the game above, the book is the place that knows: for each story, which pieces she has found and which she has read.
How it works
Play the cave above out of order, then write down what your own scenes lean on.
Learn the end first. Walk past the carvings near the entrance without looking, all the way to the bee, the hive's last piece, and look at it. A red number appears on the book in the corner. Open the book: the hive's page counts one of three, and its last slot holds the bee while the two before it stay empty. Its title shows as well, because this book shows a story's name once 1 piece is found. A name is something the player learns too: a title that says how a story ends gives away the carvings she has not seen.
Read it, then look again. Read the hive's page and the yellow mark goes. Look at the bee once more: the carving only glows grey, and nothing in the book changes. Walk back and look at the wasp: the mark comes back, for that one piece only. The book keeps two lists for every story, found and read, puts the pieces in the story's order and leaves the gaps open.
Leave with nothing. Walk to the far end of the cave without looking at anything. The cave lets you out with an empty book, and the game above starts over. Every scene after a place like this has to work for a player who walked straight through.
Write down what each scene leans on. Take the scenes that come after the cave in your story, or make some up: a character who says the wasps came back, a door whose riddle is the storm's second picture, a last scene that names the old hive. For each, write the piece it leans on, and whether it needs her to have found it or to have read it. Found means she stood in front of it; read means she opened it. A line that repeats a detail from a page's text needs read.
Give each scene an answer for the player who lacks the piece. There are three: the scene waits until she has it and says why, it has a second version for a player without it, or it hands her the piece itself. What it may not do is speak as if she knew. A scene that tells the end of a story before she has found it is the same mistake turned round: put the reveal after its pieces, or ask the book first.
What goes wrong
The shortcut is every page of lore unlocked from the start. The AI writes the world's history in one go, in reading order, puts all of it in the book, and writes the later scenes as if the player had read it, page one before page two. Each scene is right in the order the AI wrote it.
Picture the cave above with that book. You open it on the way in, and all three stories are full, with no mark anywhere. The red number has nothing to count, the carvings have nothing to give, and the book can no longer tell any scene what she has seen. A character who mentions the wasps is right for the AI and a riddle for a player who never looked at the wall.
The quieter form: the book does keep pieces, but the scenes never ask it. The AI wrote each scene alone and took for granted the order it wrote them in.
You notice it by taking one late scene and asking your AI what the player must have seen for it to make sense, and where the game checks that. If the answer is that she will have read it by then, the scene leans on the order of your script, not on the game. Then play to that scene while skipping everything you can skip, and listen to what it says.
Tell your AI
I want every scene in my game to work in the order the player really learns things, not in the order I wrote them: [your game and its story in one or two sentences].
Before you change anything:
1. List every piece of story the player can find: pages, carvings, overheard lines, items with a text. For each, say where it is, whether she can skip it, and what in the game records that she found it and that she read it.
2. List every scene and line that leans on one of those pieces. For each, name the piece and whether the scene needs it found or read.
3. Write a check in code that walks every order in which the player can reach each scene, including the orders in which she skips what can be skipped. For each scene it prints the pieces it leans on and whether she always has them by then. If you cannot write the walk yourself, use the story-model-check recipe (spielerando.com/en/recipes/story-model-check). Run it and show me the output as it came.
4. For every scene that can be reached without what it leans on, suggest one of three answers: it waits and says why, it has a version for a player without the piece, or it gives her the piece itself. Wait for my choice.
5. Make sure the book or log starts empty, except for what the opening scene gives.
Do not tell me the story reads well in order. Show me the check's output.
Try it
- In the cave above, look at the bee before anything else, then open the book. The hive's last slot is full and the two before it are empty: the book keeps the story's order, and you brought your own.
- Look at the hive carving, read its page, then look at the same carving again. It glows grey and no mark comes back. Then find the wasp, and the mark returns for that one piece.
- Take one late scene of your own game and write down every piece of lore it leans on. For each, ask: can the player arrive here without it? If she can, write what the scene says to her then. Your AI's facts and scenes can also go into the checker on this site, which walks every order in your browser.
Read up
Where to go deeper: the pages of ours this lesson builds on, and what others have written about its point.
The book of this lesson as a whole blueprint: an update that makes a finished entry unfinished, an old save brought in line with the game, the badge that stops at a cap, and the tested code.
How to Pace a Game Story Without Boring Players
Where talk piles up in the order of scenes: a checker that counts story scenes in a row on every path and finds the one optional scene that breaks your limit.
How to Set World Rules and Lore Your AI Will Not Break
Which lore is a rule of your world and which is only what people in it believe, so that a character can be wrong without it being a mistake, and a checker that holds the rules.
Game Design as Narrative Architecture
An essay on stories told through space: a story handed out as information to be found, and why what the story needs must be placed in more than one spot.
Beyond Branching: Quality-Based, Salience-Based, and Waypoint Narrative Structures
Three ways to build a story from pieces that open up by what the player has done or knows, and what they handle better than a branching script, such as information found in any order.
Check yourself: three questions
Each answer is checked and explained at once. The questions are part of the quiz, so they count for your Game Coder IQ like any other.
Late in your game, a character talks about a carving in a cave as if the player knew it. The player walked through that cave without looking at anything. What should the scene do?
Next lesson Multiple Game Endings That Follow From What the Player Did
How useful was this page?
Nobody has rated this page yet.