Procedural GenerationWorld

World content, encounters, or items are generated algorithmically at runtime from a seed rather than authored by designers.

The map is rebuilt from a seed each cycle — the same number always yields the same layout.

How procedural generation works in Godot

Content is built at runtime from a seed, so the same seed reproduces the same world. The seed in, deterministic output out — that reproducibility is the discipline.

RandomNumberGeneratorprimitive

A seeded RNG instance. Set its seed once and every draw is reproducible — share the seed, regenerate the identical dungeon.

var rng = RandomNumberGenerator.new()
rng.seed = hash("level-42")
var rooms = rng.randi_range(8, 14)

FastNoiseLiteprimitive

For organic terrain, sample coherent noise instead of pure random. Same seed and coordinates always give the same height — smooth, repeatable worlds.

var n = FastNoiseLite.new()
n.seed = rng.seed
var h = n.get_noise_2d(x, y)   # -1..1 height

TileMapLayernode

A common output target: write generated cells into the tilemap so the algorithm's result becomes a playable space.

for y in H: for x in W:
    $Map.set_cell(Vector2i(x,y), 0, pick_tile(noise(x,y)))

In short: Random seed passed to generator function; noise or rule-based algorithm builds output array; reproducible from same seed

Retro games that use procedural generation

9 catalogued game(s) use this mechanic, spanning 1980–1996.

Related world mechanics

▶ Explore Procedural Generation interactively — see every game + the Godot system