McRogueFace/docs
John McCardle 265425321c Windowed perspective writeback in UIEntity::updateVisibility; closes #316
Clip the demote+promote passes in updateVisibility() to an AABB sized to
fov_radius instead of two full-W*H walks per entity. A prev_fov window cache
demotes last tick's promoted rect (not the current one) so a moving entity
leaves no trailing "ghost vision". On a 1000x1000 grid the Phase 5.2 benchmark's
flat ~25-36 ms/entity writeback overhead collapses to single-digit microseconds
(384x-6577x speedup on the cheap algorithms; below timing noise on the rest).

Adversarial verify caught a regression the happy-path test missed: the
documented from_bytes -> assign -> update_visibility() load/resume path left
permanent ghost-VISIBLE cells, because prev_fov only bounds engine-promoted
cells. Fixed with a one-shot perspective_full_demote_pending flag (full demote
only on the tick after an external assignment; per-turn hot path stays
windowed). Documented the engine-owned demote contract on the perspective_map
property.

- src/UIEntity.cpp/.h: windowed demote/promote, prev_fov cache, demote flag
- src/DiscreteMap.cpp/.h: demoteVisibleRect(x0, y0, x1, y1)
- tests/regression/issue_316_sparse_perspective_test.py: 7-section regression
  (equivalence matrix, radius-0, moving disjoint, trailing-edge, grid resize,
  load/resume assignment, AABB margin lock)
- docs regenerated for the perspective_map docstring change

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KnywUddaFRhkxo5kijxJnv
2026-06-21 09:40:05 -04:00
..
cookbook Cookbook: draft docs 2026-01-13 19:42:37 -05:00
stubs Fix #161: Update Grid, GridPoint, GridPointState stubs to match current API 2026-01-21 21:47:26 -05:00
templates draft tutorial revisions 2026-01-03 11:01:10 -05:00
tutorials Update all 13 tutorial scripts to current enum-based API, refs #167 2026-04-09 23:23:35 -04:00
api-audit-2026-04.md F15: correct docstring accuracy from adversarial verify pass (#314) 2026-06-21 06:43:47 -04:00
api_reference_complete.html docs: Add complete API reference documentation 2025-10-23 13:19:36 -04:00
API_REFERENCE_COMPLETE.md Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
api_reference_dynamic.html Windowed perspective writeback in UIEntity::updateVisibility; closes #316 2026-06-21 09:40:05 -04:00
API_REFERENCE_DYNAMIC.md Windowed perspective writeback in UIEntity::updateVisibility; closes #316 2026-06-21 09:40:05 -04:00
EMSCRIPTEN_RESEARCH.md First successful Emscripten/WASM build for #158 2026-01-31 00:34:11 -05:00
ISSUE_TRIAGE_2026-04.md Fix outdated CLAUDE.md WASM audio entry; update triage notes 2026-04-20 14:37:48 -04:00
mcrfpy.3 Windowed perspective writeback in UIEntity::updateVisibility; closes #316 2026-06-21 09:40:05 -04:00
PROCEDURAL_GENERATION_SPEC.md HeightMap: core class with scalar operations (closes #193) 2026-01-11 20:07:55 -05:00
WASM_TROUBLESHOOTING.md Add WASM developer troubleshooting guide, closes #240 2026-04-10 03:31:43 -04:00