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
+55 -2
View File
@@ -80,7 +80,7 @@ practice. Crewmates can't hurt each other, with any weapon or keg.
## Controls
Every key can be rebound in Settings → Controls. Mouse sensitivity and inversion are on
the Mouse tab. Escape opens the pause menu and can't be rebound. Keys are matched by
the Mouse tab. A gamepad works too (below). Escape opens the pause menu and can't be rebound. Keys are matched by
position, so they sit in the same place on any keyboard layout.
| Action | Default |
@@ -101,7 +101,60 @@ position, so they sit in the same place on any keyboard layout.
| In build mode: next material | Tab |
| Chart (the full map) | M |
Gamepads aren't supported in this release.
### Gamepad
A gamepad works alongside the keyboard and mouse, with one fixed layout (listed in
Settings → Gamepad). Buttons are named by position, so they sit the same on any pad:
South is A on most pads.
| Action | Gamepad |
|---|---|
| Move | Left stick |
| Look | Right stick |
| Sprint (until you stop) | Click the left stick |
| Jump, leap, open the wing-sail | South (A) |
| Crouch, dive | East (B) |
| Reload | West (X) |
| Pick up or open a chest | North (Y) |
| Use, fire, harvest or place | Right trigger |
| Aim | Left trigger |
| Next / previous slot, or piece in build mode | Right / left bumper |
| Build mode on and off | Click the right stick |
| In build mode: next / previous material | D-pad right / left |
| Chart | D-pad up |
| Drop the held item | D-pad down |
| Pause menu | Start |
In the menus the D-pad or the left stick moves between controls, South chooses and East
or Start goes back. Settings → Gamepad sets the stick's look speed and turns **aim
assist** on or off (on by default). Aim assist only works with the stick, never the
mouse, and only on an opponent in plain sight close to where you already look: the
stick turns more slowly across them, and while aiming the view eases towards them, by
at most 9° a second. It moves your view only, as your thumb would; the server judges
every shot the same way. Speed while aiming and Invert on the Mouse tab apply to the
stick too. The tutorial names pad buttons once you use the pad.
Gamepads were tested with simulated input only; no physical pad has been tried yet.
## Accessibility
Settings → Access:
- **Colour vision.** Standard, Red-green (protan, deutan) or Blue-yellow (tritan).
Changes the build preview's allowed and refused colours, danger marks (the tide's
next line, low health, "not enough") and your own marks (the tide gauge pointer, your
lines in the feed) to colours that stay apart for that kind of colour blindness.
Nothing in the HUD relies on colour alone in any set: there are words, numbers and
patterns too.
- **Interface size.** 90%, 100%, 115% or 130%: menus and HUD drawn larger or smaller.
At the larger sizes the hotbar moves beside the health panel and its slots narrow.
- **Captions for sounds.** Names the sounds that matter, and which way they came from
(ahead, left, right, behind): the tide's foghorn, bell, surges and lighthouse,
gunfire, shots striking someone, keg blasts, footsteps within 20 m, building and
breaking, splashes, and being hit. Your own sounds aren't captioned.
- **Reduce motion.** Aiming zooms in less (62° rather than 48° of view) and more
slowly, and the flash at the screen's edge when you're hurt is gentler. Tidewall has
no camera shake or head bob.
## How a match goes
+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