Status: done (2026-10-30)
Priority: 3
Size: M
Design ref: Systems overview, Presentation systems (Worn paths: lanes appear between farms, well and woods over years; one counter per tile, repainted with the chunk; Proposed); Settlements and look (Village: lanes).
Goal: Pawns walk the same ways every day, to the well, the woodlot and the fields, but the land shows no trace of it. Let walking wear the ground, so lanes appear over years where people go and fade where they stop going. Depends on VB-025 (the Chromium smoke test catches drawing errors); if it is not done, mark this blocked.
Acceptance criteria:
w.wear (Float32Array per tile, @state documented) counts crossings: each time a walking pawn enters a land tile that is not a house or a field, its wear rises by 1. Once a game day, wear decays with a half-life of one game year.
Three stages by wear: trodden at 50 or more, path at 200, lane at 800 (about 1, 4 and 16 crossings a game day, kept up). When a tile’s stage changes it joins a dirty set, like st.treeDirty, and the page repaints only the chunks it touches.
Drawing: a worn tile shows a strip of bare, lighter ground towards each neighbour that is also worn (or is a house, green, well or field), wider and paler by stage, under trees and stones; trodden only at the closest zoom level.
Wear changes nothing in the simulation yet (the speed-up is VB-110): routes, walking speed and growth are unchanged, so the golden file changes only by the new wear key (and pathDirty).
Founders at seed 7 after 5 and 20 years: a screenshot from the Chromium test and the count of tiles per stage (reported in the PR).
The cost of counting and repainting on populous medium at seed 7 is reported: under 1 ms a game day for counting, and no frame over 16 ms from repainting at 10×.
Notes / questions:
The questions under “VB-094” are answered (Kim, 30 Oct 2026; QUESTION_ARCHIVE.md).
Kim, 30 Oct 2026 (merging main): main’s design makes paths speed walking (5%, 15%, 30%); this task only draws them, and VB-110 adds the speed-up after VB-096.
Kim, 30 Oct 2026 (QUESTION_ARCHIVE.md, “Paths, fords and village layout”): taken up now, together with VB-096, VB-110, VB-112 to VB-114, without waiting for VB-025; the screenshots are taken by hand in the pre-installed Chromium. Unused paths fade by halving each game year, as designed: a lane is gone in about 4 to 5 years.
Done 2026-10-30. src/sim/paths.js counts and fades (tread, fadeWear, stageOf, stageCounts); src/gen/paths.js draws (segments, drawChunk, thin), listed before gen/rivers.js so the chunk bake can keep trees and stones off paths and lanes through thin (gen.js stays at 672 lines). w.wear and w.worn are made by the settlement generator (initWear in finishLand, with w.dev); st.pathDirty is the dirty set, cleared by the page (allowed in the lint).
Stages fall only below 85% of their threshold (PATHS.keep), so a count that hovers about one does not flicker; a tile built on (a field broken on a path) loses its wear at the next fade. A crossing counts when a pawn reaches the next point of its way, each of which names the tile it enters.
Drawing: through each worn tile a trail runs from the joint with each neighbour it leads to (worn tiles, worn fords, houses, fields, the green), halfway to that neighbour’s bend; a tile with two ways out runs one quadratic curve through its own jittered bend, so trails flow; ends and forks run straight. Width 5, 7 and 10 map units by stage, a flattened edge and a bare core. Trodden ground shows at the closest level, paths and lanes at the middle level too; the overview shows none: repainting a full overview chunk in place when a lane came or went took up to 57 ms, over a frame.
Founders at seed 7 (they start on unmade land): trodden/path/lane 2/0/0 after 5 years and 3/0/0 after 20; with VB-113’s layout a farm’s trips mostly run between its house, the green and fields 2 to 4 steps out, and four farms do not keep up a path. Populous medium seed 7 (worn in by VB-114): 133/35/2 at the start, 137/41/3 after a year, 173/32/1 after 5.
Cost (populous medium seed 7): counting is a few array writes per step; fading takes 0.2 ms a game day. At 10× in Chromium (software GL) over 6 game days, refreshPaths ran 6 times for 9 tiles, median 0.1 ms, at most 0.7 ms; the dropped chunks are painted again within the scheduler’s frame budget, as for felled trees.
Screenshots were taken in the pre-installed Chromium with PixiJS from npm (by hand, VB-025 is not done) and are attached to the PR conversation, not committed.
Golden: when added, the founders and heirs entries gained the wear and pathDirty keys and nothing else changed; tests/golden.js now hashes st.w.wear with each state.