Extracts only the base map art from re3mr PSDs (the top-level LOCATION group), tiles it to WebP, and renders every map on one shared world canvas. Pipeline: psd_tree -> export_base -> tile -> build -> preview, driven entirely by maps.json. Adding a map is a config change. Maps are placed on an 8192px grid (tileSize * 2^maxZoom) so a cell's tile index shift is exactly cell * 2^z at every zoom. Each map keeps its own locally numbered pyramid and the browser translates on the fly, so adding a map never re-tiles the others. excludeLayers works around psd-tools rendering stroke-only vector shapes as solid fills, which otherwise buries Customs under a white fill. Co-Authored-By: Claude Opus 5 <[email protected]>
TarkovMap
Self-hosted, mobile-friendly Escape from Tarkov map viewer. Layered PSDs go in, a Leaflet tile pyramid comes out, and every map — related or not — sits side by side on one shared canvas you can pan across.
Only the base map art is extracted. Markers, spawns, legends, captions and titles are dropped during the render.
Quickstart
python -m pip install -r tools/requirements.txt
python tools/build.py
python server/serve.py
Open the printed URL. The LAN address works from a phone on the same network.
Source PSDs are not in the repo (see .gitignore) — get them from the shared
drive and put them under sources/.
Adding a map
See docs/adding-a-map.md. Short version: run
tools/psd_tree.py to find the group holding the art, add an entry to
maps.json, run tools/build.py. No application code changes.
Layout
maps.json the only thing you edit to add or change a map
tools/
psd_tree.py inspect a PSD's layer tree
export_base.py PSD -> build/<id>/base.png (base group only)
tile.py base.png -> web/tiles/<id>/{z}/{x}/{y}.webp
build.py orchestrator; also writes web/data/world.json
preview.py stitch built tiles into one overview image
common.py config loading + the world-grid maths
server/serve.py dependency-free static server with sane cache headers
web/ the site: index.html, app.js, style.css, vendored Leaflet
sources/ gitignored — source PSDs
build/ gitignored — intermediate PNGs
web/tiles/ gitignored — generated tiles
How the shared canvas works
Maps are placed on a grid of 8192 × 8192 px cells (tileSize · 2^maxZoom). At
that cell size, a map's tile indices shift into world coordinates by exactly
cell · 2^z at every zoom — always an integer. So each map keeps its own
locally numbered pyramid, the browser translates on the fly, and adding a map
never re-tiles the others.
A map must fit in one cell. Raising maxZoom in maps.json doubles the cell.
Current maps
| Map | Source size | Tiled | Tiles |
|---|---|---|---|
| Customs | 7832 × 5016 | 7832 × 3015 | 503 (8.4 MB) |
| Customs — Dorms | 4301 × 4904 | 4301 × 4904 | 469 (1.4 MB) |
Licence
Map art is by re3mr.com under CC BY-NC-SA 4.0. Attribution is shown in the viewer and must stay there. Use is non-commercial, and derivative map images inherit the same licence. Local and LAN hosting is fine; get sign-off before hosting publicly.