A13: Gamepad and accessibility

Gamepad: PadInput reads pad events in one fixed layout (sticks move and
look, triggers aim and fire, bumpers step slots and build pieces, Start
pauses), fed through ClientInput alongside the keys and mouse. Menus take
South to choose and East or Start to go back. The tutorial names pad
buttons once the pad is used.

Aim assist (option, on by default, pad only): friction across an
opponent in plain sight near the look, and a pull of at most 9 deg/s
while aiming. Client look only; never through cover.

Accessibility (new Access tab): colour-vision sets for the signal colours
(red-green, blue-yellow), checked by simulated colour vision in
test_palette; interface size 90-130%, with the HUD hotbar refitting at the
larger sizes; captions for key sounds with direction; reduce motion
(calmer aim zoom and hurt flash).

Tests for the pad, aim assist, captions, palettes, settings, the menus
driven from a pad, and a pad playing through a real offline session.
make access-captures renders the new screens and options.

Closes #53

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-15 08:53:30 -05:00
co-authored by Claude Opus 5.5
parent dbe1ef923a
commit 8142e39ab3
48 changed files with 1627 additions and 49 deletions
+21
View File
@@ -87,6 +87,27 @@ or `src/app`, and on any palette colour this table doesn't list. Values are sRGB
| `WARNING` | 0.86, 0.32, 0.22 | HUD danger: the tide's next line, low health |
| `SEA_INK` | 0.20, 0.34, 0.42 | The sea on the tide gauge and map |
### Colour vision (A13)
The signals above are the `Standard` set. Red against green (the build ghost) and rust
against oilskin yellow (danger beside the player's own marks) are hard to tell apart
for many players, so the Access settings offer a set for each common kind of colour
blindness (`VISION_NAMES`: `VISION_STANDARD`, `VISION_RED_GREEN`, `VISION_BLUE_YELLOW`).
Everything that signals asks `Palette.ghost_ok()`, `ghost_refused()`, `warning()` and
`own()` for its colour, which read `VISION_SIGNALS` for the set in use.
| Set | Allowed | Refused | Danger | Own marks |
|---|---|---|---|---|
| Standard | `GHOST_OK` | `GHOST_REFUSED` | `WARNING` | `OILSKIN` |
| Red-green (protan, deutan) | blue 0.22, 0.52, 0.95 | orange 0.98, 0.56, 0.08 | magenta 0.78, 0.16, 0.62 | `OILSKIN` |
| Blue-yellow (tritan) | teal 0.16, 0.70, 0.74 | vermilion 0.90, 0.16, 0.20 | red 0.88, 0.14, 0.18 | pale blue 0.62, 0.86, 0.98 |
`test_palette` checks each set with a simulation of the colour vision it is for
(Machado, Oliveira and Fernandes 2009, at full severity): each pair must be at least
0.25 apart in Oklab, and clearly further apart than the standard colours where those
are weakest (the standard ghost is only 0.18 apart for deutan eyes). Simulations are a
guide, not a substitute for asking players with colour blindness.
The terrain shader's sand, marsh, grass, rock and summit colours are shader uniforms
and follow the same rules. The sea shader's colours are set from the `SEA_` entries
above by `WaterView`. Water goes from `SEA_SHALLOW` to `SEA_DEEP` with its depth and