feat: ship high-detail live world map#943
Conversation
Adopt SeedMapper-style quality while keeping the procedural generator as a safe fallback: - Capture loaded chunk top blocks (including water, foliage, and player builds) into an immutable overlay passed to the map worker. - Maintain a per-chunk map surface cache that stays current with content revisions and rebuilds in one pass per generation. - Invalidate the map on place/break and on chunk arrival/unload, with a short debounce so streaming churn cannot starve the detailed pass. - Replace getColumnInfoReduced with a dedicated getMapSampleReduced path that uses accurate map sampling with water classification. - Add per-block live colors with terrain-modifier-aware accuracy at near zoom and an 8-block representative footprint for distant views. - Use a 1024x1024 map texture so the default zoom samples one world block per map texel. - Add a 256x256 progressive preview while full sampling runs. - Replace global terrain modification with a one-sample variant for map sampling; full nine-sample blend remains for chunk generation. - Render with linear-filtered texel region drawing, world-coordinate grid/labels, scale bar, and documented lighting/water/contours. Map now reflects player edits, actual trees/foliage, and water, while preserving fast interaction and procedural terrain outside loaded chunks. Signed-off-by: micqdf <micqdf@users.noreply.github.com> Signed-off-by: MichaelFisher1997 <contact@michaelfisher.tech>
kcov coverageLine coverage ran for this PR and uploaded a non-blocking report artifact named |
|
Found 1 test failure on Blacksmith runners: Failure
|
📋 SummaryLinked issues: The PR description does not reference any specific issue ("Closes #N" / "Fixes #N"). The PR is labeled This PR replaces the generator-only M-key map with a SeedMapper-style live overlay backed by a 1024×1024 texture. It introduces an immutable 📌 Review Metadata
No linked issues to verify against. Highlights and validation claims (chunk surface rebuild, foliage/water capture, mutation invalidation, superseded requests) are all backed by tests that pass under 🔴 Critical Issues (Must Fix - Blocks Merge)✅ All previously reported critical issues have been resolved (none were reported previously). None identified.
|
| Principle | Score | Notes |
|---|---|---|
| Single Responsibility | 8 | LoadedSurfaceOverlay cleanly isolates immutable snapshot data; MapController owns pan/zoom, WorldMap owns rendering. captureLoadedMapSurface arguably mixes "viewport culling" with "snapshot copy" but stays focused. |
| Open/Closed | 8 | New vtable entries (getColumnInfoReduced, getMapSampleReduced, column_info_thread_safe) are optional with documented fallbacks, so existing generators keep working without code changes. |
| Liskov Substitution | 9 | All four generators (overworld, overworld-v2, flat, test) set column_info_thread_safe=true consistently, and the fallback MapSample builder ensures any generator without a reduced sampler still conforms. |
| Interface Segregation | 8 | The Generator.VTable grew by two optional function pointers plus a bool rather than a separate MapSampler interface. Acceptable for the size, but the vtable is becoming a kitchen sink. |
| Dependency Inversion | 7 | WorldMap depends on the Generator abstraction (good), but MapController now depends directly on the World concrete struct (line 14 of map_controller.zig) rather than IWorld, slightly tightening the coupling. |
| Average | 8.0 |
🎯 Final Assessment
Overall Confidence Score: 82%
Confidence Breakdown:
- Code Quality: 88% (clean structure, good comments, proper errdefer/defer, comprehensive tests)
- Completeness: 90% (delivers all highlights listed in the PR body; tests cover the claimed behaviors)
- Risk Level: 70% (introduces a real but cosmetic data race; adds significant threading complexity to a previously synchronous module)
- Test Coverage: 85% (new tests for surface rebuild, foliage/water, superseded requests, parallel render slices; missing a test that exercises the coordinator-publishes-while-capture-runs race window)
Merge Readiness:
- All critical issues resolved
- SOLID average score >= 6.0
- Overall confidence >= 60%
- No security concerns
- Tests present and passing (verified
zig build test,zig fmt --check, and targeted filter runs all green)
Verdict:
MERGE WITH FIXES — Solid, well-tested feature work; the shared-lock write in captureLoadedMapSurface racing against the coordinator's unlocked rebuildMapSurface should be tightened (e.g., gating capture on state == .generated) before merge, but the issue is cosmetic and self-correcting if you choose to follow up post-merge.
{
"reviewed_sha": "c527e973d1d5532d8bbcbd09e2b8089f70383841",
"critical_issues": 0,
"high_priority_issues": 0,
"medium_priority_issues": 1,
"overall_confidence_score": 82,
"recommendation": "MERGE_WITH_FIXES"
}Signed-off-by: MichaelFisher1997 <contact@michaelfisher.tech>
|
All checks pass. The fix commit resolves all 4 previously reported issues, introduces no new problems, and all tests + ReleaseFast build succeed. Here is my review: 📋 SummaryLinked issues: None. The PR description does not reference any specific issue ("Closes #N" / "Fixes #N"), and the PR is labeled The PR (2 commits) replaces the generator-only M-key map with a SeedMapper-style live overlay backed by a 1024×1024 texture, capturing actual chunk blocks/trees/foliage/water/player edits into an immutable per-request snapshot. The second commit ( 📌 Review Metadata
No linked issues to verify against. 🔴 Critical Issues (Must Fix - Blocks Merge)✅ All previously reported critical issues have been resolved (none were reported previously). None identified.
|
| Principle | Score | Notes |
|---|---|---|
| Single Responsibility | 8 | LoadedSurfaceOverlay isolates immutable snapshot data cleanly; captureLoadedMapSurface stays focused on viewport-culled copy. |
| Open/Closed | 8 | New vtable entries (getColumnInfoReduced, getMapSampleReduced, column_info_thread_safe) are optional with documented fallbacks; existing generators work unchanged. |
| Liskov Substitution | 9 | All four generators set column_info_thread_safe=true consistently; fallback MapSample builder ensures conformance. |
| Interface Segregation | 8 | VTable grew by two optional pointers + a bool rather than a separate interface. Acceptable for size, but the vtable is becoming a kitchen sink. |
| Dependency Inversion | 7 | WorldMap depends on Generator abstraction; MapController now depends on concrete World (map_controller.zig:14) rather than IWorld, tightening coupling slightly. |
| Average | 8.0 |
🎯 Final Assessment
Overall Confidence Score: 88%
Confidence Breakdown:
- Code Quality: 90% (clean structure, good comments explaining the synchronization invariant, proper errdefer/defer, comprehensive tests)
- Completeness: 92% (delivers all highlights; fix commit addresses every prior review concern)
- Risk Level: 80% (threading complexity is now correctly guarded by the state-machine invariant; the coupling between coordinator publish order and capture skip condition is documented)
- Test Coverage: 88% (new tests for surface rebuild, foliage/water, superseded requests, parallel slices, dynamic worker count; the race-window skip is implicitly covered by the generation flow)
Merge Readiness:
- All critical issues resolved
- SOLID average score >= 6.0
- Overall confidence >= 60%
- No security concerns
- Tests present and passing (verified
zig build test,zig fmt --check, ReleaseFast build, and targeted filter runs all green)
Verdict:
MERGE — All previously reported issues are resolved by the synchronization fix commit, no new issues are introduced, and the full test suite + ReleaseFast build pass; confirm the Blacksmith re-run is green since the original failure predated the fix.
{
"reviewed_sha": "531cbc635448cc72dfd319b41d3c5cb2a93a8d9f",
"critical_issues": 0,
"high_priority_issues": 0,
"medium_priority_issues": 0,
"overall_confidence_score": 88,
"recommendation": "MERGE"
}

Replaces the generator-only M-key map with a SeedMapper-style live overlay: actual chunk blocks, trees, foliage, water, and player edits now show in real time, backed by a 1024x1024 source texture with progressive preview and procedural fallback outside loaded chunks.
Highlights:
Validation: