Biome Generation

wokste
Member
 
Posts: 78
Joined: Sat Feb 11, 2012 09:06

Biome Generation

by wokste » Fri Sep 07, 2012 15:02

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:
We must be careful not to clone Notches mistakes.
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Fri Sep 07, 2012 17:03

The example Map doesn't look bad...
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Fri Sep 07, 2012 17:46

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)
 

wokste
Member
 
Posts: 78
Joined: Sat Feb 11, 2012 09:06

by wokste » Fri Sep 07, 2012 18:59

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.
We must be careful not to clone Notches mistakes.
 


Return to Minetest Engine

Who is online

Users browsing this forum: No registered users and 5 guests

cron