# Sprint 2: See — Joint Tasks **Goal:** Fog of perception working through the bridge — server computes LOS visibility, client renders fog. **Branches:** `server` + `client` (merge to main for integration) ## Pre-Sprint | Task | Owner | Notes | |------|-------|-------| | Resolve Q-018 (shadowcast algorithm) | Tyre, Dudley | Blocks #110. Benchmark symmetric vs recursive at 150x150 scale. | | Resolve Q-019 (entity ID stability) | Tyre, Dudley | Affects client entity lifecycle (#130). | | Design ObserverSnapshot v2 schema | Tyre | Add visible_tiles, player_facing, game_time fields. Both teams need this before fog integration. | ## Integration Tickets | # | Title | Blocked by | |---|-------|------------| | #81 | End-to-end connection test | Sprint 1 carry-over (in_progress) | | NEW | Fog data through bridge | Server #112, Client #113 | | NEW | Sprint 2 proof: fog of perception | All above | Use `db/connectors/ticket show ` for full details. ## Key Decisions - `decisions/architecture.md` — D-020 (IPC protocol, ObserverSnapshot), D-010 (information boundaries) - `decisions/perception.md` — D-011 (fog non-negotiable), D-015 (vision cone) ## Sprint Completion Proof **"Walk into a room and see the fog"** — the sprint is done when: 1. Player character moves on screen (Sprint 1 baseline, maintained) 2. Camera follows the player character (no panning) 3. Tiles render from snapshot data (floor + walls visible) 4. Entities appear/disappear based on line-of-sight 5. Fog covers areas outside the vision cone 6. Walking behind a wall hides what's on the other side 7. Walking around a corner reveals what's there This is the first moment the game *feels* like an immersive sim — you can't see behind walls, and that constraint IS the game. ## Notes - **#81 (carry-over):** End-to-end connection test still in_progress from Sprint 1. Must complete before fog integration work. - **ObserverSnapshot v2:** The current `ObserverSnapshot` (`server/src/bridge/types.rs`) only has `tick` + `entities: Vec`. Sprint 2 needs: tile visibility data, facing direction, time-of-day. Design the expanded schema before both teams start, so the contract is clear. - **Fog data through bridge:** Server #112 produces visibility-filtered snapshots. Client #113 consumes them. The bridge already handles MessagePack serialization — new fields just need to be added to both sides. - **Test plan per D-030 Phase 1:** Sprint 2 aligns with D-030's "Phase 1 (sprint 1-2): test infra + collision/pathfinding/time." Collision tests exist (`movement.rs`). Shadowcasting (#110) needs unit tests for known LOS scenarios (corridor, corner peek, wall block). Vision cone (#111) needs sector boundary tests. ## PR Workflow When ready to submit, create a PR with `tea` CLI. **All flags are required** to avoid TTY prompts (see CLAUDE.md "Gitea access" section): ```bash tea pr create --repo jpmschweitzer/settled-reach --login schweitz --title "feat(scope): description" --description "body" --base main --head ```