https://github.com/dested/fabletest-mapviewer
https://github.com/dested/fabletest-mapviewer
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/dested/fabletest-mapviewer
- Owner: dested
- Created: 2026-06-10T02:49:39.000Z (17 days ago)
- Default Branch: main
- Last Pushed: 2026-06-10T03:00:17.000Z (17 days ago)
- Last Synced: 2026-06-15T15:34:44.695Z (12 days ago)
- Language: TypeScript
- Size: 285 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Worldsmith
Procedural overworld map generator built on the
[Kenney Map Pack](https://kenney.nl/assets/map-pack) (CC0) — Super Mario World-style
island maps with layered elevation, climate biomes, and a numbered quest route.
```sh
npm install
npm run dev
```
## How it works
- **Elevation** — domain-warped simplex fBm with a radial ocean falloff. The sea level is
picked as a quantile of the elevation field, so the *Land cover* slider is literal.
- **Tiling** — the land mask is morphologically cleaned until every cell has valid art
(no 1-wide spits, no opposite-side water), then resolved against the autotile catalog
in `src/tiles.ts`, which was derived by pixel-classifying all 188 tiles.
- **Elevation layers** — cells above the highland/peak quantiles form eroded sub-masks
that are autotiled again and stacked: grass → stone → snow, or sand → savanna → dirt
mesas in hot climates. The pack's south-facing cliff tiles sell the height.
- **Biomes** — per-island temperature/moisture averages (latitude gradient + noise +
user bias) choose between sand, grass, stone, snow, dirt, and savanna.
- **Quest route** — farthest-point sampling picks level locations (favoring high
ground), a greedy tour orders them, and Dijkstra legs connect them — preferring flat
land, climbing cliffs when needed, and ferrying across water when *Sea routes* is on.
Stops get numbered SMW-style boxes; mid-leg cells get green diamond nodes.
- **Life** — biome-weighted decorations, landmarks near quest stops (castles, pyramids,
igloos…), treasure on secret islands, and a little hero who walks the route.
Everything regenerates live from the sliders; the URL accepts any param as a query
override (e.g. `/?seed=42&temperature=-0.8`). Export the full-resolution map with the
PNG button.