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.

Macro-Simulation

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.
Heightmap
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.

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

Micro-Simulation

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.

Tuesday, September 11, 2012

"Long Island Ice Tea" - Tech Demo

We proudly present our first tech demo. We are planning to deploy a tech demo each time we implemented some interesting feature.

After some experimentation we decided to ignore the heightmap based Unity terrains. Instead we combine a formable organic environment with sharp blocks. The intention is to accentuate the difference between natural grown landmarks and man made structures.

This demo shows the basic mechanics of terraforming and block placing. It contains 5 types of materials for the terrain and block placing. The terrain is currently limited to a small area.

We created our demo section where you can see the planned demos and start playing the already released ones.








Known limitations:

  • You can fall through the terrain when you walk of the edges or dig too deep :-)
  • The normal calculation is not final. (Chunk edges visible)
  • Sound crackling issue: Some times the sounds is kind of distorted ... seems to be an unity issue and machine depending... under investigation

Wednesday, July 11, 2012

Unity Experiments

As mentioned in our previous post we are currently experimenting with different solutions to represent an interesting game world.

These are some screens from an early endless terrain generator.

Enjoy!