Procedural Generators
Six built-in generators for creating maps algorithmically.
TileForge includes procedural map generators that can create complete maps from a few parameters. Open the generator panel via Generate > Generate Map.
Using the Generator Panel
The generator dialog lets you configure:
- Generator type — select from the six available generators
- Size preset — choose from Tiny (20x15) to Huge (150x100), or enter custom dimensions
- Seed — a number that determines the random output (same seed = same map)
- Per-generator options — each generator has unique settings
Click Generate to create the map. The result replaces the current map in the editor.
Size Presets
| Preset | Dimensions |
|---|---|
| Tiny | 20 x 15 |
| Small | 40 x 30 |
| Medium | 64 x 48 |
| Large | 100 x 75 |
| Huge | 150 x 100 |
Deterministic Output
All generators use a seeded pseudo-random number generator (LCG PRNG). The same seed always produces the same map, making results reproducible and shareable. Enter a specific seed number or leave it blank for a random one.
Forest Generator
Creates outdoor nature maps with:
- Grass terrain with variation
- Trees placed via density sampling
- Paths connecting areas
- Clearings (open areas)
- Water features — ponds and streams
- Decorative elements
Village Generator
Creates settlement maps with:
- Buildings with interiors (lot placement)
- Roads connecting buildings
- Town square (central open area)
- Gardens and fences around buildings
- Street decorations (lamps, signs, barrels)
- Surrounding trees and terrain
Dungeon Generator
Creates classic dungeon layouts using BSP (Binary Space Partitioning):
- Rooms of varying sizes
- L-shaped corridors connecting rooms
- Doors at room entrances
- Torch placement along walls
- Room decoration via templates
Cave Generator
Creates organic cave systems using cellular automata:
- Organic, natural-looking cave shapes
- Region connectivity (ensures all areas are reachable)
- Water pools in low areas
- Crystal formations
- Stalagmites and rock formations
Ruins Generator
Creates decayed building complexes:
- Partially destroyed walls
- Cracked and broken floor tiles
- Overgrowth (vines, grass growing through)
- Rubble and debris
- Connecting trails between structures
Interior Generator
Creates building interior layouts using recursive room subdivision:
- Rooms by type: bedroom, kitchen, storage, living room, study
- Doors connecting rooms
- Furniture templates matched to room type
- Wall and floor variation
Content Providers
Generators need to know which tiles to use for walls, floors, water, trees, etc. This is handled by content providers:
- LocalContentProvider — uses the tilesets currently loaded in the editor. The generator analyzes tile images to pick appropriate tiles.
- BundleContentProvider — reads tile mappings from pre-built JSON bundle files.
If no content provider gives a mapping for a specific element, the generator falls back to default tile IDs. Generated maps may show numeric IDs instead of graphics until you load the appropriate tileset images.