Difference between revisions of "Terrain generation"

From AAGRINDER wiki
Jump to navigationJump to search
imported>Maze
(Redirected page to Terrain generator)
(update terrain generator description)
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
#REDIRECT [[Terrain generator]]
 
 
This page explains all the aspects of the [https://gitlab.com/MRAAGH/aagrinder-terrain AAGRINDER terrain generator] which don't require technical knowledge to be understood. For a more in-depth explanation, see [[AAGRINDER terrain generation (deep)]].
 
This page explains all the aspects of the [https://gitlab.com/MRAAGH/aagrinder-terrain AAGRINDER terrain generator] which don't require technical knowledge to be understood. For a more in-depth explanation, see [[AAGRINDER terrain generation (deep)]].
  
Line 6: Line 5:
  
 
== Biomes ==
 
== Biomes ==
Biomes in AAGRINDER have a different meaning than in most games. We can not give a list of existing biomes, because there are an unlimited number of possible biomes. There are a bunch of biome parameters for generating terrain, such as tree count, tree height, amount of leaves, amount of grass, length of vines, amount of diamonds etc. Altogether there are over a dozen of such parameters. Each parameter gradually changes through the world, and they all change independently from each other. Because of this, it is possible to find any combination of biome parameters, and there are no sharp borders between the biomes.
+
There are 17 biomes that can appear in AAGRINDER. Biomes are chosen depending on three variables that gradually vary through the world:
 +
* temperature (for example, low temperature biomes are glacier and ice mountain, high temperature are desert and jungle)
 +
* humidity (for example, low humidity biomes are mountain and taiga, high humidity are forest and jungle)
 +
* density (for example, low density biomes are sky and floating islands, high density are underground and ocean)
 +
 
 +
The terrain generator will sample the temperature and humidity roughly in a grid of scale 256 blocks, and create a biome centered on that location. Meanwhile, density is sampled every block, to create accurate world features. At the end, biome information is stored as one data point per 4 wide by 8 high rectangular area.
  
 
== Diamonds ==
 
== Diamonds ==
Diamonds can be generated in stone surfaces. The probability for diamonds is biome-specific, which means it gradually changes through the world. However, there is always a smaller probability of diamonds near a surface compared to deep inside a mountain; and there is a higher probability of diamonds on a [[floating islands|floating island]]. The most diamonds that could possibly generate is one per 8 by 8 section.
+
Diamonds can be generated in stone surfaces. The probability for diamonds varies with terrain density, making them less likely to appear near the surface. The most diamonds that could possibly generate is one per 8 by 8 section.
  
 
== Trees ==
 
== Trees ==
 +
Trees are "structures" that can be either natural, or sapling-grown, though both of the types behave identically. They are composed of wood, leaves, and sometimes vines, and farming them is a good way to get these resources. They can only grow on dirt, and the saplings can only be placed on dirt.
  
 
== Spawn area ==
 
== Spawn area ==
The [[spawn area]] is the only aspect of world generation that is not generated in the terrain generator component, but rather in the AAGRINDER server itself. It still uses the world seed, however, so it is deterministic just like terrain itself. After the spawn area is positioned randomly, it is checked for quality: if at least 50 positions in the 64 by 64 area around the center are valid spawn spots for players, the position for the spawn area is accepted. Otherwise, a new one is chosen.
+
The [[spawn area]] is the only aspect of world generation that is not generated in the terrain generator component, but rather in the AAGRINDER server itself. It uses the world seed, so it is deterministic just like the terrain itself. After the spawn area is positioned randomly, it is checked for quality: if at least 50 positions in the 64 by 64 area around the center are valid spawn spots for players, the position for the spawn area is accepted. Otherwise, a new one is picked.
  
 
The range for choosing the spawn area is between -2048 and 2048 by the x and y coordinate. Because of [https://gitlab.com/MRAAGH/aagrinder/commit/f2ac2a3c4728683ff8d3f09075dbdf7a366ad3bc a bug], this range used to be between -3072 and 1024, which is why some of the older worlds might have the spawn point in strange places.
 
The range for choosing the spawn area is between -2048 and 2048 by the x and y coordinate. Because of [https://gitlab.com/MRAAGH/aagrinder/commit/f2ac2a3c4728683ff8d3f09075dbdf7a366ad3bc a bug], this range used to be between -3072 and 1024, which is why some of the older worlds might have the spawn point in strange places.
 +
 +
== Special structures ==
 +
There are a couple of less common formations, such as portal temples, portal eyes, tentacle rocks (or just the tentacle biome(s) in general), the four fort, and large boulders containing diamonds.

Latest revision as of 17:46, 15 May 2024

This page explains all the aspects of the AAGRINDER terrain generator which don't require technical knowledge to be understood. For a more in-depth explanation, see AAGRINDER terrain generation (deep).

World seed[edit]

A world seed is a number which determines the generated world. Whenever random numbers are generated, they are based on the world seed. Because of this, generating two worlds with the same seed will result in two identical worlds. The world seed should be specified in the server settings. Alternatively, if using the CLI terrain generator directly, the world seed is specified as the last argument. See our list of world seeds.

Biomes[edit]

There are 17 biomes that can appear in AAGRINDER. Biomes are chosen depending on three variables that gradually vary through the world:

  • temperature (for example, low temperature biomes are glacier and ice mountain, high temperature are desert and jungle)
  • humidity (for example, low humidity biomes are mountain and taiga, high humidity are forest and jungle)
  • density (for example, low density biomes are sky and floating islands, high density are underground and ocean)

The terrain generator will sample the temperature and humidity roughly in a grid of scale 256 blocks, and create a biome centered on that location. Meanwhile, density is sampled every block, to create accurate world features. At the end, biome information is stored as one data point per 4 wide by 8 high rectangular area.

Diamonds[edit]

Diamonds can be generated in stone surfaces. The probability for diamonds varies with terrain density, making them less likely to appear near the surface. The most diamonds that could possibly generate is one per 8 by 8 section.

Trees[edit]

Trees are "structures" that can be either natural, or sapling-grown, though both of the types behave identically. They are composed of wood, leaves, and sometimes vines, and farming them is a good way to get these resources. They can only grow on dirt, and the saplings can only be placed on dirt.

Spawn area[edit]

The spawn area is the only aspect of world generation that is not generated in the terrain generator component, but rather in the AAGRINDER server itself. It uses the world seed, so it is deterministic just like the terrain itself. After the spawn area is positioned randomly, it is checked for quality: if at least 50 positions in the 64 by 64 area around the center are valid spawn spots for players, the position for the spawn area is accepted. Otherwise, a new one is picked.

The range for choosing the spawn area is between -2048 and 2048 by the x and y coordinate. Because of a bug, this range used to be between -3072 and 1024, which is why some of the older worlds might have the spawn point in strange places.

Special structures[edit]

There are a couple of less common formations, such as portal temples, portal eyes, tentacle rocks (or just the tentacle biome(s) in general), the four fort, and large boulders containing diamonds.