Page 1 of 1

Biome Generation

PostPosted: Fri Sep 07, 2012 15:02
by wokste
For one of my own projects I created a map-generator for biomes. Now that project stopped, I thought maybe minetest can use it for biome generation. For this, I am willing to convert it to c++.

Here are some properties:
1. For each integer (x, y) coordinate it will give a number. (Normal distribution). It could be increased to x, y, z if nessesary.
2. Tiles in the same biome will give the same number.
3. It is deterministic and reproducable.
4. The order of generation does not matter.
5. Constraint: The base size of the biomes must be a power of 2 (2^N). (in the example it is 2^2)
6. Each biome can be next to any other biome.
7. Potential problem: It cannot determine that it is close to another biome.

Here is a map as an example
##############################
##############################
##############################
##############################
##############################
##############################
##############################
##############################
##############################
##############################
##############################
##############################
##############################
##############################
##############################
##############################
##############################
##############################
##############################
##############################

If there are more questions, please ask them:

PostPosted: Fri Sep 07, 2012 17:03
by sfan5
The example Map doesn't look bad...

PostPosted: Fri Sep 07, 2012 17:46
by PilzAdam
It would be great if there were biome support for lua. Something like
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
register_biome(dirt_with_grass_like_node, dirt_like_node, stone_like_node, [booelan] generate_trees)

PostPosted: Fri Sep 07, 2012 18:59
by wokste
PilzAdam wrote:It would be great if there were biome support for lua.

Agreed, this would be great. However this code will not touch lua. It will only give a number for each zone (biome). What that number exactly means is left to be decided.
So, the addition would be possible if you expand from the method shown above, but wont implement it.