Terrain Generation


This project is still in active development. For now, reload the page to generate a new island. Click in the map, then press the left and right arrow keys to show elevation, moisture, and biomes.Inspired by a board game Smallworld as well as the world creation from games like Minecraft and Dwarf Fortress, I was curious to see how easy it would be to generate a game world for an arbitrary board game set on an island.


The terrain generation happens in a set of discrete stages, beginning with a Voronoi diagram based on Perlin noise. Those regions are relaxed and massaged a little to produce a more uniform region size to create smoother transitions later. Oceans are assigned to each vertex, again based on Perlin noise, which drives the coastlines. With coastlines, it isn’t difficult to generate elevation by counting inwards from the coast. Rivers and lakes are generated by selecting origin points and tracing down the elevations, getting wider as they go further.


With the goal being generation of an island for a game like Risk, Smallworld or Tropico, I feel like I’m well on the way. Though there is very little control in the overall shape of the island at this point, and the generator does little to detect when an island is unsuitable.


The biggest challenge has been determining which order to assemble the various parts of the island. For example, I originally started with elevation and ran that to create a water level, but it produced some really unpleasant results (including maps that contained almost entirely land or water, maps that were more or less flat, or had really bland and uninteresting coastlines. The largest challenge for me will be rendering the map once I have all the data complete. I’d like to create much more visually complex coastlines, rivers, and lakes, as well as blend textures to show off the biome information.