The land and its shore lie on the land tiles #135
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "task/3620-the-land-and-its-shore-lie-on-the-land-t"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Tracker: #3620
Step 4c of plan #3558. Where known land meets known water or lake, the land's waterline, its flat cap and its bank now lie inside the land tiles, as D4 asks, and the drawn shore follows the waterline. The woods cap and the highway still draw as on main; #3621 holds them to the flat cap.
What changes
landLoops' point on each land–water edge keeps the curve point's place along the middle half of the edge, and maps its offset across the edge into theWATERLINEband, 0.01–0.05 inside the land tile. The outline also turns through a vertex at each grid corner where it turns:tracetakes the same tile's next edge, so the outlines part there, each through its own convex corner vertex. On main it took the first unused edge and could cross over the pinch. This rule is intrace, so a woods outline at a woods pinch parts too. OtherwiseforestLoopsis main's.landLoopsreturnsLandLoops, each withlip, the flat cap's edge, vertex for vertex. On an edge it lies 0.05 farther inland than the waterline, 0.06–0.10 off the edge. At a convex corner it lies 0.1 off both edges, and at a wrapped corner 0.09 off both of the water tile's edges. So it is never more than 0.15/√2 off the water's edges. A point with no bank on either side keeps its lip on the waterline.BANKis a strip of 2 rings, where main's had 4, from the lip down to y = 0 on the waterline.BANK_REACHis gone.bankRunsreturns index runs. A run that ends at a tile edge facing unexplored ground or the map edge runs on to the point past its end, so its bank closes the gap between the lip and the waterline there.SHORE_INLAND= 2 and negative over the water down to −SHORE_REACH. Its zero lies at the middle of theWATERLINEband, inside the coast tiles' edges.Tests
/server/import under src/client,generateIslandincluded. So the test sits beside the existing generated-island surface test.changelog.md records it, and the "Shores and ground" bullet is rewritten in place.
Evidence
Base checks: the four new contour tests fail on the base's contour.ts. With the head's map.phone.ts, the base tree's coast-view test finds every water and wrapped-corner point beside bare land drawn as land, in every finish and view.
Mutation checks (a
git archivecopy of the head):Renders: the coast views at 1× and 0.5× in every finish with
&grid, baseb9556deagainst the head, from builds of each tree, at653902cand again at4c96d2e.Rebuild cost (Shore yard, Playwright WebKit, iPhone 15 landscape, on m5): 5 sessions × 7 interleaved runs per arm, built from
git archivetrees. Each figure is the median of the runs' rebuild means, in ms, at the final head4c96d2e:672fc28, with the head's shore.tsb9556de4c96d2e653902cgave 17.07, 10.40 and 11.80.WOODS_SHADE = 0.9, because main's ground.ts does not export it.Map Yard bench (src/bench/map.ts, WebKit iPhone 15 landscape, on m5): 5 sessions × 7 interleaved runs, base
b9556deagainst head653902c, at rest and with?doom=battle,?doom=battle&spare,?doom=nukeand?doom=nuke&spareon each arm. Medians of 35 runs, ms a frame:4c96d2echanges only theWATERLINEband's far bound, from 0.07 to 0.05, so it draws the same vertices and triangles as653902c.The step changes no play, so the AI matches and the net bench were not run.
Gates at
4c96d2e:sak-gate fullrun 5 passed:npm test888/888 in 22.5 s,test:phone180/180.653902c,fastrun 1 andfullrun 2 passed.