The Map Yard draws the tile grid and frames the coast #134

Owner

Tracker: #3619

Step 4b of plan #3558. It gives the Map Yard the views and points that the draw checks and renders of #3620 and #3621 read. It changes no drawing in the game: only src/mock/map-yard.ts and src/client/map.phone.ts change.

The yard

  • &grid draws the tile grid over everything, in magenta. Each tile edge lies at the height of the ground it bounds: the land's top (TILE_TOP) between two land tiles, and the water's surface beside water.
  • &zoom=<zoom> draws any view at that zoom instead of its own, so each coast view renders at 1× and at 0.5×.
  • Coast views: view=street, view=woods and view=highway. The default yard island (seed 42) has no highway within 2 tiles of water and only one coast street, in a neutral city with no open coast site beside it. So the coast views draw an island of their own, seed 68 at the yard's size and lake share, with its grown cities and a Factory and nothing else: no force, shells, scars or strike.
    • Street: city 11 stands on a lake's shore with three streets on coast tiles. Player 1 holds it and a Factory at 103,52 on its open coast ground, a site the shared site rule opens.
    • Woods: the woods wrap water corners all along the island's south-west coast.
    • Highway: north of the island's centre the highway runs along the sea, 11 water tiles lying within its shoulder's half width (0.66) of its line.
  • Draw-check points: a coast view publishes data-probes, JSON of screen points in CSS pixels:
    • water: 0.15 inside each water tile, at the middle of each edge it shares with land.
    • corner: 0.1 in, along both axes, from each water tile's corner that three land tiles wrap. woodsWrap lists again those whose three land tiles are all woods.
    • land: 0.25 inside each coast land tile, at the middle of each edge it shares with water.
    • convex: 0.25 in, along both axes, from each land tile's convex corner, where the other three tiles are water or lake.
    • Each kind is split by what the land beside the point carries: land, woods (Forest or Tree) or highway (within the shoulder's half width plus 0.25 of a highway's line). Only known tiles count.
    • A point is published only where the ground shows. The yard renders the scene's depth once and keeps a point only if the first surface drawn there, and within 2 device pixels of it, lies no higher than TILE_TOP + 0.05. So no point sits under a tree, a building or the Factory.
  • Without &grid, the existing views draw as before. The controls list three more views.
  • On main's drawing, no published water or wrapped-corner point draws as water in any finish. The bank covers about 1.5 tiles of water, and the 1-tile-wide lake beside the street view's Factory draws wholly as grass. This is the baseline that #3620's checks flip.

The phone test

map.phone.ts loads each coast view in every finish at 1×, under reduced motion. It checks:

  • every load draws without a WebGL or shader error;
  • each view publishes land points, and every land and convex point draws as land, not as water (blue over red by more than 30);
  • the woods view holds a water corner the woods wrap;
  • the highway view holds a highway beside the water;
  • &grid adds one draw call.
Tracker: [#3619](https://sak.swipelab.com/tasks/3619) Step 4b of plan [#3558](https://sak.swipelab.com/tasks/3558). It gives the Map Yard the views and points that the draw checks and renders of [#3620](https://sak.swipelab.com/tasks/3620) and [#3621](https://sak.swipelab.com/tasks/3621) read. It changes no drawing in the game: only src/mock/map-yard.ts and src/client/map.phone.ts change. ## The yard - **`&grid`** draws the tile grid over everything, in magenta. Each tile edge lies at the height of the ground it bounds: the land's top (TILE_TOP) between two land tiles, and the water's surface beside water. - **`&zoom=<zoom>`** draws any view at that zoom instead of its own, so each coast view renders at 1× and at 0.5×. - **Coast views:** `view=street`, `view=woods` and `view=highway`. The default yard island (seed 42) has no highway within 2 tiles of water and only one coast street, in a neutral city with no open coast site beside it. So the coast views draw an island of their own, seed 68 at the yard's size and lake share, with its grown cities and a Factory and nothing else: no force, shells, scars or strike. - **Street:** city 11 stands on a lake's shore with three streets on coast tiles. Player 1 holds it and a Factory at 103,52 on its open coast ground, a site the shared site rule opens. - **Woods:** the woods wrap water corners all along the island's south-west coast. - **Highway:** north of the island's centre the highway runs along the sea, 11 water tiles lying within its shoulder's half width (0.66) of its line. - **Draw-check points:** a coast view publishes `data-probes`, JSON of screen points in CSS pixels: - `water`: 0.15 inside each water tile, at the middle of each edge it shares with land. - `corner`: 0.1 in, along both axes, from each water tile's corner that three land tiles wrap. `woodsWrap` lists again those whose three land tiles are all woods. - `land`: 0.25 inside each coast land tile, at the middle of each edge it shares with water. - `convex`: 0.25 in, along both axes, from each land tile's convex corner, where the other three tiles are water or lake. - Each kind is split by what the land beside the point carries: `land`, `woods` (Forest or Tree) or `highway` (within the shoulder's half width plus 0.25 of a highway's line). Only known tiles count. - A point is published only where the ground shows. The yard renders the scene's depth once and keeps a point only if the first surface drawn there, and within 2 device pixels of it, lies no higher than TILE_TOP + 0.05. So no point sits under a tree, a building or the Factory. - Without `&grid`, the existing views draw as before. The controls list three more views. - On main's drawing, no published water or wrapped-corner point draws as water in any finish. The bank covers about 1.5 tiles of water, and the 1-tile-wide lake beside the street view's Factory draws wholly as grass. This is the baseline that #3620's checks flip. ## The phone test map.phone.ts loads each coast view in every finish at 1×, under reduced motion. It checks: - every load draws without a WebGL or shader error; - each view publishes land points, and every land and convex point draws as land, not as water (blue over red by more than 30); - the woods view holds a water corner the woods wrap; - the highway view holds a highway beside the water; - `&grid` adds one draw call.
agra merged commit b9556de29b into task/3558-build-inside-the-city-and-a-flat-map 2026-10-23 15:35:00 +03:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
agra/mini-alert!134
No description provided.