Sub topic 9
Choosing the stakes: what failure takes away
This chapter assumes you know the difference between win, lose, and fail states, and that you can read short Python functions and enums. It also assumes you have met checkpoints and retry flow from the previous chapter. Here the question changes. Retry cost is how much effort it takes to get back into play. Stakes are what a failure removes from the player. You choose the stakes on purpose, and they shape the feel of the whole game.
What stakes are
A stake is anything the player owns, or is working toward, that a failure can reduce or destroy. Stakes come in a few kinds:
- Time. The player replays a section they already cleared.
- Resources. The player loses currency, ammunition, or consumables.
- Progress. The player loses levels, unlocked items, or story advancement.
- Position. The player loses ground, rank, or territory in a competitive game.
- Attachment. The player loses a character or a base that they built up and care about.
A game combines these. A platformer that restarts you at a checkpoint takes only time. A roguelike that deletes your run takes time, resources, and progress, and sometimes the character too.
Stakes matter because they set the emotional weight of every decision. When failure costs little, players take risks, experiment, and treat death as information. When failure costs a lot, players slow down, hedge, and feel tension, but they also feel more frustration when a loss seems unfair. Neither level is better in general. The right level depends on what experience the game promises.
Persistence: how long a loss lasts
The cost of a loss has two parts: its size and its persistence. Persistence is how long the loss remains in effect. Losing 50 coins that you can earn back in a minute differs from losing a character you spent forty hours building, even if both are "a loss".
Think of persistence as a scale with three broad zones:
| Zone | What is lost | Example | Typical effect on play |
|---|---|---|---|
| Transient | Seconds to minutes of progress | Respawn at the last checkpoint | Players experiment freely |
| Session | The current attempt, but nothing permanent | A roguelike run ends, unlocks stay | Players commit to a run and take measured risks |
| Permanent | Something kept across sessions | Permadeath of a saved character | Players play cautiously and care about each choice |
A useful point from this table is that persistence is separate from the lose state. The same event, "health reaches zero", can be transient in one game and permanent in another. The state machine you built earlier does not change. Only the consequences attached to the transition change.
Choosing stakes to match the promise
Start from the experience you want and work backward. Ask what the player should feel when they fail.
- If the promise is mastery through repetition, such as a precision platformer, keep stakes transient and retry fast. The player should lose seconds, not hours.
- If the promise is tension and meaningful choice, such as a survival game, raise stakes so decisions have weight. Failure should hurt enough that the player thinks before acting.
- If the promise is storytelling or exploration, keep stakes low. Failure that interrupts a story often feels like a punishment for engaging with it.
- If the promise is competition, the stakes are often social or positional, such as rank, so they are defined by the opponent as much as by the game.
A common mistake is mismatching the stakes and the promise. A relaxed farming game that deletes your save on a bad day breaks its own promise. A horror game that lets you respawn instantly with everything intact loses the dread it was built to create.
Implementing stakes as separate from outcomes
The earlier chapters kept the outcome logic in one function. Keep it that way. Do not scatter "what is lost" through the code that detects failure. Instead, put the consequences in a separate policy that runs when a fail or lose transition happens. This lets you change the stakes without touching the win and lose rules.
The example below defines three policies. Each one takes a player's saved progress and returns what remains after a failure.
from dataclasses import dataclass, field
@dataclass
class Profile:
coins: int = 0
unlocks: set = field(default_factory=set)
level: int = 1
def checkpoint_penalty(profile):
# Transient: the player keeps everything and only repeats a section.
return profile
def run_penalty(profile):
# Session: coins from this attempt are gone, but unlocks persist.
return Profile(coins=0, unlocks=set(profile.unlocks), level=1)
def permadeath_penalty(profile):
# Permanent: the whole profile is wiped.
return Profile()
POLICIES = {
"checkpoint": checkpoint_penalty,
"run": run_penalty,
"permadeath": permadeath_penalty,
}
def apply_failure(profile, mode):
return POLICIES[mode](profile)
saved = Profile(coins=120, unlocks={"double_jump"}, level=7)
for mode in POLICIES:
after = apply_failure(saved, mode)
print(mode, after.coins, sorted(after.unlocks), after.level)Running this prints:
checkpoint 120 ['double_jump'] 7
run 0 ['double_jump'] 1
permadeath 0 [] 1The same failure produces three different outcomes. Because the policy is a plain function in a table, you can swap it per difficulty setting, per game mode, or per playtest build.
Partial and graduated loss
Stakes do not have to be all or nothing. Graduated loss takes a fraction of what the player has, so a failure hurts in proportion to how much was at risk.
- Dropping resources at the point of death. The player loses carried currency but can recover it by returning to the spot, as in games that leave a retrievable pile. This turns the loss into a goal, which keeps the player engaged rather than discouraged.
- A percentage tax. The game takes a fixed share of coins, for example 25%. Rich players lose more in absolute terms, which keeps the penalty meaningful at every stage.
- Durability or wear. Equipment degrades on failure and needs repair. The loss is real but recoverable, and it adds a small resource sink.
- Reduced rewards. The player keeps progress but earns less for a failed attempt.
A flat penalty has a known problem. Fifty coins is severe early and trivial late. A percentage scales with progress, but it can feel punishing to a player who has saved up for a purchase. Pick the formula against the economy you actually have, not in the abstract.
def tax_on_failure(coins, rate=0.25, floor=0):
# Take a share of coins, but never go below a minimum.
lost = int(coins * rate)
return max(coins - lost, floor)
print(tax_on_failure(100))
print(tax_on_failure(10))This prints 75 and 8. For a small balance, the integer cast rounds the loss down, so a player with 10 coins loses 2 and keeps 8. Check rounding at both ends of your economy, or tiny balances will lose nothing at all.
Making risk visible
Stakes only motivate a player who knows what is at risk. Hidden penalties feel like traps. Show what is on the line before the decision, not after the failure.
- Display the carried resources that would be lost.
- Mark save points and say whether they bank progress.
- Warn before an irreversible choice, such as a boss gate with no return.
- State the permadeath rule in the mode name or menu, not in a tooltip the player may never read.
This ties to fairness. A loss the player expected and accepted feels fair. A loss they did not know was possible feels cheap, even if it is mild.
Persistence across runs: meta-progression
Many games soften high stakes with meta-progression, which is progress that survives the loss of a single run. The player may lose the current attempt, but they keep unlocks, knowledge, or a currency that makes the next attempt easier or more varied.
This does two jobs. It keeps a loss from feeling wasted, because something was gained even in failure. It also lets you keep session stakes high, since the player always leaves with something.
There are risks. If the permanent upgrades are too strong, the early game stops being a challenge and the stakes disappear from a veteran's point of view. If they are too weak, the player sees no point in the loss softening and the feature adds nothing. Tune it so that skill still matters more than accumulated power.
Common errors
- Raising stakes to create tension without raising readability. High stakes need clear causes of failure. A harsh penalty for an unclear failure produces anger.
- Punishing the same mistake twice. Taking health, then a life, then coins, for one event stacks costs the player did not anticipate.
- Flat penalties that ignore the economy. A cost that matters in hour one becomes noise by hour ten.
- Mixing a hard penalty with a long retry. Lost time and lost progress combine. A permadeath game with a long unskippable intro before each run is much harsher than either feature alone.
- Treating stakes as a difficulty slider only. Difficulty changes how often the player fails. Stakes change what failure costs. Tune them separately.
Checking your stakes
You cannot judge stakes from the design document alone, because the same penalty reads differently to different players. Use observation. Watch for players who stop taking risks after one loss, which suggests the cost is too high. Watch for players who ignore a threat entirely, which suggests it is too low. A later chapter covers how to run these tests. For now, record two things for each failure mode in your game: what it takes away, and for how long.
Exercise
A roguelike ends a run when health reaches zero. The player keeps unlocked characters but loses all items and coins from that run. In the terms of this chapter, which persistence zone is this, and what single change would move it to the permanent zone?
Show answer
It is the session zone, because the current attempt is lost while unlocks persist across runs. Deleting the player's unlocks and saved profile on death, as the permadeath policy does, would move it to the permanent zone.
Exercise
A game uses a flat penalty of 50 coins on every death. Players report that deaths feel harsh in the first hour and meaningless in the tenth. Name the problem and give one fix with its trade-off.
Show answer
A flat penalty does not scale with the player's wealth. A percentage tax fixes this because the loss grows with progress, but it can feel punishing to a player saving for a purchase, so you might add a floor or a cap, or let the player recover dropped coins at the place of death.