Procedural Area Generator
A Godot editor tool that turns a small JSON recipe into an editable 3D area. Same recipe and seed always rebuild the exact same scene, so designers can hand-edit and regenerate without losing their work.

- Client
- Fiverr (@eutecticstudios)
- Role
- Tools Programmer
- Platforms
- PC
- Year
- 2025
This is a dev-time area generator that lives inside the Godot editor rather than in the shipped game. A designer picks a short declarative JSON recipe, presses Generate, and a full 3D area is built as a live preview under the open scene: rooms, winding tunnels, stairs, gates, lighting and spawn markers. Saving writes a plain .tscn to disk that any Godot developer can open and edit by hand. The tool never ships; the game ships the baked scene.
The core guarantee the client wanted is determinism. The same recipe plus the same seed produces the exact same scene down to node names and transforms, so a designer can generate a base, inherit a copy, hand-tune it, regenerate the base, and keep every override. All layout randomness flows from a single seeded RNG consumed in a fixed order; a separate hash-of-cell-coordinate source drives per-tile art variety, so adding or removing an asset variant changes only that one tile instead of reshuffling the whole map.
The generator is deliberately asset-agnostic. It references no file paths itself: a kit descriptor is the only place asset paths live, so swapping the kit produces a different-looking area from the same algorithm. That split (recipe says what to build, kit says which assets to build it from) is what lets a future biome reuse the whole pipeline with a new asset pack and only a lighting rig in code.
What I built
- Designed the recipe/kit split: a declarative JSON recipe describes the area (kind, size, seed, biome) while a separate kit descriptor holds every asset path, so the generator core references no files and any kit is swappable
- Built the deterministic layout pipeline: one seeded RandomNumberGenerator consumed in a fixed order (room graph, sizes, edge styles, grid placement) so a given seed always rebuilds an identical scene
- Kept per-tile art variety stable and independent by deriving it from a hash of the cell coordinate rather than the RNG stream, so editing a variant list disturbs only that cell
- Wrote the opening-based tunnel auto-tiler: pieces declare which cell edges they open onto in one canonical orientation, and the generator rotates and places straight / curve / T / cross pieces to match each corridor cell's walkable neighbours, honouring multi-cell footprints
- Separated the pure data transform (recipe+seed to placement records, no nodes) from the scene builder (records to nodes, collision baking, PackedScene.pack and save), so the algorithm stays portable
- Built the editor plugin and dock: recipe picker, seed field, live preview generation, random-seed regenerate, and Save Scene writing to res://generated/<id>.tscn with the seed stored as metadata
- Wrote AreaKitBuilder, a visual @tool that measures dropped-in .glb assets and writes the kit descriptor, so designers build kits without editing JSON by hand
Gallery



Breakdown

Determinism is the whole point. Because every layout decision reads from one seeded RNG in a fixed consumption order, seed 7 always yields this exact graph. Insert a random call in the middle and every downstream value shifts, changing the entire map for that seed, so the consumption order is treated as a contract.

Tunnel pieces are authored once, in a single canonical orientation, and declare which edges they open onto (N=-Z, E=+X, S=+Z, W=-X). The generator rotates each in 90-degree steps to match a corridor cell's open neighbours and reserves cells for pieces larger than one tile so nothing tiles underneath them.
The generator touches no asset paths. Kits are the only place files are named, so the same algorithm produces a cave, a dungeon, or any future biome purely by swapping the kit and adding a lighting rig. Empty asset slots fall back to built-in box/cylinder primitives, so a half-finished kit is always runnable.
What the client said
excellent work, took a few iterations but this will be very useful for our upcoming game
Credits
- Tool programming
- Bilal AhmadThe recipe/kit system, deterministic layout pipeline, tunnel auto-tiler, editor plugin, and kit builder described on this page.
- Cave art assets
- KenneyModular Cave Kit, kenney.nl, released under CC0. Used as the sample module kit; the generator is asset-agnostic and ships no art.
Built with
- Godot 4.7
- GDScript
- Editor plugin (@tool)
- Seeded RNG determinism
- GLB module kits
- Trimesh collision baking