Browser co-op kitchen game: FastAPI + native WebSockets, server-authoritative 20 Hz simulation, in-memory anonymous lobbies, data-driven YAML levels, Canvas 2D vanilla ES-module client with locally authored SVG art and no external CDNs. .agents/PLAN.md records the LOCKED decisions; .agents/user_stories/ holds the 12 flow contracts; .agents/phases/todo/ breaks them into 14 sequential, test-gated phases (71 task files), each leaving the app launchable and the suite green. LLM-Generated: true
1.5 KiB
1.5 KiB
US-11 — Play on a phone
As a player with only a phone, I want to join with a code and control a cook with touch, so that the game works on the couch without a keyboard.
Acceptance criteria
- The layout works from 360 px wide to 4K: the kitchen scales to fit, the HUD stays legible, nothing overlaps, and there is no page scroll during play.
- Touch controls appear on touch devices: a left thumb-zone drag stick (8-way quantized) and a large right act button (hold for progressive work).
- Controls are usable one-handed per thumb, ≥ 44 px hit targets, and do not cover the serve window or the order queue.
touch-action: noneon the play surface: no pinch-zoom, no scroll, no double-tap zoom; the on-screen keyboard never appears during play.- Orientation: portrait plays with a rotated hint (both orientations are playable).
- Touch input uses Pointer Events; the same code path serves mouse (desktop click-to-act is not required — keyboard is the desktop input).
- Lobby joining on a phone (type code, tap create/join) completes in < 20 s and shows
the correct focus/type UI (
inputmode="text",autocapitalize="characters"). - Framerate on a mid-range mobile browser stays ≥ 30 fps with 4 cooks.
E2E suite
tests/e2e/test_us11_touch_mobile.py — mobile viewport + has_touch context: create,
join by typed code, move via pointer drag, complete an action, assert no scroll and
control hit-target sizes.
Phases
07_canvas_client_and_hud, 08_client_prediction_and_touch,
14_accessibility_polish_and_hardening