Sub topic 8
Specifying UI, Controls, and Player Flow
Assume you understand a game team’s basic roles, can read a feature spec, and have seen a feature move through a sprint or milestone. This chapter focuses on turning a mechanic into a clear player interaction from input to result.
Start with the player flow
A player flow describes what the player sees and does in sequence. It should include the normal path, feedback after each action, and what happens when the action fails.
For a dash feature, the flow might be:
- The player sees the dash action in the control guide.
- The player presses Dash while moving right.
- The character begins dashing right.
- The UI shows a cooldown indicator.
- The player presses Dash again during cooldown.
- The game gives clear feedback but does not start another dash.
- When the cooldown ends, the indicator returns to its ready state.
A flow like this exposes missing decisions. For example, should the game ignore the second input, play a sound, or display a message?
flowchart TD
A[Player sees Dash control] --> B[Presses Dash]
B --> C{Dash available?}
C -->|Yes| D[Dash in chosen direction]
D --> E[Show cooldown feedback]
C -->|No| F[Keep current movement]
F --> G[Show unavailable feedback]
E --> H[Cooldown ends]
H --> I[Dash becomes available]caption: Player flow for a dash action alt: A flowchart showing the player pressing Dash, branching on availability, and receiving success or unavailable feedback.
Specify controls as rules
Do not write “the player can dash with the Dash button” without defining how the game chooses direction. Record the input, context, result, and exceptions.
| Item | Example rule |
|---|---|
| Input | Press Dash on a supported gamepad or keyboard binding |
| Direction | Use movement input; use facing direction when input is neutral |
| Context | Allowed on the ground and once in the air per jump |
| Blocked state | No dash starts during cooldown, stun, or a menu screen |
| Feedback | Play a dash sound and show the cooldown indicator |
Distinguish a physical input from an action name. “Button South” identifies one controller button. “Dash” identifies the action that players can remap to another button or key. Specs should use action names unless the feature depends on a specific device input.
Include input timing where it affects play. State whether the game accepts a press only, a held input, repeated presses, or an input buffer. An input buffer is a short period in which the game remembers an early button press and applies it when the action becomes available.
function resolveDashDirection(moveX, facing) {
if (moveX > 0) return "right";
if (moveX < 0) return "left";
return facing;
}
console.log(resolveDashDirection(0, "left")); // leftCover UI states and feedback
For every important state, describe what the player sees, hears, or feels. Use consistent names such as Ready, Active, Cooldown, and Blocked. Specify whether feedback is persistent, temporary, or repeated.
A cooldown icon should communicate at least that Dash is unavailable and when it becomes available. If exact timing matters, define whether the icon fills clockwise, counts down numerically, or uses another readable signal. Include controller vibration, sound, and accessibility alternatives when they carry gameplay information.
Hand off the flow for testing
Convert each major transition into an acceptance scenario. Include success, blocked input, remapping, and alternate devices. Keep one behavior per scenario so a failure identifies the missing rule.
Feature: Dash controls
Scenario: Dash uses movement input
Given Dash is ready and the player holds right
When the player presses the mapped Dash action
Then the character dashes right
And the cooldown indicator becomes active
Scenario: Remapped Dash action works
Given the player has mapped Dash to the left trigger
When the player presses the left trigger
Then the dash starts using the same rulesReview the flow with design, engineering, UI, accessibility, audio, and QA before sign-off. Ask each discipline to identify an unclear state, missing asset, unsupported device, or untestable statement.
Exercise
The spec says, “Press Dash to move quickly.” What two details should you add first?
Show answer
Define how the dash direction is chosen and state what happens when Dash is pressed during cooldown or another blocked state.