Sub topic 10
Hints that arrive when they are needed
A hint that appears before the player needs it spoils the discovery. A hint that appears too late lets a stuck player quit. This chapter covers how to decide when a hint fires, how it escalates, and how to build that logic.
This chapter assumes you have read the chapters on signifiers, feedback, and scaffolding that fades. It also assumes you can read basic TypeScript and Python. The design sections do not need code.
What a contextual hint is
A contextual hint is a message tied to the player's current goal and current trouble. A tutorial popup is tied to a timeline. It shows on screen 3 whether or not the player already knows the move. A contextual hint stays silent while the player makes progress and speaks only when the game has evidence that they are stuck.
Contextual hints are the last layer of scaffolding. Signifiers and feedback do the first work, and levels that isolate one idea do the second. A hint covers the players who still miss the point.
Deciding when to fire
The game needs a rule for "this player is stuck." Three triggers are common.
| Trigger | What you measure | Good for | Weakness |
|---|---|---|---|
| Time on step | Seconds since the step began or since the last hint | Players who stop and look around | Slow readers and careful explorers get false alarms |
| Repeated failure | Deaths, misses, or wrong actions on this step | Players who try and fail | Needs a clear definition of "failure" for each step |
| Wrong state | The player is somewhere or holding something that makes the goal impossible | Soft locks, such as leaving the key behind | Needs per-level knowledge, so it costs more to author |
Combine at least the first two. A timer alone punishes thoughtful players. A failure counter alone misses the player who does nothing because they do not know what to try.
Two rules apply to every trigger:
- Count time only during active gameplay. Pausing, opening a menu, or watching a cutscene must not advance the hint timer.
- Reset the trigger when the player makes progress and after each hint. Otherwise a hint can fire again a frame after the last one.
The escalation ladder
The first hint should give away as little as possible. Each later hint says more, and only after the player is stuck again. A ladder for a "jump the gap" step looks like this:
| Level | Hint | What it gives away |
|---|---|---|
| 1. Nudge | "Something is blocking the path." | The problem exists |
| 2. Direction | "Try jumping over the gap." | The solution type |
| 3. Explicit | "Press Space to jump." | The exact input |
Many players only need level 1 to remember what they were doing. Others need to see the button. The ladder serves both without forcing the explicit text on everyone.
Whenever you can, make level 1 diegetic, meaning it happens inside the game world. A guide character glances at the gap. The camera pans slowly toward the ledge. A light pulses on the interactable object. These pass as part of the world and feel less like the game talking down to the player.
Implementing it
Each tutorial step needs two things: a way to detect completion and an ordered list of hints. Completion is checked against gameplay events, so the step ends when the player does the thing, not when they dismiss a message.
The runner below adds a failure counter to the time trigger. sinceProgressMs measures time on the current step since the last progress or hint, not input idleness. A player who mashes the wrong button is not idle but is still stuck.
type GameEvent = { type: string; [key: string]: unknown };
type TutorialStep = {
id: string;
isComplete: (event: GameEvent) => boolean;
hints: string[]; // ordered from subtle to explicit
};
class TutorialRunner {
private index = 0;
private hintLevel = 0;
private sinceProgressMs = 0;
private failures = 0;
constructor(
private steps: TutorialStep[],
private hintAfterMs = 8000,
private hintAfterFailures = 3,
) {}
get current(): TutorialStep | undefined {
return this.steps[this.index];
}
// Call for every gameplay event.
onEvent(event: GameEvent): void {
const step = this.current;
if (!step) return;
if (step.isComplete(event)) {
this.index += 1;
this.hintLevel = 0;
this.sinceProgressMs = 0;
this.failures = 0;
} else if (event.type === 'failed') {
this.failures += 1;
}
}
// Call once per frame of active gameplay. Returns a hint to show, or null.
tick(dtMs: number): string | null {
const step = this.current;
if (!step) return null;
this.sinceProgressMs += dtMs;
const stuck =
this.sinceProgressMs >= this.hintAfterMs ||
this.failures >= this.hintAfterFailures;
if (!stuck || step.hints.length === 0) return null;
this.sinceProgressMs = 0;
this.failures = 0;
const hint = step.hints[Math.min(this.hintLevel, step.hints.length - 1)];
this.hintLevel += 1;
return hint;
}
}
const steps: TutorialStep[] = [
{
id: 'jump',
isComplete: (e) => e.type === 'jumped',
hints: [
'Something is blocking the path.',
'Try jumping over the gap.',
'Press Space to jump.',
],
},
];
const runner = new TutorialRunner(steps);
console.log(runner.tick(8000)); // "Something is blocking the path."
runner.onEvent({ type: 'failed' });
runner.onEvent({ type: 'failed' });
runner.onEvent({ type: 'failed' });
console.log(runner.tick(16)); // "Try jumping over the gap."
runner.onEvent({ type: 'jumped' });
console.log(runner.tick(8000)); // null, because no steps remainThree details in this code matter:
onEventresets every counter when a step completes. A hint level carried into the next step would start that step with an explicit hint.tickresets the timer and failure count after each hint. This gives the player time to act on the hint before the next one.Math.minclamps the level to the last hint. After the explicit hint, the runner repeats it instead of crashing.
Common errors
- Escalating too fast. An 8-second timer suits a simple jump. For a puzzle, 8 seconds is thinking time. Set the delay per step, and make it longer for puzzles than for reflex tasks.
- Hints that name buttons first. If level 1 already says "Press Space," the player never gets to discover the mechanic. Start with the problem and end with the input.
- Hints that vanish. A line shown for two seconds is lost to a player who looked away. Keep the hint visible until the player acts or dismisses it, or let them replay it.
- No escape from the last level. If the explicit hint fails, the player is stuck for a reason the hint cannot fix, such as a bug or a soft lock. Offer a way out, such as a checkpoint reset, a skip, or a demonstration.
- Hints during non-play states. Do not call
tickwhile paused or in a menu. The player returns to find three escalated hints already spent. - Hints without a record. If you do not log which hint level each player reached, you cannot tell which steps are too hard. Send an event such as
hint_shownwith the step id and level to your analytics.
Hints and player agency
Automatic hints help players who do not know they are stuck. Players who know can ask. Give them a hint button or a repeatable "remind me" action that follows the same ladder, so that asking is never penalized. A player who turns hints off entirely should be able to do so in settings. This keeps the system consistent with the earlier chapter on skipping, replaying, and optional learning.
For accessibility, do not rely on color, sound, or a short timer alone. Provide hints as text that can be read at the player's own speed, and keep a way to review the last hint. Players who play slowly, use assistive input, or read with screen readers should not trigger the explicit hint just because their actions take longer. Offer a setting that scales all hint delays.
Measuring whether hints work
Compute how many players reach each hint level per step. The same funnel idea applies to the steps themselves, as in this function:
def funnel_dropoff(reached: dict[str, int], order: list[str]) -> list[tuple[str, float]]:
"""Return (step_id, drop_off_rate) for each step after the first.
reached maps a step id to the number of players who reached it.
"""
result = []
for prev, step in zip(order, order[1:]):
before = reached.get(prev, 0)
after = reached.get(step, 0)
rate = 1 - after / before if before > 0 else 0.0
result.append((step, rate))
return result
reached = {"move": 1000, "jump": 940, "attack": 700, "first_level_done": 650}
print(funnel_dropoff(reached, ["move", "jump", "attack", "first_level_done"]))The "attack" step loses about 26% of players who reached it. Check the hint logs for that step. If many players saw the explicit hint and then still left, the hint did not fix the problem and the step needs redesign. If few saw any hint, the hints may be firing too late.
Exercise
A player is on a puzzle step and stands still for 20 seconds, thinking. Your runner uses a global 8-second timer and shows the explicit hint after three triggers. What goes wrong, and what two changes would you make?
Show answer
The player reaches the explicit hint in about 24 seconds without ever being stuck, so the puzzle is spoiled. First, make the delay a per-step setting and give puzzle steps a much longer delay than reflex steps. Second, add a second condition such as repeated failed attempts or a wrong game state, so that time alone does not escalate the ladder. A player-facing hint button and a delay-scaling setting would also help.