Merge remote-tracking branch 'origin/server'
This commit is contained in:
+29
-1
@@ -102,6 +102,34 @@ How the player observes and interacts with the world: camera, fog, line-of-sight
|
||||
- **Raised by:** Araminta (Round 1 proposal, color palette design), project lead (approved, directive #2)
|
||||
- **Dissent:** None
|
||||
|
||||
### D-035: Symmetric shadowcasting (Albert Ford) selected for LOS computation
|
||||
- **Date:** 2026-02-11
|
||||
- **Decision:** Albert Ford's symmetric shadowcasting algorithm is selected for all line-of-sight computation. The traditional recursive shadowcasting algorithm is rejected.
|
||||
- **Resolves:** Q-018
|
||||
- **Benchmark results (debug build, 1000 iterations, range 20):**
|
||||
|
||||
| Map | Density | Symmetric | Recursive | Speedup |
|
||||
|-----|---------|-----------|-----------|---------|
|
||||
| 32x32 | open | 920µs/call | 1118µs/call | 1.2x |
|
||||
| 32x32 | 10% walls | 845µs/call | 4003µs/call | 4.7x |
|
||||
| 32x32 | 30% walls | 334µs/call | 2099µs/call | 6.3x |
|
||||
| 64x64 | open | 929µs/call | 1114µs/call | 1.2x |
|
||||
| 64x64 | 10% walls | 745µs/call | 4060µs/call | 5.5x |
|
||||
| 64x64 | 30% walls | 215µs/call | 1716µs/call | 8.0x |
|
||||
| 150x150 | open | 919µs/call | 1102µs/call | 1.2x |
|
||||
| 150x150 | 10% walls | 615µs/call | 3347µs/call | 5.4x |
|
||||
| 150x150 | 30% walls | 163µs/call | 1709µs/call | 10.5x |
|
||||
|
||||
- **Key findings:**
|
||||
- Symmetric is 1.2-10.5x faster across all configurations (debug build; release will be significantly faster)
|
||||
- Advantage increases with wall density — more occlusion means less work for the quadrant-based approach
|
||||
- Map size has minimal effect on relative performance at range 20 (both algorithms are bounded by vision range, not map size)
|
||||
- All values well within the 100ms tick budget (D-026), even in debug
|
||||
- Symmetry property verified: if A sees B, then B always sees A — critical for D-011's requirement that NPCs use the same perception system as the player
|
||||
- **Implementation:** Uses rational fraction slopes (`num/den` integer pairs) to avoid floating-point drift. Processes 4 cardinal quadrants with coordinate transforms. The production API is `compute_fov(is_opaque, origin_x, origin_y, range, z_level) -> VisibilityMap`.
|
||||
- **Raised by:** Dudley (implementation + benchmark), Tyre (technical direction)
|
||||
- **Dissent:** None
|
||||
|
||||
---
|
||||
|
||||
*7 decisions. Last updated: 2026-02-11*
|
||||
*8 decisions. Last updated: 2026-02-11*
|
||||
|
||||
@@ -89,7 +89,7 @@ Tracked questions awaiting discussion or resolution.
|
||||
- **Source:** Content Gap Analysis Workshop (Gestalt R2)
|
||||
|
||||
### Q-018: Shadowcasting algorithm selection
|
||||
- **Status:** Open
|
||||
- **Status:** Resolved → [D-035](perception.md#d-035-symmetric-shadowcasting-albert-ford-selected-for-los-computation)
|
||||
- **Question:** Which line-of-sight algorithm should be used? Symmetric shadowcasting (Albert Ford) vs recursive shadowcasting. Both are proven but differ in symmetry properties (symmetric: if A sees B, then B sees A) and implementation complexity. Requires benchmarking at 150x150 map scale with 30 entities to validate performance within 100ms tick budget.
|
||||
- **Context:** D-011 mandates LOS shadowcasting for fog of perception. Architecture review identified this as unspecified (audit section 2.2). Critical for Sprint 2 perception pipeline.
|
||||
- **Assigned to:** Tyre, Dudley
|
||||
|
||||
Reference in New Issue
Block a user