Spielerando

How to Write a Game Ending Players Remember

A memorable ending shows the player what their own choices led to. Have your AI model your promises, choices and endings, and run a checker that shows the exact path to each ending, so that no ending exists on paper only.

Why does my ending feel flat?

In a small lighthouse game, the player spends hours rebuilding a town, befriending the ferry captain and deciding whether to forgive a thief. The last scene is a storm, a fight and a text screen: "And so the town was saved."

The captain is missing. The thief is not mentioned. Every player gets the same last line.

Ask an AI for an ending and it writes an ending in general. It does not look back through your game unless you tell it to. And if the game never stored those choices, it has nothing to look back at. Worse, you can write a lovely ending that no path ever reaches.

What makes an ending stick?

  • It keeps promises. Every mystery, threat and friendship you set up gets an answer.
  • It shows the result. Let the player see the rebuilt town, with no text telling them about it.
  • It reflects this player. The ending knows who they forgave and who they let down.
  • It costs something. Something is lost along with what is won.
  • It echoes the start. The game opens on a dark lighthouse and ends with its lamp lit.

A checker cannot judge any of that. It can check the parts below.

Which facts and rules can a checker test in an ending?

  • Facts: every big choice, and every promise and whether it has been answered.
  • Every ending can be reached. At least one path leads to each ending.
  • Every promise gets an answer. On every path, by the time the game ends.
  • The ending only uses what happened. It never mentions something that did not happen on this path.

You do not need many endings. One shared final scene with small parts that change can feel more personal than three separate ones. The game has to remember those choices, so read choices that matter.

What does a real check look like?

"Can this ending be reached?" is a question about all paths, so we ask TLC backwards. We add a rule that says "no path reaches this ending". If TLC breaks that rule, the trace it gives is a path to the ending. If the rule holds everywhere, no path gets there.

Here is the lighthouse as a model. On the storm night, the player helps the captain or forgives the thief. The lamp ending follows either one. The bakery ending needs both.

We ran this invented story through TLC 2.19 on 2 November 2026. This is TLC's real output. We only left out its housekeeping lines and put each step on one line. First the bakery ending:

Model checking completed. No error has been found.
8 states generated, 6 distinct states found, 0 states left on queue.

For once, "no error" is bad news. The rule "no path reaches the bakery ending" held in all 6 states. So no player can ever see that ending. That result is the proof. The lamp ending, for comparison:

Error: Invariant NoPathReachesTheLampEnding is violated.
State 1: scene = "Start", helpedCaptain = FALSE, forgaveThief = FALSE
State 2: scene = "Storm night", helpedCaptain = FALSE, forgaveThief = FALSE
State 3: scene = "Help the captain", helpedCaptain = TRUE, forgaveThief = FALSE
State 4: scene = "Lamp ending", helpedCaptain = TRUE, forgaveThief = FALSE

Here TLC broke the rule, and the trace is a real path to the lamp ending.

The fix: after helping the captain, the player can still forgive the thief. We ran TLC on the bakery ending again.

Error: Invariant NoPathReachesTheBakeryEnding is violated.
State 1: scene = "Start", helpedCaptain = FALSE, forgaveThief = FALSE
State 2: scene = "Storm night", helpedCaptain = FALSE, forgaveThief = FALSE
State 3: scene = "Help the captain", helpedCaptain = TRUE, forgaveThief = FALSE
State 4: scene = "Forgive the thief", helpedCaptain = TRUE, forgaveThief = TRUE
State 5: scene = "Bakery ending", helpedCaptain = TRUE, forgaveThief = TRUE

Now the rule breaks, which is what we want. The path Start, Storm night, Help the captain, Forgive the thief, Bakery ending exists.

Do I have to read any of this?

No. You never have to read the model or the checker's output, because your AI writes it, runs it and tells you the result in plain words. TLA+ is a language for modelling, and TLC is the tool that checks a model. If TLC cannot run on your computer, your AI can get a ready-made checker through our MCP server and run it in your project. Spielerando never looks at your story.

A result like this means your rules held on the paths in the model. It does not mean your ending is good, and it says nothing about rules nobody wrote down.

Paste this to your AI

Do not just tell me my endings work. Model them and check them with a tool.

1. Read the whole story, and story-bible.md if it exists. If you cannot see my files, ask me to paste them.
2. List these, and quote the line where each one is set up: every promise the story makes, every big choice, and every important character and where they end up.
3. Write a TLA+ model of the story in a folder called story-check.
   - Facts, as state: every big choice, and every promise and whether it has been answered.
   - Steps: every scene and choice, with what it needs and what it changes.
   - Rules, as invariants: by the time the game ends, every promise has been answered, on every path. An ending never mentions something that did not happen on this path.
   - To check that each ending can be reached, add a temporary rule for it saying that no path reaches it, and run TLC. If that rule breaks, the trace is a path to the ending. If it holds, no path reaches that ending, so tell me.
4. Run the TLC model checker on the model so that it walks every path. If TLC cannot run here, use get_recipe with story-model-check through Spielerando and run that checker in this project. If you can run neither, tell me, and do not claim that anything was checked.
5. For each broken rule, show me the exact path of scenes, in plain words. For each ending, list the exact choices that lead to it. If nothing leads to an ending, say so.
6. Suggest one shared final scene with small parts that change according to what the player did. Use only facts the game already stores, and show me where each one is stored. Give it an image that echoes the opening scene, and quote the line you mean. Say "This is new" for anything new. Wait for me to choose.
7. After each change, update the model, run the checker again and show me the result.

Report only which rules held, how many states were checked, which endings have a path and whether the check was cut off. Never tell me an ending is good. If you cannot tell whether an ending can be reached, say "I do not know". Do not say that it can.

Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP

How to check it worked

  • Play the path it gave you. Follow the AI's list of choices and play each ending to the end.
  • Compare two endings. Would two players who compare notes feel they played different games?
  • Load an old save. Load a save from just before the end. Do choices from hours earlier still show up?
  • Ask a tester the next day. What do they remember? What never got an answer? No checker can tell you that.

Sources

Last updated: 2026-11-02