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.7 KiB
1.7 KiB
US-04 — Move and cook in the shared kitchen
As a player, I want to walk my cook, grab ingredients, chop, cook, plate, serve, and wash, so that I can complete orders with my hands.
Acceptance criteria
- Keyboard (WASD/arrows) moves the cook smoothly in 8 directions without diagonal speed boost; the cook stops at walls, counters, and other players.
- One action key (
Space/Enter) interacts with the tile(s) in front, choosing the sensible verb: pick up, start/hold work, place, plate, serve, wash, trash. - Holding the action key performs progressive work (chop ≈ 0.9 s, cook auto-runs, wash ≈ 1.2 s) with a visible progress ring.
- One carried item per player; the carried item is drawn above the cook and its
form (
raw/chopped/cooking/cooked/burnt/plated) is visually distinct. - Reach is 1 tile in front (plus a 0.6-tile forgiveness radius); out-of-reach presses give an explicit "move closer" nudge rather than doing nothing.
- A contested target resolves deterministically: one winner, and the loser gets
visible
deniedfeedback — never two players holding one item. - Serving a wrong dish is refused with feedback and the order survives.
- The full chain is possible without dead ends: dirty plates/pots return to the sink and come back usable; trash always accepts an item.
E2E suite
tests/e2e/test_us04_move_and_cook.py — scripted keyboard session completes one soup
end to end; asserts HUD score bump, station state changes, denied path on a blocked tile.
Phases
03_simulation_movement_and_interaction, 04_kitchen_pipeline_and_scoring,
07_canvas_client_and_hud, 08_client_prediction_and_touch, 09_co_op_two_player_e2e