Detective Game Clues That Add Up: A Case the Player Can Solve

The demo is playing itself. Press a key or a button to take over.
The blueprint's own example case. A fitting pair is written down as a new picture, which can be connected like a clue. After 3 misses in a row the journal makes one pair you already hold blink, never a clue you have not found. The oil fits nothing and stays anyway. The seal works only once the coin and the cellar are worked out.
Try it: Press the seal before anything is worked out: it shakes and no red pip is added. Connect three pairs that do not fit and watch which two pictures blink. Connect the boots and the cloak twice: the second time nothing is counted, neither a find nor a miss.
←→ walk, move the frame Space pick up, connect X open the journal
A mystery in a game can only be solved if every conclusion it asks for rests on clues the player can find, and none of those clues can be missed for good. Then the answer comes from what she connects, not from a scene that tells her. This lesson draws the case in the game above as a tree, from its two conclusions down to the things in the room, takes one clue away at a time, and hands that check to your AI.
Also in this lesson 4 things to read up on 3 questions to check yourself
The idea
Somebody has emptied the honey store in the game above. Six things lie around the room: muddy boots, a wet cloak, a torn letter, a page from a ledger, the cellar key and a can of lamp oil. The journal keeps each one you pick up. When you connect two that belong together, it writes down what follows from them as a new picture, and that picture can be connected like a clue. The seal closes the case, and it works only once two things are worked out: that somebody owed money, and that somebody got into the cellar.
That is what a solvable case is made of. Each conclusion the ending needs is made from two things the player holds, and each of those is a clue she picked up or a conclusion she made before. Follow any conclusion down and you end at things lying in the room. If a branch ends at nothing, or at a scene that simply tells her, the player is not solving the case. She is waiting for it to be solved.
The other half is about what the player can lose. A clue that can be missed for good takes its branch with it. Nothing in the case looks wrong: the seal just never works, or the ending names an answer she could not have reached.
How it works
Do this with the game above and a piece of paper.
Play the case once. Pick things up as you walk, then open the journal and choose two pages to connect. A pair that fits adds a picture on the right-hand page: the boots and the cloak give a marsh, so whoever it was came over the marsh. Press the seal before the coin and the cellar door are there: it shakes and a red cross shows, but no red pip is added. Closing too early is not counted as a miss.
Draw the tree. Write the two conclusions the seal needs at the top, and under each the two things it is made of, until every branch ends at something you can pick up:
- into the cellar: the cellar key and "came over the marsh", which comes from the muddy boots and the wet cloak
- owed money: the torn letter and the ledger page
- the lamp oil belongs to no branch. It is a false trail, and the journal keeps it anyway.
Mark what can be missed for good. In the room above, nothing can. All six things lie in one room that stays open, and each waits until you take it. In your own game, look for a room that locks behind the player, a line that is said once, a thing she can sell or use up, a person who leaves.
Take out one clue at a time and see what falls. Cross out the ledger page: the coin can never be worked out, and the seal never works. Cross out the boots, the cloak or the key, and the cellar door goes. Cross out the oil, and nothing falls. The blueprint has this as its whole-case check: it plays the connections forward from the clues that are left and names every needed conclusion that can no longer be made. On the blueprint's page, Z3 confirms it for this case: every clue but the lamp oil is needed.
Give every needed clue that can be missed a second place. A designer of tabletop mysteries asks for at least three clues for every conclusion, because each clue is a plan and the others are the backup plans; his article is in the reading list. The case above has one pair per conclusion, so it holds only because its room cannot lose a clue.
There is a hint, too. After 3 connections in a row that miss, the journal makes 1 pair blink that you already hold and that still leads somewhere new. It names only what you hold, so it can help a player who is stuck, but not one who missed a clue: a hint cannot point at a page she never picked up.
What goes wrong
Ask an AI for a mystery and it starts at the answer: the steward emptied the store. Then it fills a room with things that look like clues, a letter, a footprint, a key, and writes a last scene in which the steward confesses. Each piece reads well. But none of the clues points at the steward. The player can connect everything and still only learns who did it when the story says so.
In the journal's terms, the case asks for a conclusion that no pair makes. Add one like that to the case above, and the whole-case check names it even with every clue in hand. In a game without such a check, nobody notices: the last scene plays, and the confession covers the gap.
The same shortcut has a second form: a needed clue in a single place the player passes once. The AI played the story in the order it wrote it, so the clue was always found.
You notice both by asking, for each conclusion the ending names, which two things it is made of. If the answer is a scene and not two things the player holds, she is told, not solving. And if a needed clue has only one place to be found, ask what happens to a player who walks past it.
Tell your AI
I want the mystery in my game to be one the player can solve herself: [the mystery and its answer in one or two sentences].
Before you change anything:
1. List every clue the player can find, with where she finds it and whether she can miss it for good: a room that closes, a line said once, an item she can sell or use up, a person who leaves.
2. List every conclusion the ending needs. For each, name the two things it is made of: clues, or conclusions made earlier. Draw it as a Mermaid diagram from each conclusion down to the clues.
3. Mark every conclusion that is made of nothing the player holds, for example one that a confession or a narrator simply states.
4. Write a check in code that plays the case forward from the clues: once with every clue, then once without each clue that can be missed. For each run it prints the clue left out and every needed conclusion that can no longer be made. Run it and show me the output as it came.
5. For every clue whose loss breaks the case, suggest a second place to find it, and for every conclusion from step 3, a pair of clues that could make it. Wait for my choice.
Do not tell me the case is solvable. Show me the check's output.
Try it
- In the game above, pick up only the boots, the cloak and the key, and connect them: the marsh, then the cellar door. Press the seal: it shakes. The coin is missing, and the letter and the ledger page are still lying in the room.
- Pick up everything except the ledger page, work out the marsh and the cellar, then connect three pairs that do not fit. Nothing blinks: the journal hints only from what you hold. Now go back and pick up the page, and the letter and the page blink at once.
- Draw the tree of your own game's mystery. Next to every clue at the bottom, write where the player finds it and whether she can miss it for good. Every clue that is needed and can be missed is the next thing to fix.
Read up
Where to go deeper: the pages of ours this lesson builds on, and what others have written about its point.
How to Make a Game Story Without Errors or Plot Holes
Whether the clues really prove the accusation: a check over the days of a week that finds the one changed line that lets a lie stand, and a path on which a letter is used that was never found.
A checker for whole stories: who knows what and who holds what, walked in every order, with a goal that must stay reachable and the exact path of scenes on which it is lost.
The journal of this lesson as a whole blueprint: the same pair twice, a deduction used too early, the whole-case check, and the TLA+, Z3 and Lean checks run on it.
A tabletop designer's rule of at least three clues per conclusion, why the person who knows the answer cannot judge what is obvious, and why he calls red herrings overrated.
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.
In a mystery game the last scene names the culprit, but none of the clues the player can find points at that person. What is wrong with the case?
Next lesson Game Lore in the Order the Player Finds It, Not the One You Wrote
How useful was this page?
Nobody has rated this page yet.