Sub topic 11
Mapping Verbs to Controls
Assume you understand a basic game loop and can distinguish a player’s chosen action from the game’s internal rules. This chapter focuses on turning verbs such as jump, grab, and throw into controls that are easy to discover, remember, and use.
A control is not a verb
A verb is the action the player chooses, such as grabbing a crate. An input is the signal used to request that action, such as pressing the Space key or the bottom face button on a controller.
Keep these concepts separate. The same verb can use different inputs on different devices. A keyboard, controller, and touchscreen should call the same game action rather than contain separate copies of the game rule.
A useful mapping has these properties:
- It is discoverable. The player can learn it from prompts, menus, or convention.
- It is consistent. Similar actions use similar controls.
- It is reachable. Important verbs do not require awkward hand movement.
- It is distinct. Two frequently used verbs should not share a control accidentally.
- It is remappable. Players should be able to change bindings without changing the verb itself.
Map actions, not device details
Represent controls as requests for verbs. The game can then validate the request using the same preconditions and costs whether the request came from a key, button, or accessibility device.
bindings = {
"keyboard": {
"Space": "jump",
"E": "grab",
"Q": "throw",
},
"controller": {
"south_button": "jump",
"left_bumper": "grab",
"right_bumper": "throw",
},
}
def verb_for_input(device, control):
return bindings.get(device, {}).get(control)
for device, control in [
("keyboard", "E"),
("controller", "right_bumper"),
("keyboard", "F"),
]:
print(device, control, "->", verb_for_input(device, control))The output for an unbound control should be a clear “no verb” result. Do not silently assign a surprising action. A separate input layer can also handle press, release, hold, and repeated input before it sends a verb request.
Context-sensitive controls
A single control can request different verbs when the player’s context changes. For example, the same button might mean grab near a crate and pull near a lever. This reduces the number of controls, but it can also reduce predictability.
Use contextual mapping when:
- The possible actions are mutually exclusive.
- The game clearly shows the current action.
- The player can cancel or recover from a mistaken choice.
- The control remains stable in similar situations.
Show the active verb before the player commits. A prompt such as “E: Grab” communicates more than an unlabeled button icon.
| Situation | Control | Requested verb | Feedback |
|---|---|---|---|
| Near a crate | E | grab | “Grab” prompt and hand highlight |
| Near a lever | E | pull | “Pull” prompt and lever highlight |
| No valid target | E | none | No prompt or a short denial sound |
Preventing input conflicts
Conflicts happen when one input has several meanings at the same time. A common example is using one button for both “interact” and “drop.” Resolve conflicts with an explicit priority rule, separate controls, or a short contextual menu.
Also decide how the game handles rapid input:
- Buffering stores a request briefly so a jump pressed just before landing still occurs.
- Debouncing prevents one physical press from triggering several actions.
- Hold detection distinguishes a short press from a sustained action.
These rules should support the verb’s intended feel. A precise puzzle game may reject late inputs, while an action game may buffer them to make control feel responsive.
Audit the mapping
For each verb, record its primary control, alternate control, context, and feedback. Playtest without explaining the controls first. Note which verbs players attempt, miss, forget, or trigger by accident. Remap only after identifying the cause. A problem may come from unclear feedback or timing rather than from the button itself.
Exercise
A game uses the same button for grab and throw. Near a crate, players often throw it when they meant to grab it. What should you test first?
Show answer
Test whether the game clearly signals the active verb before the press. If both verbs remain valid in the same context, separate the controls or add an explicit choice instead of relying on an invisible priority rule.