lampsauce-Map

My imaginary world, much like our own planet, has several land masses over a vast ocean. It also depicts several cities with varying populations. The ocean level varies with each generation, allowing for both huge continents and small island clusters to occur.

CODE

Variations of Generator

Process

This map generator creates a 3D terrain using Perlin noise. The map’s scale and ocean level is chosen at random. The points are stratified by whether or not they are below the ocean level. The points below the ocean are colored by mapping each depth to a corresponding HSL color range. I wanted the land masses to look like a treasure map, so I mapped the land points to a specified color range.

The number of cities is directly proportional to the amount of land. I was curious what it would look like if I could raise or lower the ocean level of a given map. If you use the left/right arrow keys the ocean level will raise and lower. The cities & populations will adjust accordingly.