Sub topic 7
Communicating outcomes to the player
This chapter covers how a game tells the player that something ended, why it ended, and what they can do next. It assumes you have read the earlier chapters on win, lose, and fail states and on fairness and readability of failure. It also assumes you can read short Python functions and enums.
A well-designed outcome can still feel unfair if the player never understands it. The state machine may be correct, with the right precedence and a fair checkpoint. If the screen goes black with no explanation, the player will blame the game. Feedback is the layer that turns a logical result into something the player can understand and learn from.
What an outcome message must do
A good outcome message answers four questions in order:
- What happened? The player needs to know if they won, lost, or only stumbled.
- Why did it happen? This is the cause: which enemy, which hazard, which rule.
- How bad is it? The player needs to know what was lost, such as a life, progress, or the whole run.
- What now? The player needs the next action: retry, continue, quit, or collect a reward.
Most poor outcome screens skip the second question. A "Game Over" banner answers the first and third questions and leaves the player guessing about the cause. Players who cannot find the cause cannot improve, so they either quit or retry blindly.
The same four questions apply to wins. A victory screen that shows only "You win" misses the chance to say what the player accomplished and what comes next.
The outcome timeline
Feedback is not one moment. It is a sequence, and each stage has a different job.
Before the event: warning
Warnings make failure readable ahead of time. Examples are a low-health heartbeat sound, a screen edge that turns red, a countdown that accelerates, and an enemy wind-up animation. A warning gives the player a chance to avoid the outcome. If they still fail, they know the game told them.
The warning should match the danger. A warning that fires constantly stops meaning anything, and a warning that arrives after the point of no return is useless. Test that the player has enough time to react, not just enough time to notice.
At the event: impact
The moment of failure or success should be unmistakable. Use several channels at once, such as animation, sound, camera, and haptics. If the player is looking elsewhere on screen, a single visual cue can be missed. A hit that costs a life but only changes a small icon in the corner will feel like it came from nowhere.
Right after: cause and cost
Show the cause while the player's memory of it is fresh. Common techniques:
- A kill cam or replay that shows the last second from the attacker's viewpoint.
- A death recap that names the source ("Fell from height", "Poison, 3 stacks").
- Freezing the frame on the hazard and highlighting it.
- A short text line tied to the object that caused the failure.
State the cost in concrete terms. "Lives: 2 remaining" is clearer than a lost heart icon. If the failure also resets progress, say how much: "Returning to checkpoint 3".
After: next action
Offer the next step immediately, with one default choice. For a recoverable fail state, the default should be to retry. For a lose state, offer a clear choice, such as retry, return to menu, or change settings. Do not make the player hunt for the retry button. Delays here add to the recovery cost covered in the retry chapter.
Matching the tone to the type of outcome
Win, lose, and fail states should not feel the same. Players use the presentation to tell them apart.
| Outcome | Purpose of feedback | Typical presentation | Pacing |
|---|---|---|---|
| Win | Reward and close the arc | Longer sequence, score breakdown, unlocks | Slower, can be skipped on replay |
| Lose | Mark a real end, explain the cause | Recap screen, clear options | Medium, then quick access to retry |
| Fail (recoverable) | Teach and return the player to play | Brief cue, quick respawn | Fast, ideally under a few seconds |
A frequent mistake is giving a recoverable fail the same weight as a lose. If a player dies often in a platformer and every death plays a three-second animation and a full-screen overlay, the pacing suffers. Fail-state feedback should be short, because the player will see it many times. Lose-state feedback can afford more weight because it happens rarely.
Win feedback has a related problem. A long victory sequence is satisfying the first time and irritating the tenth. Let players skip or shorten it on repeat visits.
Making the cause part of the data
The best way to get cause attribution right is to carry the cause through your outcome logic instead of adding it afterward. If your evaluate function returns only LOST, the presentation layer has to guess why. If it returns a result that includes the cause, the UI can show it directly.
The following program defines a result that carries a cause and builds a message from it. It also separates the message from how it is shown, so the same data can drive a banner, a recap, or a voice line.
from dataclasses import dataclass
from enum import Enum, auto
class Outcome(Enum):
PLAYING = auto()
WON = auto()
LOST = auto()
@dataclass(frozen=True)
class Result:
outcome: Outcome
cause: str = ""
lives_left: int = 0
next_actions: tuple = ()
def evaluate(health, relics, relics_needed, last_damage_source):
# Lose is checked first, so a simultaneous win and loss resolves as a loss.
if health <= 0:
return Result(
Outcome.LOST,
cause=last_damage_source,
next_actions=("retry", "menu"),
)
if relics >= relics_needed:
return Result(Outcome.WON, cause="all relics collected", next_actions=("continue",))
return Result(Outcome.PLAYING)
def describe(result):
if result.outcome is Outcome.WON:
return f"Victory: {result.cause}. Options: {', '.join(result.next_actions)}"
if result.outcome is Outcome.LOST:
return f"Defeated by {result.cause}. Options: {', '.join(result.next_actions)}"
return ""
print(describe(evaluate(0, 2, 3, "spike trap")))
print(describe(evaluate(5, 3, 3, "spike trap")))Running this prints:
Defeated by spike trap. Options: retry, menu
Victory: all relics collected. Options: continueTwo design points are worth noting. First, last_damage_source is tracked during play and handed to evaluate, so the game must record it as damage happens. Second, the describe function does not decide anything about the outcome. It only formats. Keeping the decision and the presentation apart lets you change wording, language, or visuals without touching the rules.
Choosing the right cause
Several causes can contribute to one failure. A player at low health walks into a trap while an enemy is chasing them. Which one do you show? Options include:
- The last damage source. Simple and usually accurate to the player's memory.
- The largest damage source. Better when many small hits led to one finishing blow.
- The player's mistake. For example, "Ran out of time" or "Left the shield down". This is the most instructive, but it requires you to define what counts as a mistake.
Whichever you choose, use the same rule everywhere. If the recap sometimes names the final hit and sometimes the biggest hit, players will stop trusting it.
Common errors
- Blaming the wrong thing. The recap says "Killed by Goblin" when poison from three rooms ago did most of the damage. The player then tries to fight goblins differently and learns nothing useful.
- Hidden state. The player lost because of a timer or stat that was never visible on the HUD. Any value that can cause a loss should be visible, or at least hinted at before it matters.
- Feedback only in one channel. A sound-only cue fails for players with sound off or with hearing loss. A color-only cue fails for color-blind players. Pair cues across channels.
- Blocking input too long. Locking controls during a long death animation delays the retry. Let players skip once the key information has appeared.
- Mismatched certainty. The game shows a victory fanfare, then reveals a further objective. Or it shows a loss screen when the player could still recover. Do not announce an end state before the state machine has reached it.
- Punishing text. Taunting messages can feel fun in some games, but in a game where the player fails often they sour quickly. Match the tone to how often the message appears.
Accessibility and clarity
Outcome feedback is among the most important things to make accessible, because missing it means the player does not know what happened.
- Provide each key cue in at least two channels: visual plus audio, or visual plus haptic.
- Make recap text large and readable, and do not auto-dismiss it so fast that slow readers miss it.
- Offer a way to review the recap again, such as a button that reopens the last death summary.
- Avoid depending on color alone. Use icons, shapes, or labels with the color.
Measuring whether feedback works
You can check your presentation with simple observations, which the playtesting chapter expands on. Ask a tester to explain, in their own words, why they lost the last time. If they name the wrong cause, the feedback is misleading. Also watch the time between failure and the next input. A long gap often means the player is confused or the retry path is hard to find. Count how often players skip the recap. A high skip rate on a rarely seen lose screen suggests it is too slow or not useful.
Exercise
A platformer shows a 4-second full-screen "YOU DIED" animation on every death, and players die about 30 times per level. The state machine and checkpoints are fair. Playtesters say the game feels slow and punishing. What should you change in the outcome feedback, and why?
Show answer
Treat the death as a recoverable fail state, not a lose state, and shorten its feedback. Replace the 4-second overlay with a brief cue of well under a second (sound plus a short animation), name the cause only if it is not obvious from the screen, and respawn the player at the checkpoint immediately. Reserve the heavier "YOU DIED" treatment for the real lose state when lives run out. The fail state repeats about 30 times per level, so its time cost multiplies, while the lose state is rare and can afford more weight. Also let the player skip any remaining animation by pressing a button.
Exercise
Your evaluate function returns only Outcome.LOST with no further data. The UI team wants the death screen to say what killed the player. Describe two ways to supply the cause, and say which one you would pick.
Show answer
One option is to have the UI read separate game state, such as a "last damage source" variable, after the loss. The other is to return the cause as part of the result, as the Result dataclass does with its cause field. The second is better because the cause is captured at the moment of the decision, so it cannot change between the evaluation and the display, and the presentation layer only formats data it is given. It also keeps one rule for choosing the cause (last hit or largest hit) in the logic instead of scattered across UI code.