Seeded noise
The same seed always makes the same world.
Math.random gives a different world every run, so you cannot share a cool map or reproduce a bug. A seeded random generator plus smooth noise (Perlin, simplex or value noise) turns a single number into the same terrain every time, and layering octaves adds natural detail.
Try this: Note the hills by the flag, walk far right, then come back. With Math.random() the hills have changed. Turn on Seeded and they are identical every time. New seed gives a new, repeatable world.
Walk far right, then back to the flag: the hills have changed.
Prompt bit
Works for 2D or 3D in any engine (Unity, Unreal, Godot, web). Paste the short one for a quick fix, or the detailed one when you want it done properly.
Generate terrain from seeded noise: build the noise from a dedicated seeded RNG (never the global one), sum 4 to 6 octaves with halving amplitude, keep each chunk under 0.1 s to generate, and save the seed so loading rebuilds the identical world.
Make procedural generation reproducible with seeded noise (2D or 3D; FastNoiseLite works in Unity, Godot (built in), Unreal and JS). Pick a seed (from the player, a date, or random once) and store it in the save. Create a dedicated seeded RNG (xorshift, PCG, mulberry32) per system so adding a new random call in one place does not change everything else. Sample smooth noise (simplex or Perlin) at world coordinates times a frequency, and sum octaves (fBm): amplitude halves and frequency doubles each octave, default 4 to 6. Remap to heights, biomes or density with curves. Generate chunks deterministically from (seed, chunk coordinates) so they can be generated in any order. Never use Math.random or engine global random inside generation. Show the seed in a debug overlay so bugs can be reproduced.
Where it's used
- Sandbox and survival: terrain, caves and biomes
- Roguelikes: daily seeds and shareable runs
- Space games: planets and starfields
- Textures: clouds, water and wood grain
- Animation: smooth camera shake and wobble
Common mistakes
Using the global random so runs never repeat, sharing one RNG across systems so any change reshuffles the world, white noise instead of smooth noise, one octave that looks blobby, and not saving the seed.
Writing this with an AI assistant? See our best AI coding assistants for game developers.
Missing a concept? Request one.



