A single-page, dependency-free procedural battlemap generator for tabletop RPGs. Click generate, get an instant dungeon / cave / crypt map — stone texture, mortar joints, cracks, rubble, moss and torch light are all drawn by plain math, not an AI image model.
Live demo: https://usagineko7865-debug.github.io/battlemap-generator/
Most free battlemap generators online are either paywalled after a few uses, require an account, or are Electron apps you have to install. This is one index.html file, runs entirely client-side, nothing is ever uploaded or stored — open it and it works.
- 3 themes: Dungeon (gray stone), Cave (warm rock + moss), Crypt (cold ossuary)
- 1540×1120px output, 70px grid squares — matches the default grid size in Roll20 and Foundry VTT (and ココフォリア)
- Optional grid overlay, optional torch light
- One-click PNG download
- No sign-up, no server, no tracking, no ads
- MIT licensed — free for personal or commercial use, no attribution required
It's a static file. Any static server works:
python3 -m http.server 8000
# open http://localhost:8000Or just open index.html directly in a browser (the canvas API works fine from file://, though a local server is recommended for consistent behavior across browsers).
- Randomly places 5–8 non-overlapping rectangular rooms on a 22×16 grid.
- Connects each room to the previous one with an L-shaped corridor, guaranteeing full connectivity.
- Computes a wall mask from the 8-neighborhood of the floor cells.
- Renders stone texture by upsampling low-resolution noise per theme palette, then layers mortar lines, cracks, rubble and (for cave/crypt) moss.
- Adds a soft warm radial glow at torch positions in larger rooms.
No image model, no external assets, no network requests after the page loads. Everything is <canvas> + a seeded PRNG (mulberry32).
MIT — do whatever you want with the generated maps or the code.
This project doubles as a free sample of what a small proc-gen toolkit can do. If you want hand-authored content instead of rolling the dice:
- Cthulhu Mythos one-shot scenario — ready-to-run crypt horror one-shot, PDF, full handouts
- Free-tier TRPG/stream BGM + SFX pack — 4 looping tracks + 5 SFX, procedurally synthesized
- Full shop — more procedurally-made TRPG and stream assets
Issues and PRs welcome.
