Version tile URLs so rebuilt maps cannot serve a previous build
Tile paths are stable across rebuilds but their contents are not: moving a map's `place` makes tiles/<id>/6/17/33.webp different imagery at the same URL. Combined with the immutable week-long cache added earlier, a browser that had seen an older build blended the two and drew duplicated, offset terrain -- visible as a second copy of Lighthouse. Each map now carries a `version` in world.json, hashed from its geometry, zoom range and source file stamp, and appended to every tile URL as ?v=. Re-tiled maps get fresh URLs; identical rebuilds keep the same version so nothing is re-fetched needlessly. Also corrects the runbook's base-layer table, which still listed the pre-correction layers for Woods, Reserve, Interchange and Streets. Verified: 733 tiles across seven map views, all carrying ?v=, zero broken, and the focused map topmost in every case. Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
1 parent
e656c7c96a
commit
f49a00bc98
4 files changed
+50
-10
No files matched your search
+19
-9
@@ -30,16 +30,22 @@ you have to look each time:
|
||||
| Map | Base layers |
|
||||
| --- | --- |
|
||||
| Customs, Customs Dorms | `LOCATION` |
|
||||
| Woods | `re3mr.com/Map&Art` (nested inside a wrapper group) |
|
||||
| Woods | `re3mr.com/Map&Art/Map&OverlayArt/{RawMapLayer,WaterDetail}` |
|
||||
| Lighthouse | `Day` (there is also a hidden `Night`) |
|
||||
| Shoreline | `Baselayer` |
|
||||
| Shoreline Resort | `BGCOLOR PATTERN`, `BASEMAP+2DLAYERS` |
|
||||
| Interchange | `Background`, `3DRENDER` |
|
||||
| Reserve | `Day copy`, `Color Fill 1`, `Group 5` |
|
||||
| Streets | `Layer 1`, `Map - 3D map portion…` |
|
||||
| Interchange | `3DRENDER` |
|
||||
| Reserve | `Day copy` |
|
||||
| Streets | `Map - 3D map portion…` |
|
||||
|
||||
Note the two shapes this takes: several maps need **more than one** top-level
|
||||
layer, and some bury the art **inside a wrapper group** (use a slash path).
|
||||
Note the shapes this takes: several maps need **more than one** top-level
|
||||
layer, and some bury the art **inside wrapper groups** (use a slash path —
|
||||
Woods is three deep).
|
||||
|
||||
Watch for layers that are really just plates. Interchange's `Background` and
|
||||
Reserve's `Color Fill 1` are solid white; Woods' `MapBlackout` and Streets'
|
||||
`Layer 1` are solid black. Including them hides the terrain underneath, so
|
||||
leave them out.
|
||||
|
||||
Also note any `shape` layers — psd-tools renders stroke-only vector shapes as
|
||||
solid fills, so they may need `excludeLayers`.
|
||||
@@ -53,10 +59,10 @@ solid fills, so they may need `excludeLayers`.
|
||||
"id": "woods",
|
||||
"name": "Woods",
|
||||
"psd": "sources/woods/woods.psd",
|
||||
"baseLayers": ["re3mr.com/Map&Art"],
|
||||
"baseLayers": ["re3mr.com/Map&Art/Map&OverlayArt/RawMapLayer"],
|
||||
"excludeLayers": [],
|
||||
"crop": null,
|
||||
"place": { "cx": 818, "cy": 652, "w": 380 }
|
||||
"place": { "cx": 814, "cy": 672, "w": 380 }
|
||||
}
|
||||
```
|
||||
|
||||
@@ -92,7 +98,7 @@ A failed map no longer aborts the batch; check the summary at the end.
|
||||
## 4. Position it on the world map
|
||||
|
||||
The base of the canvas is `sources/overall/overall.jpeg`, rotated by
|
||||
`world.rotate` (31°) so north is up. `place` is in **rotated overall-map
|
||||
`world.rotate` (35°) so north is up. `place` is in **rotated overall-map
|
||||
pixels** — the north-up image you actually look at.
|
||||
|
||||
```bash
|
||||
@@ -156,6 +162,10 @@ python tools/build.py --force-export # re-render even if base.png is current
|
||||
`build.py` skips the PSD render when `base.png` is newer than the PSD, so
|
||||
iterating on `place` and `crop` is seconds, not minutes.
|
||||
|
||||
Retiling a map changes its `version` in `world.json`, which is appended to its
|
||||
tile URLs as `?v=`. That is what stops a browser mixing a previous build's
|
||||
tiles with the new ones — you do not need to hard-reload after a rebuild.
|
||||
|
||||
---
|
||||
|
||||
## How placement works
|
||||
|
||||
Reference in new issue
Block a user