Ambient Barks: Telling a Game Story Without Stopping Play

The demo is playing itself. Press a key or a button to take over.
Standing in her hearing is an event every tick, but she rolls only when she is free: half the rolls pass. A line shows for 2.5 seconds, then she is quiet for 8; a failed roll waits 3. The last 3 lines, greyed at the top, are not said again, in either pool.
Try it: Shake a hive while she is talking or while the grey bar runs: the shake is dropped, and no late answer comes after the silence. Stay close and watch the die: a red roll starts a short wait, a green one a line. The bee is in both lists, so once she has said it, it is greyed in both.
←→ walk Space shake a hive
A game's world can tell its story while the player keeps playing: a line said in passing, at the moment it fits, and not said twice in a row. Nobody has to stop and read. The old beekeeper in the game above talks to whoever comes near her hives, by a few plain rules that decide when she speaks and when she keeps quiet. This lesson walks past her, and then you take a wall of text from your own game and cut it into lines that wait for their moment.
Also in this lesson 5 things to read up on 3 questions to check yourself
The idea
A short line that a character calls out on her own is called a bark. It is the opposite of a page of text before the game begins. A bark is small, it belongs to a place and a moment, and the player hears it with her hands still on the controls.
Three rules make barks tell a story instead of making noise:
- The right moment. A line is said when what it is about is in front of the player. A line about something that is over is worse than none.
- One at a time, then quiet. A character says one line, then stays silent for a while. The silence is what makes the next line worth hearing.
- Not twice in a row. The last few lines are left out of the choice while there is something else to say.
A bark can be missed, and that is part of the deal. So it is the place for colour, hints and the feel of a world, never for the one fact a later scene cannot do without.
How it works
- Walk into her hearing and keep walking. The dotted line on the ground lights up. Soon she says something: a picture in a bubble, for 2.5 seconds. You never had to stop. Then a grey bar runs over her head while she is quiet for 8 seconds.
- Stay close and watch the die at the top right. Standing in her hearing is an event on every tick, but she rolls only when she is free. A green mark starts a line. A red one starts a short wait of 3 seconds, shown as a red bar, before she rolls again. Each roll passes with a chance of one half. Without that wait she would roll sixty times a second and speak almost at once, every time.
- Watch the lists at the top. The lines she said last are greyed out, the last 3 of them, and she picks from the rest. Her friendly list has five lines, so you hear one she has not said lately, and never the same line twice in a row.
- Shake a hive while she is speaking, or while the grey bar runs. A red cross: the shake is dropped. When her silence ends, she does not come back to it. If shakes were kept and played later, she would talk about bees that calmed down long ago.
- Now do it for your game. Take a wall of text you were going to show before play, and cut it into single facts, one line each. For every fact, name the moment in play when it is true or in sight: a place, an event, a character standing near it. Each fact becomes a line in the pool of that moment. Mark the facts a later scene needs. Those also get a place the player cannot miss, such as a scene that always plays.
What goes wrong
The shortcut is the wall. You ask your AI to introduce the world and its story, and it does what was asked: before the player may move, there are screens of history, names and places. The player presses on to get to the game. The facts are gone before she has seen any of the places they are about, and afterwards the world is silent while she plays.
When you then ask for the world to talk during play, the next shortcut follows. Every character answers every event at once, so ten lines arrive together and none is understood. Events that came during a line are kept in a queue and played late. And the pick is random, so in a small pool the same line comes back again and again, which sounds broken.
You notice the wall by counting: how many presses go to reading before the first press goes to playing? You notice the noise by standing next to a character for a few minutes and writing down every line with the time you heard it. Two lines at once, a line about something that is over, or one line twice in a row: each one is a rule that was left out.
Tell your AI
My game tells its story in [the intro, or these scenes]. I want part of it told in passing, while the player plays. Do not write any lines yet.
1. Cut [the text] into single facts, one line each. Mark every fact a later scene needs, such as a quest, a clue or an ending that reads it. Each marked fact must also be told somewhere the player cannot miss, because a line said in passing can be missed.
2. For every other fact, name the moment in play when it is true or in sight: a place, an event, or a character nearby. Group the facts into pools by event, and give every line an id of its own.
3. For each event, say whether it happens once or is true on every frame, such as the player standing near. Say which event wins when both come at the same time.
4. Use these rules: one line at a time per character, a silence after each line, a dice roll with a wait after a failed roll, events that come during a line or a silence are dropped and never queued, and none of the last few lines is said again while another line fits.
5. Draw the states and moves (ready, speaking, staying quiet) and write one test for every move. Then write a test that plays [ten] minutes near each character and prints every line with its time and its event, and after that: any line said twice in a row, any line that started during another, and how often each pool was heard. Run the tests and show me their output.
Try it
- In the game above, wait until the grey bar runs, then walk out of her hearing and back in. She stays quiet: the silence belongs to her and goes on counting, whoever comes and goes.
- Stand at a hive and shake it every few seconds. You hear her friendly lines and almost never the hive's own. Standing near her is an event on every tick, so when her silence ends it takes the free moment before a shake can. Only a shake on that very tick gets a hive line. In your own game, an event that is always true crowds out a rare one, unless you decide which one wins.
- Open your own game and count the screens of text before the first press that plays. For each one, write the place in play where it could be said instead, or why it has to stay.
Read up
Where to go deeper: the pages of ours this lesson builds on, and what others have written about its point.
The barks of this lesson as a whole blueprint: a crowd that talks over itself, lines that queue up and play late, lines remembered by id across pools, and a test for each.
How to Pace a Game Story Without Boring Players
Where talk piles up on some paths and not on others: limits you choose, such as no more than two story scenes in a row, checked on every path of a model, with the checker's real output.
The other way to tell a story at its place, for what must not be missed: a scene that takes control, always ends, counts a skip as seen and does not play twice by accident.
AI-driven Dynamic Dialog through Fuzzy Pattern Matching. Empower Your Writers!
A talk on picking one line out of thousands by matching facts about the world, so that characters remark on their circumstances, remember what happened and go from special cases to general ones.
Beyond Branching: Quality-Based, Salience-Based, and Waypoint Narrative Structures
An article that names salience-based narrative, where the game itself picks the piece out of a large pool that fits the moment best, and sets it beside stories in which the player picks what comes next.
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.
A guard in your game calls out short lines as the player walks past. Which of these facts must not be told only in such a line?
Next lesson Detective Game Clues That Add Up: A Case the Player Can Solve
How useful was this page?
Nobody has rated this page yet.