M4: sector-limited circle-segment ray test #64
Notifications
Due Date
No due date set.
Blocks
#65 M4: session cache, explored bitmap and lock-free tile gate
SirStone/FFF_vtt_frozen
#70 M4: fog: explored bitmap, vision cut-out and player markers
SirStone/FFF_vtt_frozen
Reference: SirStone/FFF_vtt_frozen#64
Reference in New Issue
Block a user
Part of #63
Goal
Each fan ray tests only the 64-gon segment in its own sector. Same polygon, fewer tests.
Acceptance criteria
results/bench.logdevbox run testgreen on a clean checkout, no test weakened or skipped, and the behaviour above proven at the seam(s) listed under "Proven at".User stories covered
Proven at
geometry + vision unit tests, bench, existing harnesses
Notes
Implemented and merged to
mainasd192381(results97f618c), rebased on1dff520.What changed —
visibilityPolygonnow tests only the 64-gon chord of each ray's angular sector, plus the neighbouring chord when the ray sits on a sector vertex (both chords meet there). Walls are still tested as before. TherayHit#26 collinear/radial branch from414bb03is untouched.Byte-identical proof —
tests/tgeometry.nimkeeps the old all-segments fan as a test oracle (referencePolygon, exact float equality, not tolerance) and assertsvisibilityPolygon == referencePolygonover:sightBarrier:false) variants;genScenelayouts, same switch variants;All existing geometry/vision/leak/doors/oneway/markers suites unchanged and green.
Mutation — new
a2intools/mutation.sh: "a ray tests the next sector's chord" (sector + 1). Fulldevbox run mutationgreen;a2fails 5 bit-identical tests.Gates —
devbox run testgreen on the rebased tree: Nim suite + 149 node tests, group evidence 16/16.Bench (
results/bench.log, same host, before -> after, 3-run medians):Rebased-run log: 0.009 / 0.016 / 0.053 / 0.035 / 0.737 ms; targets PASS.