diff --git a/prototype-wall-sight/.gitignore b/prototype-wall-sight/.gitignore
new file mode 100644
index 0000000..d77f55a
--- /dev/null
+++ b/prototype-wall-sight/.gitignore
@@ -0,0 +1,2 @@
+pictures
+bench_thick
diff --git a/prototype-wall-sight/README.md b/prototype-wall-sight/README.md
new file mode 100644
index 0000000..fc88dc1
--- /dev/null
+++ b/prototype-wall-sight/README.md
@@ -0,0 +1,41 @@
+# PROTOTYPE #43 — sight with thick and low walls
+
+**Throwaway.** Branch `prototype/wall-sight` only; never pushed, never merged, `server/` not modified.
+Open `index.html` (double-click) — it links every picture, the cost table and the open questions.
+
+Question it answers: *what does sight actually look like with thick and low walls in our polygon code?*
+(issue [#43](https://git.fossellini.top/SirStone/FFF_vtt/issues/43), map #38; constraints from #42 / DESIGN 5.8
+and #41 / DESIGN 5.7.)
+
+## What is here
+
+| file | what |
+|---|---|
+| `sightmodel.nim` | the model the tickets argue about: 5.8 switch filter (no kind logic), thickness → 3-face or 4-face expansion, per-target height predicate. Wraps the real `server/geometry.nim` unchanged. |
+| `pictures.nim` | the six scenarios, rendered as SVG into `img/`. |
+| `img/*.svg` | the pictures (open in any browser; regenerated by `pictures.nim`). |
+| `bench_thick.nim` | cost: thin baseline vs 3-face and 4-face thickness, per-query and hoisted, on the prototype scene and the 5k sparse/dense scenes from `tools/bench.nim`. |
+| `cost.txt` | raw output of the last bench run. |
+| `index.html` | the artifact: pictures + captions + cost table + surprises / open questions with suggested answers. |
+
+## Run
+
+```sh
+nim c -r prototype-wall-sight/pictures.nim # rewrites img/*.svg
+nim c -d:release -r prototype-wall-sight/bench_thick.nim # rewrites cost.txt
+```
+
+## Model in one paragraph
+
+A wall is `{blocks_sight, blocks_movement, door, open, sight_dir, thickness, height}`. Before any geometry the
+sight input is filtered: absent when `blocks_sight` is off (that is `terrain`, and it costs nothing), absent when it
+is an open door, absent for the unblocked side of a one-way wall. What survives contributes either one zero-width
+segment (today) or 3–4 rectangle faces (thick). `height` never touches the polygon: it is one comparison per wall
+crossing on the line to the target's top, because a nearest-hit ray fan can shorten a ray but never resume it
+(research #39 §3.3). The explored/fog set in the pictures comes from the strict polygon, and the dashed polygon in
+scenario 4 is the permissive alternative, so the pictures show what each choice reveals.
+
+## Verdict / where it feeds back
+
+Captured on #43 for the owner; the lists in `index.html` are written to feed #44 (low walls: sight and movement) and
+#45 (thick walls). Main branch keeps only whatever the owner decides there.
diff --git a/prototype-wall-sight/bench_thick.nim b/prototype-wall-sight/bench_thick.nim
new file mode 100644
index 0000000..a65d59c
--- /dev/null
+++ b/prototype-wall-sight/bench_thick.nim
@@ -0,0 +1,113 @@
+## PROTOTYPE (#43) - THROWAWAY. Cost of thick walls in the sight polygon, against today's thin wall.
+## Harness shape copied from tools/bench.nim (50 warm-up runs, avg + worst, O(1) sink, -d:release):
+## nim c -d:release -r prototype-wall-sight/bench_thick.nim
+## Scenes: tests/fixtures/scene.json (60 walls) and genScene() 5k sparse / 5k dense (tools/bench.nim).
+##
+## Two different costs are separated on purpose, because #45 has to pay both:
+## (a) the O(walls in the scene) filter + thickness expansion, which runs per query unless hoisted;
+## (b) the ray fan itself, O(rays x segments in the box).
+## A one-way wall forces (a) per query (the filter is per observer); a quad does not.
+import std/[json, monotimes, times, strformat, os, math, strutils]
+import sightmodel, geometry, ../tools/scenegen, ../tests/testutil
+
+let root = currentSourcePath().parentDir.parentDir
+const
+ thickPx = 10.0
+ cell = 32.0
+ radius = 400.0
+ iters = 2000
+
+var sink = 0
+
+proc bench(n: int, f: proc(i: int) {.closure.}): (float, float) =
+ for i in 0 ..< 50: f(i)
+ var sum, worst = 0.0
+ for i in 0 ..< n:
+ let t0 = getMonoTime(); f(i)
+ let ms = (getMonoTime() - t0).inNanoseconds.float / 1e6
+ sum += ms; worst = max(worst, ms)
+ result = (sum / n.float, worst)
+
+proc loadProto(): seq[SightWall] =
+ let j = parseFile(root / "tests" / "fixtures" / "scene.json")
+ for w in j["walls"]:
+ result.add SightWall(a: (w["a"][0].getFloat, w["a"][1].getFloat),
+ b: (w["b"][0].getFloat, w["b"][1].getFloat),
+ blocksSight: not (w["door"].getBool and w["open"].getBool),
+ blocksMovement: true, door: w["door"].getBool, open: w["open"].getBool,
+ height: FullHeight, label: "wall")
+
+proc loadBig(world: float): seq[SightWall] =
+ for w in genScene(world, 5000, 1):
+ result.add SightWall(a: w.a, b: w.b, blocksSight: true, blocksMovement: true,
+ door: w.door, open: w.open, height: FullHeight, label: "wall")
+
+proc thickened(walls: seq[SightWall]): seq[SightWall] =
+ for w in walls: result.add thick(w, thickPx)
+
+proc wallsInBox(walls: seq[SightWall], o: Vec): int =
+ for w in walls:
+ if not (max(w.a.x, w.b.x) < o.x - radius or min(w.a.x, w.b.x) > o.x + radius or
+ max(w.a.y, w.b.y) < o.y - radius or min(w.a.y, w.b.y) > o.y + radius): inc result
+
+proc expand(walls: seq[SightWall], o: Vec, mode: ThickMode): seq[Wall] =
+ toWalls(sightSegments(walls, o, mode))
+
+type Row = object
+ scene, arm: string
+ ms: float
+ verts, cells: int
+
+var rows: seq[Row]
+
+proc runScene(label: string, thin, thickWalls: seq[SightWall], lo, hi: float) =
+ echo "== ", label, " =="
+ var r = Rng(s: 99)
+ var orig: seq[Vec]
+ for i in 0 ..< 200: orig.add (r.uni(lo, hi), r.uni(lo, hi))
+ var boxN = 0
+ for o in orig: boxN += wallsInBox(thin, o)
+ echo &" avg walls in the 800x800 vision box: {boxN.float / 200.0:.1f}"
+
+ # today, exactly: the blocking walls as one pre-built segment list, ray fan only
+ let baseSegs = expand(thin, orig[0], tmThin)
+ let quadSegs = expand(thickWalls, orig[0], tmQuad) # viewer-independent, so hoistable
+
+ var msBase = 0.0
+ proc measure(name: string, f: proc(o: Vec): seq[Vec]) =
+ var vsum = 0
+ let (ms, worst) = bench(iters, proc(i: int) =
+ let k = f(orig[i mod 200]).len
+ vsum += k)
+ var csum = 0
+ for i in 0 ..< 60: csum += cellsTouched(f(orig[i]), cell).len
+ if name == "thin (today)": msBase = ms
+ echo &" {name:<28} avg={ms:.3f} ms worst={worst:.3f} verts={vsum div iters} cells={csum div 60} " &
+ (if msBase > 0: &"{ms / msBase:.1f}x thin" else: "")
+ rows.add Row(scene: label, arm: name, ms: ms, verts: vsum div iters, cells: csum div 60)
+
+ measure("thin (today)", proc(o: Vec): seq[Vec] = visibilityPolygon(o, baseSegs, radius))
+ measure("thin + per-query filter", proc(o: Vec): seq[Vec] =
+ visibilityPolygon(o, expand(thin, o, tmThin), radius))
+ measure("thick 3 faces (per query)", proc(o: Vec): seq[Vec] =
+ visibilityPolygon(o, expand(thickWalls, o, tmSilhouette), radius))
+ measure("thick 4 faces (per query)", proc(o: Vec): seq[Vec] =
+ visibilityPolygon(o, expand(thickWalls, o, tmQuad), radius))
+ measure("thick 4 faces (hoisted)", proc(o: Vec): seq[Vec] = visibilityPolygon(o, quadSegs, radius))
+
+let proto = loadProto()
+runScene("prototype scene (60 walls, 4096 px, radius 400)", proto, thickened(proto), 200.0, 3896.0)
+let sparse = loadBig(16384)
+runScene("5k sparse (16384 px)", sparse, thickened(sparse), 400.0, 15984.0)
+let dense = loadBig(4096)
+runScene("5k dense (4096 px)", dense, thickened(dense), 400.0, 3696.0)
+
+echo ""
+echo "| scene | arm | poly avg ms | verts | cells | vs thin |"
+echo "|---|---|---|---|---|---|"
+for r in rows:
+ var base = 1.0
+ for b in rows:
+ if b.scene == r.scene and b.arm == "thin (today)": base = b.ms
+ echo &"| {r.scene} | {r.arm} | {r.ms:.3f} | {r.verts} | {r.cells} | {r.ms / base:.2f}x |"
+echo "(sink ", sink, ")"
diff --git a/prototype-wall-sight/cost.txt b/prototype-wall-sight/cost.txt
new file mode 100644
index 0000000..abeacb9
--- /dev/null
+++ b/prototype-wall-sight/cost.txt
@@ -0,0 +1,40 @@
+== prototype scene (60 walls, 4096 px, radius 400) ==
+ avg walls in the 800x800 vision box: 3.9
+ thin (today) avg=0.031 ms worst=0.094 verts=88 cells=412 1.0x thin
+ thin + per-query filter avg=0.033 ms worst=0.069 verts=88 cells=412 1.1x thin
+ thick 3 faces (per query) avg=0.051 ms worst=0.133 verts=119 cells=396 1.7x thin
+ thick 4 faces (per query) avg=0.064 ms worst=0.183 verts=142 cells=394 2.1x thin
+ thick 4 faces (hoisted) avg=0.057 ms worst=0.475 verts=142 cells=394 1.8x thin
+== 5k sparse (16384 px) ==
+ avg walls in the 800x800 vision box: 15.8
+ thin (today) avg=0.083 ms worst=0.150 verts=162 cells=241 1.0x thin
+ thin + per-query filter avg=0.237 ms worst=0.337 verts=162 cells=241 2.8x thin
+ thick 3 faces (per query) avg=0.699 ms worst=2.362 verts=314 cells=219 8.4x thin
+ thick 4 faces (per query) avg=0.943 ms worst=2.641 verts=410 cells=217 11.3x thin
+ thick 4 faces (hoisted) avg=0.263 ms worst=0.599 verts=410 cells=217 3.2x thin
+== 5k dense (4096 px) ==
+ avg walls in the 800x800 vision box: 206.0
+ thin (today) avg=1.254 ms worst=3.096 verts=1332 cells=54 1.0x thin
+ thin + per-query filter avg=1.399 ms worst=3.333 verts=1332 cells=54 1.1x thin
+ thick 3 faces (per query) avg=7.851 ms worst=9.884 verts=3724 cells=26 6.3x thin
+ thick 4 faces (per query) avg=13.229 ms worst=17.079 verts=4976 cells=21 10.6x thin
+ thick 4 faces (hoisted) avg=12.721 ms worst=15.625 verts=4976 cells=21 10.1x thin
+
+| scene | arm | poly avg ms | verts | cells | vs thin |
+|---|---|---|---|---|---|
+| prototype scene (60 walls, 4096 px, radius 400) | thin (today) | 0.031 | 88 | 412 | 1.00x |
+| prototype scene (60 walls, 4096 px, radius 400) | thin + per-query filter | 0.033 | 88 | 412 | 1.06x |
+| prototype scene (60 walls, 4096 px, radius 400) | thick 3 faces (per query) | 0.051 | 119 | 396 | 1.65x |
+| prototype scene (60 walls, 4096 px, radius 400) | thick 4 faces (per query) | 0.064 | 142 | 394 | 2.06x |
+| prototype scene (60 walls, 4096 px, radius 400) | thick 4 faces (hoisted) | 0.057 | 142 | 394 | 1.84x |
+| 5k sparse (16384 px) | thin (today) | 0.083 | 162 | 241 | 1.00x |
+| 5k sparse (16384 px) | thin + per-query filter | 0.237 | 162 | 241 | 2.84x |
+| 5k sparse (16384 px) | thick 3 faces (per query) | 0.699 | 314 | 219 | 8.37x |
+| 5k sparse (16384 px) | thick 4 faces (per query) | 0.943 | 410 | 217 | 11.30x |
+| 5k sparse (16384 px) | thick 4 faces (hoisted) | 0.263 | 410 | 217 | 3.15x |
+| 5k dense (4096 px) | thin (today) | 1.254 | 1332 | 54 | 1.00x |
+| 5k dense (4096 px) | thin + per-query filter | 1.399 | 1332 | 54 | 1.12x |
+| 5k dense (4096 px) | thick 3 faces (per query) | 7.851 | 3724 | 26 | 6.26x |
+| 5k dense (4096 px) | thick 4 faces (per query) | 13.229 | 4976 | 21 | 10.55x |
+| 5k dense (4096 px) | thick 4 faces (hoisted) | 12.721 | 4976 | 21 | 10.15x |
+(sink 0)
diff --git a/prototype-wall-sight/img/s1-thin-vs-thick.svg b/prototype-wall-sight/img/s1-thin-vs-thick.svg
new file mode 100644
index 0000000..697806c
--- /dev/null
+++ b/prototype-wall-sight/img/s1-thin-vs-thick.svg
@@ -0,0 +1,659 @@
+
+
diff --git a/prototype-wall-sight/img/s2-corner.svg b/prototype-wall-sight/img/s2-corner.svg
new file mode 100644
index 0000000..1a8897e
--- /dev/null
+++ b/prototype-wall-sight/img/s2-corner.svg
@@ -0,0 +1,684 @@
+
+
diff --git a/prototype-wall-sight/img/s3-door-in-thick-wall.svg b/prototype-wall-sight/img/s3-door-in-thick-wall.svg
new file mode 100644
index 0000000..d08a893
--- /dev/null
+++ b/prototype-wall-sight/img/s3-door-in-thick-wall.svg
@@ -0,0 +1,1072 @@
+
+
diff --git a/prototype-wall-sight/img/s4-low-wall.svg b/prototype-wall-sight/img/s4-low-wall.svg
new file mode 100644
index 0000000..e832e7e
--- /dev/null
+++ b/prototype-wall-sight/img/s4-low-wall.svg
@@ -0,0 +1,810 @@
+
+
diff --git a/prototype-wall-sight/img/s5-terrain.svg b/prototype-wall-sight/img/s5-terrain.svg
new file mode 100644
index 0000000..439c07c
--- /dev/null
+++ b/prototype-wall-sight/img/s5-terrain.svg
@@ -0,0 +1,831 @@
+
+
diff --git a/prototype-wall-sight/img/s6-one-way.svg b/prototype-wall-sight/img/s6-one-way.svg
new file mode 100644
index 0000000..c15a8e5
--- /dev/null
+++ b/prototype-wall-sight/img/s6-one-way.svg
@@ -0,0 +1,848 @@
+
+
diff --git a/prototype-wall-sight/index.html b/prototype-wall-sight/index.html
new file mode 100644
index 0000000..223d3ab
--- /dev/null
+++ b/prototype-wall-sight/index.html
@@ -0,0 +1,266 @@
+
+
+
+
+Prototype #43 — sight with thick and low walls
+
+
+
+
+
Sight with thick and low walls
+
Throwaway prototype for issue #43 (wayfinder map #38). Pictures, explored cells and cost of what our
+polygon code does when a wall has a width and a height. Branch prototype/wall-sight, never pushed,
+server/ untouched.
+
+
This is a prototype, not a design. It wraps the real
+server/geometry.nim (the same ray fan, the same cellsTouched) and adds only the model the
+tickets are arguing about: the 5.8 switch filter, a thickness expansion and a per-target height predicate. Nothing
+here is production code and nothing was folded back.
+
+
How to read every picture
+
+
+
Parchment = floor the eye actually sees.
+
Salmon = floor the fog would reveal but the eye does not see (a height-hidden band), or — dashed outline only — floor a permissive polygon would reveal.
+
Dark slate squares = explored cells (memory, not current sight), 32 px cells.
+
Solid blue line = today's sight polygon (the fog edge, visibilityPolygon output).
+
Dashed blue line = the same fan with the low wall removed from the input (scenario 4 only).
+
Blue dot = the eye (93 % of token height, DESIGN 5.7). Circles with a height = tokens: green = visible, red = the fog covers it but the eye cannot see it, grey = fog.
+
+
Every picture is generated from scratch by pictures.nim. The filter is
+5.8's and nothing else: a wall enters the fan only if blocks_sight, never when it is an open door,
+a one-way wall only for the blocked side — no kind logic anywhere. Height never enters the polygon; it is a
+per-target 3D test (eye + t·(target − eye) > wall height), which is what research #39 §3.3 said
+has to happen because a nearest-hit fan can shorten a ray but never resume it.
+
+
+
The six pictures
+
+
+
+
+
1 — Thin vs thick, same layout (t = 14 px)
+
Left: today's zero-width wall. Right: the same wall as a 3-face rectangle (near face + two end caps). The
+ wall's own body becomes hidden floor, the shadow edge moves out by t/2 (7 px here — visible only if you compare
+ the two panels), and the polygon is a strict subset: 228 explored cells thin, 227 thick, 0 gained, 1 lost.
+
Surprise: at 14 px on a 400 px room the pictures are almost identical. Thickness costs cells in
+ proportion to cell size vs room size, so on a normal map it is a border cell here and there — the dense
+ 5k layout is where it eats half the view.
+
+
+
+
+
+
+
2 — Corner where two thick walls meet
+
Same L-shaped room, thin then thick. Thin: the polygon reaches the shared vertex exactly. Thick: the two
+ bodies overlap at the joint, the inner corner loses its cells (242 → 232 explored, 0 gained, 10 lost), and the
+ eye sees less into the corner because the near faces are 7 px closer.
+
Surprise: no crack at the joint in either panel. The expected zero-width sliver leak at a shared
+ vertex did not appear at this scale — the ±RayEps fan already covers it — so "thickness is needed to close the
+ joints" is not what this layout shows; the polygon change comes from the wall bodies alone.
+
+
+
+
+
+
+
3 — Doorway in a thick wall, closed vs open, viewer at an angle
+
The wall has a 90 px opening with a 14 px thick leaf. Closed (left): nothing passes. Open (right): the door is
+ gone from the input, but the two jambs are 14 px deep, so the view through is a narrow diagonal beam — token A
+ (right behind the opening) is visible, token C (left of it) is behind the wall, and token B is clipped by the
+ far corner of the right jamb even though it is well past the opening.
+
Surprise: opening a thick door does not reveal the doorway's width, it reveals a keyhole whose
+ shape depends on where the viewer stands. On a 32 px grid that beam is 1–2 cells wide, so a player standing two
+ steps to the side unlocks almost nothing through a door they just opened.
+
+
+
+
+
+
+
4 — A 1 m wall, tall viewer (1.8 m) vs short viewer (1.0 m)
+
Wall 12 px thick, 1.0 m high; the eye is 70 px in front of it. For the 1.8 m viewer (eye 1.67 m) the floor
+ behind the wall is hidden out to d = s·h_eye/(h_eye−h_wall) = 174 px from the eye — the salmon band —
+ and visible again beyond it. The dashed polygon is the same fan with the low wall ignored: exactly the extra floor
+ a "low walls never block" rule would reveal. For the 1.0 m viewer (eye 0.93 m, below the wall top) no floor behind
+ is ever visible: the whole far side is salmon, but a 1.8 m token's head still shows over the wall.
+
Surprise: the target's height matters as much as the wall's. In 4a a 1.0 m token 75 px behind the
+ wall is visible while a 0.3 m crate 45 px behind it is not; in 4b (eye below the wall top) two tall tokens are
+ visible and nothing else is. A wall-only flag ("low wall = see over") gets both of those wrong.
+
Surprise: the fog has to pick an error. Solid polygon = the floor behind a low wall is
+ never explored from a distance, so a token you can see stands on a black tile. Dashed polygon = the fog
+ reveals a band nobody can see. There is no polygon that does the right thing; that is #44's decision.
+
+
+
+
+
+
+
5 — Terrain wall = no wall (the 5.8 payoff)
+
Left: no wall at all. Right: the same layout with a 14 px thick terrain wall
+ (blocks_sight:false, blocks_movement:true). The two polygons are vertex-identical (64/64, 318 explored
+ cells both), the explored sets are equal and nothing is drawn differently apart from the wall itself.
+
Confirmed rather than surprising: blocks_sight:false costs literally zero polygon work,
+ thickness and height included, because the wall never reaches the geometry. Any "cheap terrain" argument in #44/#45
+ can rely on that.
+
+
+
+
+
+
+
6 — One-way wall, from both sides
+
One 12 px thick wall, sight_dir:"left", a → b pointing down the page, so the left
+ (west) side is the blocked one. Left: a viewer west of it gets a polygon that stops at the wall, and both east
+ tokens stay in fog. Right: a viewer east of it has the wall absent from the geometry (one filter decision,
+ not a special case in the fan) and sees west through it, including the two west tokens.
+
Surprise: this is the only scenario where the explored maps of two players in the same room differ
+ permanently, and it is the only place where the 5.8 filter must run per observer — i.e. per polygon, not per scene
+ (see the cost table: that filter is not free).
+
+
+
+
Cost
+
Same harness as tools/bench.nim (2000 iterations, 50 warm-up, -d:release, avg ms per
+one visibility polygon, radius 400, cell 32). "Today" = the blocking walls pre-expanded into the segment list the fan
+already takes, which is what production does. Thick = 10 px, 3 faces (near + 2 caps, exact for a viewer on the near
+side but observer-dependent) or 4 faces (a quad, exact and hoistable once per wall edit). Cells = explored cells per
+polygon.
+
+
+
scene
arm
poly ms
verts
cells
vs today
+
+
prototype (60 walls, 4096 px)
thin (today)
0.031
88
412
1.00×
+
thin + 5.8 filter per query
0.033
88
412
1.06×
+
thick 3 faces, per query
0.051
119
396
1.65×
+
thick 4 faces, per query
0.064
142
394
2.06×
+
thick 4 faces, hoisted
0.057
142
394
1.84×
+
5k sparse (16384 px, 15.8 walls in box)
thin (today)
0.083
162
241
1.00×
+
thin + 5.8 filter per query
0.237
162
241
2.84×
+
thick 3 faces, per query
0.699
314
219
8.37×
+
thick 4 faces, per query
0.943
410
217
11.30×
+
thick 4 faces, hoisted
0.263
410
217
3.15×
+
5k dense (4096 px, 206 walls in box)
thin (today)
1.254
1332
54
1.00×
+
thin + 5.8 filter per query
1.399
1332
54
1.12×
+
thick 3 faces, per query
7.851
3724
26
6.26×
+
thick 4 faces, per query
13.229
4976
21
10.55×
+
thick 4 faces, hoisted
12.721
4976
21
10.15×
+
+
+
+
Read: on the realistic (sparse) density a hoisted quad costs 0.26 ms per polygon —
+inside the 1 ms target, and it reproduces the 0.257 ms measured for #39. The dense stress layout is 10× over and stays
+over for every exact variant. Two costs hide in the numbers: the 5.8 filter is +0.15 ms per polygon at 5k walls
+(because it scans every wall in the scene: 2.8× the sparse baseline, ≈ 0.9 ms for a 6-token party — the whole
+per-move budget), and the 3-face silhouette is observer-dependent so it can never be hoisted. Raw output:
+cost.txt.
+
+
Surprises and open questions (for #44 and #45)
+
+
+
Q: does the target's height matter for see-over? (DESIGN 5.7 defers it to #44.)
+ Suggested: yes, and it must be the default — the pictures show a 1.0 m token visible over a 1.0 m
+ wall from a 1.67 m eye while a 0.3 m crate at the same spot is hidden, and a 0.93 m eye still sees 1.8 m heads. The
+ test is one comparison per wall crossing on the line to the target's top
+ (eye + t·(h_top − eye) > wall_h); a wall-only "see over" flag cannot express it. Treat "low barrier
+ hides everything behind it" as the special case h_top = 0.
+
+
Q: which polygon does the fog/explored set use for a low wall? (families A–D in #39 §3.4.)
+ Suggested: keep the polygon strict (a low wall blocks the fan, exactly today's
+ blocks = not (door and open)) and put see-over only in the per-target predicate (family C). It is the
+ only option with zero geometry cost, the explored set stays conservative and monotone (never un-explores), and the
+ dense numbers (1.25 ms today, 12.7 ms for thickness) say the fan has no budget left for a second height-aware
+ polygon. The price is visible in picture 4a: a token you can see can stand on a tile that is still fogged. If the
+ owner rejects that artefact, the fallback is family D — fog from a permissive polygon (the dashed one), tokens from
+ the strict one — at +1 fan per token, and picture 4a shows exactly the extra band it would reveal.
+
+
Q: thickness on the wall body, or only in movement? (#45.)
+ Suggested: put the body in the sight fan as a 4-face quad, hoisted per wall edit. It is exact,
+ viewer-independent (so it can be cached — the 3-face silhouette cannot, and the bench shows the difference:
+ 0.263 ms hoisted vs 0.943 ms per query on sparse), keeps the "thick polygon ⊂ thin polygon" property (0 cells
+ gained in every scene measured here: 1, 10 and 0 cells lost on prototypes 1, 2, terrain), and leaves the door
+ leaf a plain rectangle for the movement collider.
+
+
Q: the 5.8 sight filter is a per-query cost, not a free switch.
+ Suggested: #49 stores the wall switches as real columns and the server builds the scene's
+ sight-segment list once per wall edit (rebuild on wall.*/door.set), then runs the fan over
+ that list. Filtering per polygon costs 0.15 ms × 6 tokens at 5k walls, which is the whole per-move budget; hoisted
+ it is zero. The only thing that must stay per observer is the one-way decision, which is a cheap per-wall test on
+ the pre-built list, or two pre-built lists (one per direction).
+
+
Q: what does a thick door mean for the opening?
+ Suggested: model the leaf as the same rectangle as a wall and leave the opening as the gap between
+ the jamb rectangles; the pictures show that is what players perceive (a keyhole at an angle). Do not try to
+ make the opening "as wide as the gap": the depth is the feature. Note for #46: a closed secret door must stay
+ identical to a solid wall, which the rectangle makes trivial (same body, same depth).
+
+
Q: does a one-way wall hide its own body from the unblocked side?
+ Suggested: yes — treat the body as always occluding and only the pass-through as
+ directional (one-way = "sight crosses the near face, the body's far face is not a hole"). Otherwise the fog of the
+ unblocked side covers the wall's own footprint, which reads as "there is a gap there" and leaks the wall's
+ direction to observant players. Also worth fixing before #47: 5.8's sentence "left names the side whose view across
+ the wall is blocked" can be read both ways (blocked from the left, or the left side is hidden from the
+ right); this prototype implements the first (a west viewer of a left wall sees nothing across).
+
+
Q: is there a cheaper exact see-over than a per-target predicate?
+ Suggested: no, but the boundary has a shape worth knowing — for a target of height h_t
+ the see-over boundary of a low wall is that wall scaled about the eye by
+ (h_eye − h_t)/(h_eye − h_wall) (the straight salmon/parchment line in 4a is exactly that, with
+ h_t = 0). A fan could use those scaled segments to shorten rays, which fixes family B's single-radius
+ error cheaply, but it still cannot resume a ray, so the far side of a low wall would be lost. Use it only if a
+ height-aware fog polygon is ever wanted; per-target predicate stays the reference.
+
+
+
Not done (do not read the pictures for these)
+
+
Client-side fog rendering and the actual wire polygon: only static SVGs. Vertex counts in the table stand in for
+ bytes (Q16).
+
Movement: no pathClear / stuck numbers for thick rectangles (research #39 already has
+ them: 0.010 → 0.030 ms dense).
+
6-token party cost is not re-measured; the table is per polygon, multiply by 6 as a rule of thumb.
+
Only the prototype scene is pictured. No picture of the 5k sparse/dense layouts — the cost table is the only
+ evidence there.
+
Secret/locked doors not pictured (by 5.8 they must be pixel-identical to a solid wall, so picture 1b is the
+ reference), no windows, no elevation.
+
Explored/tile gate: the pictures show explored cells from cellsTouched, not the 32 px tile gate
+ itself.
+
+
+
Rebuild
+
+nim c -r prototype-wall-sight/pictures.nim # rewrites img/*.svg
+nim c -d:release -r prototype-wall-sight/bench_thick.nim # rewrites the table above (cost.txt)
+