Guide

Game contextual interaction prompt systems explained

Harbor Ruins shipped with fifty interactable doors, levers, lore tablets, and supply crates — but playtesters kept opening the wrong door, missing quest-critical levers, and rage-quitting at a hold-to-loot prompt that felt identical to a hold-to-open prompt. The level had trigger volumes everywhere; what it lacked was a coherent contextual interaction prompt layer: the system that decides which object is “in focus,” what label and icon to show, whether the player taps or holds, and what happens when three valid targets overlap in a cramped corridor. This guide covers interaction taxonomy, focus detection pipelines, prompt UI patterns, priority stacks, input timing, narrative gating tied to the quest log, multiplayer authority, the Harbor Ruins refactor, a technique decision table versus trigger-only or auto-pickup designs, common pitfalls, and a production checklist.

What contextual prompts actually do

A contextual interaction prompt is not the interactable itself — it is the bridge between player intent and world affordance. At minimum it answers four questions every frame (or on focus change):

  1. Is anything interactable right now? Range, line-of-sight, and game-state gates.
  2. Which single target wins? Priority when multiple candidates exist.
  3. What action will execute? Open, talk, loot, hack, examine.
  4. What input shape is required? Tap, hold, mash, or radial choice.

Games that feel “physical” — immersive sims, souls-likes with examine flows, co-op extraction titles — invest heavily here. Games that feel like floating menus often skipped priority and label consistency. The prompt layer also gates economy: a confusing loot prompt directly hurts your pickup and loot pipeline when players walk past rare drops.

Interaction taxonomy

Prompt type Player sees Typical use
Binary tap Button glyph + verb (“Open”) Doors, switches, one-shot pickups
Hold progress Radial fill or bar while held Looting bodies, reviving allies, hacking terminals
Multi-option wheel Radial menu on hold or secondary input NPC talk / trade / pickpocket; container take-all vs inspect
Examine / inspect Sub-prompt or mode switch Lore objects, clue highlighting in detective games
Continuous channel Progress while staying in range Capturing points, charging rituals, tether repairs
Implicit / no prompt Nothing (collision does the work) Auto-pickup coins, walk-through zone transitions

Focus detection pipeline

Most production systems combine two detection modes; choosing only one creates blind spots:

Proximity sphere (overlap query)

A trigger collider or physics overlap around the player gathers all IInteractable candidates within radius R. Cheap and reliable for dense clutter (loot piles, lever banks). Weakness: cannot prefer what the player is looking at — the chest behind you may win priority incorrectly.

View cone / raycast focus

Camera-forward ray or narrow cone picks the nearest surface with an interactable component. Matches player attention; essential for first-person and over-the-shoulder third person. Weakness: small objects off-center frustrate without magnetism or aim assist on focus.

Recommended hybrid

  1. Overlap gather → candidate set C.
  2. Filter by LOS, quest state, faction, cooldown.
  3. Score each candidate: distance, view alignment dot product, designer priority tier, “quest critical” flag.
  4. Pick highest score; apply hysteresis (stick to current focus for ~0.2s unless a much higher score appears) to stop prompt flicker.
  5. Emit OnFocusGained / OnFocusLost for UI and audio.

Log focus changes in development builds. The number-one bug report in Harbor Ruins was “prompt flicker” at door thresholds — fixed by 15cm hysteresis and requiring a 0.1 score margin before swapping focus.

Prompt UI: world-space vs screen-space

World-space billboards float above the object, scale with distance, and occlude behind walls (disable or fade when LOS breaks). Players read them in context — ideal for sparse interactables. Cost: clutter in crowded arenas; requires pooling and max visible count.

Screen-space HUD strip shows one prompt at a fixed corner (“[E] Open Supply Cache”). Always legible; works on mobile. Risk: disconnect between reticle and label if focus scoring is wrong — players blame the game for “lying UI.”

Hybrid is common in AAA: subtle world marker (outline, shimmer) plus HUD verb confirmation. Outline shaders should respect accessibility settings (high-contrast mode, disable flicker).

Label and icon consistency

Verbs must be stable across the game: always “Talk” for NPC dialogue, never alternating “Speak / Chat / Interact.” Icons map 1:1 to interaction classes (door, loot, terminal). Platform glyphs auto-swap (keyboard vs gamepad vs touch). Document the string table; localization breaks if designers hard-code “Press E” in mesh text.

Input timing: tap vs hold and cancel rules

Tap suits instant, low-stakes actions. Hold adds friction intentionally — looting in PvPvE, reviving in co-op, defusing bombs. Rules to document:

  • Hold duration — typically 0.4–1.2s; scale with item rarity or risk.
  • Cancel on release — partial progress reset vs preserve (preserving enables spam-tapping exploits).
  • Interrupts — damage, stun, or leaving range cancels channel; show clear VFX so players understand why progress dropped.
  • Buffering — if combat uses buffered attacks, decide whether interact input eats the buffer (usually yes in action games to prevent accidental opens mid-combo).

Never use identical hold duration and ring color for conflicting actions. Harbor Ruins originally used the same amber ring for “Loot” and “Open Locked Door” — players burned lockpick charges trying to loot empty crates.

Priority stacks and overlap resolution

When candidates tie on distance, use an explicit priority ladder (author in data):

Tier (example) Examples Rationale
100 — Critical quest Story lever, extraction flare Prevents soft-lock behind clutter loot
80 — Player-down revive Ally revive prompt Co-op safety over loot
60 — Combat interact Finisher prompt, mantle ledge Moment-to-moment flow
40 — Standard use Doors, NPCs, terminals Default tier
20 — Ambient loot Ground pickups, drawers Yields to navigation objects

Within the same tier, break ties with view alignment, then distance. For immersive sim density, cap ambient loot prompts in a 2m radius — force look-at focus or a “search mode” instead of twelve overlapping icons.

Quest gating and narrative state

Interactables should query a single authority for “can interact now”:

  • Quest step predicates — lever inactive until journal step 3; show grayed prompt “Needs power restored” instead of hiding silently.
  • Inventory requirements — key item checks before door prompt appears; link to inventory grants server-side.
  • One-shot vs repeatable — lore tablets disable after read; shops stay active.
  • Faction / reputation — swap verb from “Talk” to “Bribe” with different hold time.

Hiding prompts without explanation trains players to ignore future prompts. Prefer disabled state + reason string over invisible interactables.

Multiplayer authority

In networked games, the server (or host) resolves which interactable fired and whether the action succeeded. Client shows predictive UI; server confirms or rolls back. Patterns:

  • Exclusive lock — first interactor owns the channel; others see “In use.”
  • Instanced loot — each player gets a private pickup prompt on shared corpses (MMO standard).
  • Shared world state — door open is replicated; prompt disappears for everyone.

Never let two clients complete conflicting holds on the same quest object without server arbitration — duplicate quest credit is harder to fix than duplicate loot.

Harbor Ruins interaction refactor (worked example)

Before: per-object trigger scripts, mixed world and HUD prompts, no priority; quest levers lost to ground loot in the treasury room.

After:

  • Central InteractionDirector on player rig runs hybrid focus scoring each tick.
  • Data-driven InteractableSpec: verb, hold duration, priority tier, quest predicate ID, outline color class.
  • UI: screen-space verb strip + subtle world diamond only on focus target; max three world markers in 8m for ambient loot.
  • Hold classes: loot = 0.6s green ring; door = tap; hack = 1.2s blue channel with interrupt on damage.
  • Quest critical tier 100 on story levers; treasury clutter loot dropped to tier 20.
  • Telemetry: focus swaps per minute, mis-interact rate (interact then immediate cancel), hold abandon %.

Mis-interact reports fell 64%; average time-to-find quest lever in treasury dropped from 4.1 minutes to 1.2 minutes without removing loot density — priority and labeling did the work.

Technique decision table

Your problem Prefer Avoid
Players miss quest objects in cluttered rooms Quest-critical priority tier + optional compass pin More floating exclamation marks on everything
First-person reticle feels imprecise Raycast focus + slight magnetism on nearest valid target Giant 3m interaction spheres on every object
Looting slows combat too much Tap for common drops; hold only for containers or rare rolls 1.5s hold on every coin
Mobile touch lacks buttons Large contextual touch button appearing on focus Invisible tap-anywhere with no feedback
Immersive sim player wants depth Multi-option wheel (take / examine / use) Separate full-screen menu per drawer
Co-op chaos at revive spots Exclusive server lock + clear “In use” prompt Race condition double-revive credit

Common pitfalls

  • Prompt flicker at boundaries — add hysteresis and score margin.
  • Verb soup — inconsistent labels erode trust faster than bad art.
  • Same visual language for conflicting holds — color-code by risk class.
  • Interact during cutscene — global suppress flag forgotten on one object.
  • Blocking player movement — root motion on interact without cancel path.
  • Localization overflow — German “Containerschließfach öffnen” breaks HUD layout; plan wrap rules.
  • Accessibility gaps — color-only prompt states; add icons and text.
  • No disabled reason — silent failures feel like bugs.
  • Client-only quest credit — exploit and desync risk.

Production checklist

  • Single InteractionDirector (or equivalent) owns focus selection.
  • Every interactable has InteractableSpec data: verb, tier, hold profile.
  • Hybrid proximity + view scoring documented with hysteresis constants.
  • Priority ladder authored; quest-critical objects flagged in data.
  • Tap vs hold profiles distinct in UI color, duration, and SFX.
  • Disabled interactables show reason text, not invisible colliders.
  • Platform input glyphs generated from binding system, not hard-coded.
  • Multiplayer: server validates interact; exclusive locks where needed.
  • Focus change telemetry in QA builds; mis-interact rate tracked per level.
  • Accessibility pass: text labels, contrast, hold timing options where feasible.

Key takeaways

  • Prompts are a focus problem first and a UI problem second — scoring beats more icons.
  • Priority tiers prevent quest-critical objects from losing to ambient loot.
  • Hold friction is a design dial; use different visuals per action class.
  • Harbor Ruins fixed clarity with a central director, not by removing interactables.
  • Disabled prompts need reasons; silent gates read as broken games.

Related reading