Home / Level Design / Procedural Map Generator

Procedural Map Generator

Make a dungeon, cave or island map in one click. Every map comes from a seed, so you can get the same map back any time. Export a PNG, a Tiled map with its tileset, or a CSV grid for your own code.

ZIP has map.png, map.tmj and tileset.png for Tiled, map.csv with tile IDs, map-autotile.csv with wall shapes, and objects.json with rooms, spawns and towns.

Pro batch export · 20 variations from your settings in one ZIP, each with every file above. See plans

Hover the map to see tile coordinates

Three generators

Dungeon places rooms that never overlap, then links them with corridors so every room can be reached. Extra loops add shortcuts so the layout is not a simple tree. Mixed shapes add round rooms. The start and the exit go in the two rooms that are farthest apart by walking distance. Dead-end rooms get a treasure chest, and doors mark where one-tile corridors enter a room.

Cave uses cellular automata. It starts from random rock and smooths it step by step into natural tunnels. Pockets that cannot be reached are filled in, so the cave is one connected space. Start and exit sit at the two ends of the longest path.

Island uses layered noise for height and moisture. Height decides sea, sand, grass, rock and snow. Moisture splits grass from forest. Rivers run downhill from the mountains to the sea, and towns are placed on flat land near water, spread apart.

Tile IDs in the CSV

MapIDs
Dungeon0 empty, 1 wall, 2 floor, 3 start, 4 exit, 5 door, 6 chest
Cave1 rock, 2 floor, 3 start, 4 exit
Island1 deep water, 2 shallow water, 3 sand, 4 grass, 5 forest, 6 rock, 7 snow, 8 river, 9 town

Wall autotiles

Real tilesets draw walls differently at edges, corners and ends. map-autotile.csv gives every wall tile an 8-bit neighbour mask, the same numbers most autotile systems use: north 1, north-east 2, east 4, south-east 8, south 16, south-west 32, west 64, north-west 128. A bit is set when that neighbour is also wall. Non-wall tiles are -1. The Tiled export already uses a 16-shape wall set, so edges show up the moment you open it.

Objects for your code

map.tmj has an Objects layer and objects.json has the same data. Rooms come as rectangles with a role (start, exit, treasure or normal). Start, exit, doors, chests and towns come as points. Positions are in pixels in Tiled and in tiles in objects.json. Godot 4 and Unity can read Tiled maps with free plugins, or you can read objects.json directly.

Why seeds matter

A seed is the recipe for one map. Write it down and you can rebuild the exact same layout later, share it with a teammate, or use it as a daily challenge level. Change one letter and you get a new world.