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
| Map | IDs |
|---|---|
| Dungeon | 0 empty, 1 wall, 2 floor, 3 start, 4 exit, 5 door, 6 chest |
| Cave | 1 rock, 2 floor, 3 start, 4 exit |
| Island | 1 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.