Oliver Wakeford
All projects
Procedural generation
Procedural generationShipped2025

Terrain Generation in a Terminal

Three generation algorithms, two text renderers, no graphics engine

Procedural GenerationGraphicsAlgorithms

Built with

C#.NET 8

A C# console application that generates a heightmap and renders it as text. Two renderers: a plain ASCII one using nine characters for nine height bands, and a colour one using the Unicode block characters from ▁ to █ over an eight-step gradient running dark blue to red. Both print a legend and the minimum, maximum, average and range of the heights afterwards, because a picture of terrain tells you very little about whether the numbers underneath it are sensible.

Three generators. Random height per cell, which is there mostly as a control and looks like static. Perlin noise at four octaves, persistence 0.5 and lacunarity 2.0, with a Fisher-Yates-shuffled permutation table. And midpoint displacement, the diamond-square method, bilinearly interpolated onto the fixed console grid.

This predates my bachelor's thesis by about six weeks and shares no code with it. It is not an early version of that project, it is a separate exercise in the same subject, and I am including it because it is the point where terrain generation stopped being a thing I read about and became a thing I had written.

It does very little. The grid is fixed at 70 by 35, the parameters are not adjustable from inside the app, there is no save or load, and there is no erosion or smoothing pass, so what comes out is raw noise shaped like a landscape rather than anything a geologist would recognise.

What this does not show

  • A semester project at Charles, and early work. It is not the thesis and does not share code with it.
  • Fixed 70 by 35 grid. Parameters are not adjustable from inside the application.
  • No erosion or smoothing pass, so the output is noise shaped like terrain rather than plausible geology.
  • No save, no load, no tests.