DevTools Logo

Perlin & Simplex Terrain Generator

Perlin & Simplex Terrain Generator

Generate deterministic 2D landscapes with layered procedural noise in your browser

Terrain settings

Same seed and settings always produce the same map. Increase octaves for finer detail.

About

Explore deterministic procedural terrain with adjustable seed, scale, noise algorithm, octave detail, and color palettes. Everything runs client-side.

Examples

Reproducible island

Input
generateTerrain({ width: 12, height: 8, seed: "island", algorithm: "perlin" })
Output
identical values and levels on every run

The seeded permutation table makes the same seed replay the exact same heightmap.

Detail from octaves

Input
fractalNoise2D(x, y, { seed: 11, scale: 7, octaves: 5 }) vs octaves: 1
Output
higher variance, visibly rougher terrain

Each octave doubles frequency at decaying amplitude, layering fine detail over broad shapes.

About this tool

Perlin Simplex Terrain builds seeded heightmaps with generateTerrain({ width, height, seed, algorithm, scale, octaves, lacunarity, gain }): values is the normalized [0, 1] grid and levels maps each cell to water, sand, grass, rock, or snow. Single samples come from perlinNoise2D, simplexNoise2D, and the octave-summing fractalNoise2D.

Elevation bands are fixed by TERRAIN_THRESHOLDS: water from 0, sand from 0.38, grass from 0.48, rock from 0.72, snow from 0.86. Display colors come from TERRAIN_PALETTES classic, sunset, and monochrome.

Noise is deterministic and client-side: string seeds hash via FNV-1a into a shuffled 512-entry permutation table, so the same seed and options always yield the identical map on any machine.

How to use this tool

  1. Size the map

    Set width/height cells, then fix a seed string or number you can replay later.

  2. Choose the algorithm

    Pick perlin for classic gradient noise or simplex for the lower-artifact variant — same seed, visibly different maps.

  3. Tune scale and octaves

    Raise scale for broader continents, add octaves (with lacunarity and gain) for finer detail.

  4. Read values and levels

    Use values for custom shading and levels for the water/sand/grass/rock/snow band of each cell.

Use cases

Prototyping game maps

Generate seeded islands with stable water/grass/rock bands for level mockups.

Comparing noise algorithms

Render perlin versus simplex from the same seed to judge artifacts and character.

Teaching fractal noise

Show how octave stacking turns smooth gradients into convincing terrain.

Common mistakes

Mistake:Expecting different maps from the same seed.

Fix:Seeds are exact replay keys — change the seed, algorithm, scale, or octaves when you want a new landscape.

Mistake:Reading raw noise as already normalized.

Fix:Use fractalNoise2D or generateTerrain values (clamped to [0, 1]); raw perlin/simplex samples are centered near zero and unclamped.

Mistake:Assuming water means below sea-level math.

Fix:Water is simply value < 0.38 by threshold — re-tune TERRAIN_THRESHOLDS bands instead of shifting raw values.

Frequently asked questions

What does this tool do?

It builds seeded heightmaps with generateTerrain({ width, height, seed, algorithm, scale, octaves, lacunarity, gain }) returning normalized [0, 1] values plus water/sand/grass/rock/snow levels, with perlinNoise2D, simplexNoise2D, and fractalNoise2D for single samples.

Do perlin and simplex give the same map for one seed?

No — the same seed through different gradient/sampling paths yields visibly different maps, which is exactly how you compare their character. Either choice replays identically on its own.

Is my terrain uploaded or stored?

No. Seeded permutation shuffling, noise sampling, and band classification run fully client-side.

Why is my map flat, or all water?

A very large scale flattens features and low octaves remove detail — lower scale and add octaves. All-water means values sit under 0.38; reseed or shift the threshold bands for more land.

References & standards