--- title: "Sprint 2 — Client Briefing" description: "Camera lock, tile rendering engine, fog overlay rendering, entity sprite management" type: sprint status: archived sprint: 2 team: "client" --- # Sprint 2: See — Client Tasks **Goal:** Fog of perception working through the bridge — server computes LOS visibility, client renders fog. **Branch:** `client` **Agents:** Stig (UI), Oscar (networking) ## Tickets | # | Title | Blocked by | |---|-------|------------| | #116 | Camera lock to character | — | | #129 | Tile rendering engine | — | | #130 | Entity sprite management | #360 (entity ID stability, partially resolved by #362) | | #131 | Fog overlay rendering | #129 (needs tile layer to overlay) | | #113 | Fog rendering - client | #131 (rendering layer), server #112 (fog data in snapshot) | Use `db/connectors/ticket show ` for full details. ## Key Decisions - `decisions/perception.md` — D-015 (camera locked, no panning), D-011 (fog of perception), D-019 (top-down camera) - `decisions/architecture.md` — D-020 (ObserverSnapshot drives all rendering), D-041 (Knowledge Graph — entity color from relationship state) - `decisions/scope.md` — D-014 (v0.1 map spec: ~150x150, 2-3 z-levels, fog + LOS) ## Notes - **#116:** Camera follows player character position. No panning, no rotation (v0.1). The `GameState.player_position` already tracks position — camera just needs to center on it smoothly. Use `Camera2D` with smoothing. Existing `main.gd` handles input; camera attaches to the player entity's position. - **#129:** Multi-layer tilemap rendering from snapshot data. Currently the client renders entities as `ColorRect` placeholders (`client/scripts/rendering/entity_renderer.gd`). This ticket adds a `TileMapLayer` (or multiple layers) for floor/walls/objects. Tiles come from the `ObserverSnapshot` — the client draws what the server says is visible. Placeholder art: colored rectangles with labels (D-014: "functional boxes with labels"). - **#130:** Upgrade entity rendering from `ColorRect` to proper sprite management. Animation states (idle, walk). Entity color based on relationship state from knowledge graph (D-033: unknown=teal, known=green, POI=amber, hostile=red; D-041: KnowledgeGraph drives relationship color). Facing direction indicator. Remembered (not-visible) entities render as ghosts. Builds on existing `entity_renderer.gd`. - **#131:** Fog overlay on the tile layer. Three visibility states: visible (clear), fog-edge (dimmed), hidden (dark/black). Driven by `visible_tiles` data from `ObserverSnapshot`. This is the rendering half of the fog system — the server (#112) determines what's visible, the client draws the fog. - **#113:** Integration of server fog data into the client fog renderer. The existing `fog_renderer.gd` is a stub. This ticket connects it to actual visibility data from the snapshot. Fog returns when you leave an area (time-based decay, tracked client-side from last-seen tick). - **WorldRenderer:** The existing `world_renderer.gd` orchestrates entity + fog rendering. It already calls `entity_renderer.update_entities()` and `fog_renderer.update_fog()` — the stubs just need real implementations. ## Parallelism ``` #116 (camera) — independent, start immediately #129 (tiles) — independent, start immediately #130 (sprites) — independent, start immediately #131 (fog overlay) — needs #129 done #113 (fog integration) — needs #131 + server #112 ``` #116, #129, #130 can all be worked in parallel from day one. ## 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(client): description" --description "body" --base main --head client ```