Skip to content

Map: crop to the full playable extent (we were clipping real map) - #19

Merged
goetchstone merged 1 commit into
mainfrom
map/full-playable-extent
Aug 1, 2026
Merged

Map: crop to the full playable extent (we were clipping real map)#19
goetchstone merged 1 commit into
mainfrom
map/full-playable-extent

Conversation

@goetchstone

Copy link
Copy Markdown
Owner

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

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>
@goetchstone
goetchstone merged commit 5211b8a into main Aug 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant