Map: crop to the full playable extent (we were clipping real map) - #19
Merged
Conversation
Owner: "the map needs to be right first, and it is not." It was not — the playable rectangle came from the war3map.w3i CAMERA bounds. The camera rect is where the VIEW may scroll, and WC3 keeps it INSIDE the terrain, so cropping to it silently deleted real playable map. Measured, it was short on ALL FOUR sides: east 448u of navigable sea cut off the EAST lane south 192u, west 64u, north 192u and the Flux Repair System (-1344,-7552) fell outside the map entirely — a structure we had simply deleted from the game. The 3-cell "WEST_EXTEND" fudge added earlier (so one shop stopped falling off the grid) was the tell that the rect was wrong; it is now gone. The rect is DERIVED FROM THE DATA: the smallest tilepoint-aligned rect covering every sailable wpm cell plus every placed structure, padded one tilepoint. Self-correcting — it can never clip playable water or a building again. Grid 162x226 -> 176x234 (64u cells unchanged). Also: the water-fraction gate was an absolute band calibrated on the old crop, so widening the rect tripped it even though classification was identical. It now gates on DRIFT from the raw wpm over the SAME rect (|drift| <= 0.02) — crop-independent, and a truer test of "we neither over- nor under-watered". Gates: 16/16 shops sea-reachable, bases connected, G6 lane topology 0 mismatches, 0 structures outside the map. 1,249 tests green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The playable rect came from the w3i CAMERA bounds, which WC3 keeps inside the terrain — so we clipped real map on all four sides (worst: 448u of the east lane) and dropped the Flux Repair System off the map entirely. The rect is now derived from the data (all sailable water + all structures). Water gate made crop-independent. 1,249 tests green.
🤖 Generated with Claude Code