Status: done (2026-10-30)
Priority: 2
Size: M
Design ref: World and scale (River courses: “Crossing is at fords and, later, bridges”; Proposed); Open questions (“Whether rivers can be waded anywhere or only at fords, and when bridges come”). Kim, 30 Oct 2026 (QUESTION_ARCHIVE.md, “Paths, fords and village layout”): rivers block walking except at fords and bridges; the world generates a few fords along every course, brooks included; bridges need construction (VB-115); village generation respects walking, so no farm stands on a far bank it cannot reach.
Goal: Pawns walk across rivers as if they were not there (VB-111 left walking unchanged). A river should divide the land: people cross it at a ford, or later at a bridge they have built, and villages are laid out so their farms can reach the green, their fields and their wood.
Acceptance criteria:
w.crossing (Uint8Array per tile, @state documented): 0 none, 1 ford, 2 bridge. src/gen/rivers.js places the fords with the world, from the river stream only, so every other field of w is unchanged.FORDS.every (10) land river tiles, the stretch’s best ford site becomes a ford; a stretch of under FORDS.least (3) tiles at the end of a course joins the stretch before it. A site is a land river tile with dry land on two separate sides (it joins two banks), not next to a lake or the sea; the best is the narrowest (least catchment) and flattest (least drop to the next tile), with a seeded random term of up to FORDS.noise.TERRAIN.ford (2) to cross, a bridge 1. passable(w, i) in src/sim/routes.js is the one rule, used by the route search and by every generator and site search that measures reach: village and lone-farm sites, house sites, fields, the commons wood and woodlots, new fields and plots.tests/rivers.js): fords are deterministic, each joins two banks, every reach of 5 or more land tiles has one; a route between two banks takes a ford.FORDS in src/gen/rivers.js). Stretches are counted per reach, between confluences, so the fords do not depend on the order the courses were traced in.gen.js stays at 672 lines and 7 long lines: the trace returns crossing with river and riverTo, and the world takes all three by spreading the result.walkable(w) for bfs): siteScore, the house ring of buildVillage, nearestWood, findLoneFarm, chooseTile, the plot site, the heirs scenario’s second village and the travel distance behind a settlement’s tie to its culture (updateTies). siteScore counts the steps to a river as one more than to the nearest bank on the near side. nearestWood searches 24 walking steps instead of 16: at seed 42 a river put the wood of a 16-farm village 21 steps away.tests/populous.js asks for a large village (12 to 16 farms) on Medium and Large maps; the band has a chance of 0.1 per village, so a map of 26 villages lacked one about once in 15, and the new layout of seed 7 did. On a Medium or Large map the first two villages are now a large and a medium one; they take the best sites.tests/perf.js: 91.0 ms a game day.world/7 and world/42 gain crossing (no other world key changes); every founders and heirs entry at seeds 7 and 42; calibrate and apiKeys are unchanged.