From dcb213e82119360258cc0186dfb9fd6f326b7df3 Mon Sep 17 00:00:00 2001 From: Daniel Covington Date: Thu, 3 Dec 2026 22:13:23 -0500 Subject: [PATCH] M5.2: worn paths from walk counts Every cell counts the steps people take into it; at 128 land, grass or trees become a dark brown path tile, below 64 it turns back, and every count loses one each 60 seconds. Changed cells are redrawn in the hidden buffer only, keeping the people's dots. A rebuild in progress restarts only when a cell is new to it (restarting every frame stalled the scroll). Checks: new tools/check-paths.ps1 (PATH_TEST build); check-scroll compares buffers with the world saved at each snapshot and has -PathTest; check-world tile IDs updated for the path tiles. Co-Authored-By: Claude Opus 5.5 --- docs/manual-tests.md | 2 +- docs/milestones.md | 2 +- docs/verification-status.md | 8 +- project.json | 6 +- src/main.s | 4 + src/paths.inc | 379 ++++++++++++++++++++++++++++++++++++ src/people.inc | 10 +- src/tiles.inc | 11 ++ tools/check-paths.ps1 | 237 ++++++++++++++++++++++ tools/check-scroll.ps1 | 58 +++++- tools/check-world.ps1 | 11 +- tools/lib.ps1 | 10 + tools/run.ps1 | 16 +- 13 files changed, 719 insertions(+), 35 deletions(-) create mode 100644 src/paths.inc create mode 100644 tools/check-paths.ps1 diff --git a/docs/manual-tests.md b/docs/manual-tests.md index 86e5105..83be09e 100644 --- a/docs/manual-tests.md +++ b/docs/manual-tests.md @@ -301,7 +301,7 @@ Verifies: R1 (R1.2, R1.3) ### MT5.2: Worn paths (c64) Setup: VICE x64sc, NTSC (-ntsc), pepto-pal palette, warp off. -Start (test build: a path at 8 steps, gone again below 4, counts drop quickly): +Start (test build: a path at 4 steps, gone again below 2, every count one less each 400 frames): `pwsh -File tools/run.ps1 -Target c64 -PathTest` The normal build (`pwsh -File tools/run.ps1 -Target c64`) uses 128 and 64 with one count less every 60 seconds, so paths there take many minutes of walking to appear. diff --git a/docs/milestones.md b/docs/milestones.md index ba287e7..3d4ebc7 100644 --- a/docs/milestones.md +++ b/docs/milestones.md @@ -78,6 +78,6 @@ Requirements: R7, R1, R2, R3, R5 | Task | Description | Requirements | Buildable outcome | Completion check | |---|---|---|---|---| | M5.1 | Remove road generation: the world has land, grass and trees, stone and water only; tools/check-world.ps1 fails on any road or bridge tile. | R1 | Worlds without roads | `pwsh -File tools/check-world.ps1 -Runs 10`; manual test MT5.1 | -| M5.2 | Worn paths: a walk count per cell (4,000 bytes), +1 when a person steps into a cell, -1 for every cell every 60 seconds (10 cells every 9 frames); at 128 a land, grass or tree cell becomes a path tile (dark brown patch, one per terrain so it can turn back), below 64 it turns back. Changed cells are redrawn in each buffer while it is hidden (people's dots and saved bytes kept), so the shown map never tears; a buffer in the middle of a rebuild restarts it in full. A test build (PATH_TEST: path at 8, back below 4, fast decay) makes it checkable. | R7, R2, R3, R5 | Busy cells turn into paths, unused paths fade | `pwsh -File tools/check-paths.ps1`, `tools/check-scroll.ps1 -Long`; manual test MT5.2 | +| M5.2 | Worn paths: a walk count per cell (4,000 bytes), +1 when a person steps into a cell, -1 for every cell every 60 seconds (10 cells every 9 frames); at 128 a land, grass or tree cell becomes a path tile (dark brown patch, one per terrain so it can turn back), below 64 it turns back. Changed cells are redrawn in each buffer while it is hidden (people's dots and saved bytes kept), so the shown map never tears; a buffer in the middle of a rebuild restarts it in full. A test build (PATH_TEST: path at 4, back below 2, one count less every 400 frames) makes it checkable. | R7, R2, R3, R5 | Busy cells turn into paths, unused paths fade | `pwsh -File tools/check-paths.ps1`, `tools/check-scroll.ps1 -Long`, `tools/check-scroll.ps1 -Long -PathTest`; manual test MT5.2 | Manual verification: see docs/manual-tests.md section M5. diff --git a/docs/verification-status.md b/docs/verification-status.md index 27fb55e..f639adb 100644 --- a/docs/verification-status.md +++ b/docs/verification-status.md @@ -20,10 +20,16 @@ manual = `pending`, `confirmed by user ()`, `problem reported ():