Detect the dead end where nothing the player can afford leads to the goal
A player spends the last food on an upgrade, and now every path to the story goal needs something they can no longer earn. The game looks fine and is lost. Here is how to search the player's real options ahead, find a way through if there is one, and say so when there is none.
Why this works
A game is unfair when it lets a player lose without knowing. Instead of guessing from what the player holds, try the real options one step after another and look for any road to the goal. Searching shortest-first also hands you the cheapest way out.
When not to use it
Skip it when the world is huge or ruled by chance, because the search then grows too big or gives wrong answers. Use hand-placed safety nets there, such as a shop that always sells the key item, or let the player start over.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- A diagram of every state
- 30 lines of example code with 5 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "Detect the dead end where nothing the player can afford leads to the goal" (read_entry detect-a-dead-end-no-affordable-action-reaches-the-goal) in my game. Build it step by step, and show me how you checked that it works.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP