GitHub - leoherzog/openrct2-map: Generate web maps for Rollercoaster Tycoon 2

5 min read Original article ↗

OpenRCT2 Map Generator

OpenRCT2 Deno Node.js Leaflet

Generate a zoomable, pannable Leaflet tile map from any OpenRCT2 park save — like Dynmap or Unmined for Minecraft, but for RollerCoaster Tycoon 2.

Screenshot See leoherzog.github.io/openrct2-map for an example render. Thanks to fidwell for the awesome Cedar Point re-creation and to Mulpje for the astounding Tranquality Park park files!

Requirements

Requirement Notes
OpenRCT2 Auto-downloaded on first run, or pass --openrct2 <path>
RCT2 game assets Auto-downloaded on first run, or place in ./assets/RCT/
Deno 1.40+ or Node.js >=18.17 Deno is primary; Node works via npx tsx

On first run, the tool will automatically download the latest OpenRCT2 portable binary (Linux/Windows) and RCT2 game assets if they aren't already present. Use --openrct2 or --rct2-data-path to skip auto-download for that component.

RCT1 data (Data/csg1.dat) is only required if your park uses RCT1 objects (rides, scenery, paths) or RCT1 scenarios.

Usage

Important

Multiple runs will build up timeline history in the output directory. Only the deltas are saved between runs. This saves storage space, but means you cannot simply remove a directory to clear snapshots without breaking symbolic links. Use the --remove flag to clear unwanted snapshots from history, and the --clear flag to clear all snapshots and start fresh.

# Render a park and serve the result
deno run -A main.ts MyPark.park -o ./output
uv run python3 -m http.server -d ./output

# Build up a timeline — each run adds a snapshot
# (unchanged maps are skipped automatically)
deno run -A main.ts MyPark.park -o ./output --label "Week 1"
deno run -A main.ts MyPark.park -o ./output --label "Week 2"

# Force a snapshot even if the map hasn't changed
deno run -A main.ts MyPark.park -o ./output --force --label "Week 2 (copy)"

# Override screenshot flags (stormy weather, no guests)
deno run -A main.ts MyPark.park -o ./output -- --weather=3 --no-peeps

# List all snapshots
deno run -A main.ts --list -o ./output

# Rename a snapshot's label
deno run -A main.ts --rename 20260312-143022 --label "New label" -o ./output

# Remove a snapshot
deno run -A main.ts --remove 20260312-143022 -o ./output

# Clear all snapshots and start fresh
deno run -A main.ts MyPark.park -o ./output --clear

# Node alternative
npx tsx main.ts MyPark.park -o ./output

Note

On Windows, tile deduplication uses symbolic links, which require either Administrator privileges or Developer Mode to be enabled (Settings → Update & Security → For developers). Without one of these, you'll get os error 1314: A required privilege is not held by the client.

deno run main.ts --help

$ deno run -A main.ts --help
Usage: main.ts <savefile> [options] [-- openrct2-flags...]

Options:
  -o, --output <dir>       Output directory (default: ./output)
  --zoom <n>               Finest OpenRCT2 zoom level, 0 = closest (default: 1)
                           Renders at zoom n through 3 for native sprites at each level
  --rotations <list>       Comma-separated rotations to render (default: 0,1,2,3)
  --openrct2 <path>        Path to openrct2 binary/AppImage (default: auto-detect)
  --rct2-data-path <path>  Path to RCT2 data dir (containing Data/g1.dat) [auto-detected]
  --rct1-data-path <path>  Path to RCT1 data dir (containing Data/csg1.dat) [auto-detected]
  --label <text>           Label for this snapshot (default: current date/time)
  --list                   List all snapshots in the output directory
  --rename <timestamp>     Rename a snapshot label (use with --label)
  --remove <timestamp>     Remove a snapshot by its timestamp key
  --clear                  Clear all existing snapshots before generating
  --force                  Save snapshot even if map is unchanged from last run
  --tile-size <n>          Tile size in pixels (default: 256)
  --compression <0-9>      PNG compression level (default: 6, 0 = fastest)
  --effort <1-10>          PNG compression effort/strategy tuning
  --palette                Use indexed-color PNG (smaller files for pixel art)
  --skip-blanks <n>        Alpha threshold for skipping blank tiles (default: -1)
  --concurrency <n>        Sharp/libvips thread count (default: CPU cores)
  --single-zoom            Only render at the specified zoom level (skip native zoom pyramid)
  --domain <url>           Base URL for OG tags (e.g. https://example.com/map)
  -h, --help               Show this help

Auto-download: If no OpenRCT2 binary or game assets are found, the tool will
  attempt to download them automatically (GitHub Releases / archive.org).
  Use --openrct2 or --rct2-data-path to skip auto-download for that component.

Screenshot defaults (applied unless you override that specific flag after --):
  --transparent, --tidy-up-park, --weather=1

Extra flags after -- are forwarded to openrct2 screenshot, e.g.:
  deno run -A main.ts park.park -o out -- --no-peeps
  deno run -A main.ts park.park -o out -- --weather=3  (overrides default sunny)

OpenRCT2 screenshot flags (pass after --):
    --weather=<int>           weather to be used (0 = default, 1 = sunny, ..., 6 = thunder).
    --no-peeps                hide peeps
    --no-sprites              hide all sprites (e.g. balloons, vehicles, guests)
    --clear-grass             set all grass to be clear of weeds
    --mowed-grass             set all grass to be mowed
    --water-plants            water plants for the screenshot
    --fix-vandalism           fix vandalism for the screenshot
    --remove-litter           remove litter for the screenshot
    --tidy-up-park            clear grass, water plants, fix vandalism and remove litter
    --transparent             make the background transparent
    --draw-bounding-boxes     draw bounding boxes
    --draw-segment-heights    draw segment heights

License

Feel free to take a look at the source and adapt as you please. This source is licensed as follows:

Creative Commons License

openrct2-map is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Thanks

This project wouldn't be possible without:


About Me


Buy Me A Tea Found this helpful? Buy me a tea!