Tuesday, March 26, 2013

World Generation

It has been a while since my last post. I will try to make more frequent updates :-)

After working quite a while on the general game engine I needed some variety. So I started working on the world generation system.

I decided to use a generation approach that divides the process into two mayor steps.


The Macro-simulation is the global scale world information. It contains data-maps which are the basis for the Micro-Simulation. All the values within the data-maps will be interpolated and used in the Micro-Simulation.

The first step is to create the landmasses which are defined by randomly placed hills and planes. Each gets a strength, radius and falloff parameters. Some of the planes are places near to hills to achieve more coherent landmasses.

The parameters for the generation are all based on presets. This allows for different kind of landmasses like continents, isles and many more.
After this step some currents are created (heat, cold and humidity). Every current has a starting point, altitude, strength, width. Every current is simulated through raycasting and all the results are combined into the heatmap. Each current type has its own set of rules. For example when a heat current hits a hill that is higher than its own altitude the strength gets reduced (abstracting the blocking effect of high mountains on rain clouds).
The result is a approximated heat,cold and humidity distribution. Some parameters are influenced by world specific values like base temperature or humidity. Changing these world setting change the environment from desert to moderate or arctic.
Heatmap (blue =cold, red = medium, yellow=hot)
We plan to use these basic data-maps to simulate more behaviours and create additional meta-data-maps.


  • Height
  • Heat
  • Humidity
  • Typemap (used for blending between hill and plane detail noise)
  • Water (planned)
  • Vegetation (planned)
  • Ores/Material (planned)
  • Artifacts/Landmarks (planned)

Planned features and modifiers for the Macro-Simulation

  • Heat/Cold/Humidity fields (radius based area modifier)
  • Vulcanoes 
    • Crater -> heightmap
    • Heat -> heatmap
  • Meteorites
    • Crater -> heightmap
    • Heat -> heatmap
    • Material Deposits -> oremap
  • Rivers
    • River bed -> heightmap
    • Humidity -> humiditymap
    • Water -> watermap
  • Canyons --> heightmap
  • Streets
    • Change the underlying material
  • Cities/Ruins 
    • Streets connect them


This part uses the generated data-maps from the macro-simulation and interpolates them. One cell of the data-maps will be used for one ore more chunks. Depending on the chosen scale factor.

The macro values are used as a basis for the detail 2D or 3D noise functions. And those noise functions convert the 2D global heightmap to a Voxel-map with tunnels, caves and overhangs.

No comments:

Post a Comment