"You reach a door. Do you open it, or walk on?" Children love stories where they decide what happens next. Writing one is even better, and it hides a real piece of programming: every choice is an "if", every path has to lead somewhere, and the whole thing needs testing before anyone else reads it.
This activity suits children aged roughly 7 to 12. You need some index cards or paper cut into pieces, a pencil and an afternoon. Younger children can tell the story aloud while you write; older ones can do it all themselves.
How a story with choices works
The story is split into short parts, one per card. Most cards end with a choice that sends the reader to another card:
- "If you open the door, go to card D."
- "If you walk on along the path, go to card E."
Some cards are endings: "You found the hidden garden. The end."
Ask your child what this looks like. A computer program does the same thing: if something is true, do this; otherwise, do that. A story with choices is a program that runs inside the reader's head.
Plan the story map first
Before writing a single sentence, draw the map. This is the step that makes the rest easy.
- Draw a box at the top and write "Start" in it, with a few words about the beginning: "A cat finds a gate in the wall."
- From that box, draw two arrows to two new boxes, one for each choice.
- From one or both of those boxes, draw two more arrows. Stop when you have three or four endings.
- Give each box a letter: A, B, C… Letters are easier than numbers when cards get shuffled.
Keep the first story small: one start, two or three choices, three or four endings. A big map is exciting, but it is easy to lose track of it.
Write one card at a time
Now each box becomes a card. A few tips:
- Three to five sentences per card. Enough to picture the scene, short enough to keep the story moving.
- End each card with a clear question and the choices underneath, each with the letter of the card to go to.
- Make the choices really different. "Open the red box or the blue box?" is less fun than "climb the tree or follow the footprints?"
- Not every ending has to be happy, but it should feel like an ending. "You decide to go home for tea" works well.
When the cards are ready, the family reads. One person reads a card aloud, the listeners choose together, and the reader finds the next card. Everyone hears a different story depending on their choices, which is a lovely reason to play again.
Test every path
This is the part where your child thinks like a programmer. Before the story is "finished", they follow every possible path from the start, one at a time, with a finger on the map. Ask them to tick each ending when they reach it.
Things to look for:
| Problem | What it looks like | How to fix it |
|---|---|---|
| Missing card | A choice says "go to card G", but there is no card G | Write card G, or change the letter |
| Dead end | A card has no choices and isn't an ending | Add choices, or turn it into a proper ending |
| Endless loop | A path goes back to an earlier card and can never get out | Add a choice that leads somewhere new |
| Unreachable card | No arrow leads to it, so nobody ever reads it | Add an arrow to it, or remove it |
A loop isn't always a mistake. "Go back to the crossroads" is fine, as long as the crossroads offers a way forward. A loop with no way out, though, is the story version of a program that never stops.
Testers in real software teams do just this: they try every route through a program to see whether any of them breaks. Counting the paths is a good extra challenge: with two choices on every card and two levels of choices, how many endings are there?
Make it harder
The ages here are only a rough guide; every child is different.
- Around 7 to 8: one or two choices and three endings. Your child tells, you write.
- Around 9 to 10: a full map with four or five endings, written by your child and tested by a sibling or a grandparent.
- Around 11 to 12: add something to remember. "If you picked up the key on card C, go to card H. If not, go to card J." The reader has to keep track of what they are carrying. This is what programmers call a variable: a value the program remembers and checks later.
You can also roll a die at one card ("1 to 3: the bridge holds; 4 to 6: go back") to add a little chance.
In Dologi's Space topic, the "Switch the tracks" puzzles work like a story map: at every switch the train takes the open branch, and children set the switches so it reaches the station with the flag. Following each branch to its end in their head is the same skill as testing every path of a story.
In short
- A story with choices is like a program: every choice is an "if", and every path must lead somewhere.
- Draw the story map first, keep it small, and give each box a letter.
- Write one short card per box, ending with a clear question and choices.
- Test every path for missing cards, dead ends and endless loops before the family reads it.
Read more: Loops and conditions for children: learning through skipping and songs
