Procedural Landmass Generator

Table of Contents

Control Panel

Generated under CC-BY-NC 4.0
For commercial use: Click Here

Landmass Settings

100
7
15
0.05
1

Tree Settings

12
0.6
3
6

Display Settings

0
0
200
2
3

A landmass generator made using noise functions and cellular automata.

I thought it would be interesting to show how Kingdom Incremental started out. This toy implementation of an island generator was actually the first thing that I made for the game long before I had the idea of what it would become. The actual system that I use in engine has changed quite a lot from this, but the core concepts are still the same.

Interactive Generator

Explanation

The core idea behind the infinite procedural worlds in many popular games like Minecraft, Terraria, and countless others is something called "Noise". The term comes from signal processing. But in the context of procedural content generation (PCG), it is generally thought of as a way to get random looking values that are deterministic.

The fact that a noise function will look random, but reproduce the exact same value every time for a given input makes it perfect for PCG. Noise comes in a lot of different flavors. For PCG, you'll commonly see Perlin or Simplex noise.

Red Blob Games created an eloquent explanation of how you can stack noise in different octaves to create realistic looking terrain. For my initial generator, I followed a very similar approach.

Trees and Sand Generation

The trees and sand are generated with something a bit different. They get seeded using noise, but then any value below a certain threshold gets discarded. The remaining locations then get clumped together using cellular automata.

The basic idea here is that every position looks at its neighbors to determine if it should grow, die, or stay the same. The rules that dictate how a cell changes can vary wildly based on the desired outcome. You can even make an automata that resembles something alive.

Here the trees are simply counting their neighbors and growing out if there are more nearby trees than the growth threshold. There is an excellent write up of how this process works on RogueBasin.

Share this article: