PilzAdam wrote:Look at mapgen.cpp.
enum BiomeType
{
BT_NORMAL,
BT_DESERT
};
BiomeType get_biome(u64 seed, v2s16 p2d)
{
// Just do something very simple as for now
double d = noise2d_perlin(
0.6+(float)p2d.X/250, 0.2+(float)p2d.Y/250,
seed+9130, 3, 0.50);
if(d > 0.45)
return BT_DESERT;
if(d > 0.35 && (noise2d( p2d.X, p2d.Y, int(seed) ) + 1.0) > ( 0.45 - d ) * 20.0 )
return BT_DESERT;
return BT_NORMAL;
};Mito551 wrote:try seeing snow mod: http://minetest.net/forum/viewtopic.php?id=2290
MasterGollum wrote:Mito551 wrote:try seeing snow mod: http://minetest.net/forum/viewtopic.php?id=2290
I did, but I didn't know why he choose perlin1:get2d({x=x,y=z}) > 0.53 and not other value. And if it's possible to decide based on the values returned by this function the kind of biome we are in. Let's say if pops a value under 0.2, does it have a meaning?
Splizard wrote:MasterGollum wrote:Mito551 wrote:try seeing snow mod: http://minetest.net/forum/viewtopic.php?id=2290
I did, but I didn't know why he choose perlin1:get2d({x=x,y=z}) > 0.53 and not other value. And if it's possible to decide based on the values returned by this function the kind of biome we are in. Let's say if pops a value under 0.2, does it have a meaning?
The value 0.53 was chosen by experimenting with different values, the reason I chose that value was because the rarity was ok and it worked nicely.
Users browsing this forum: No registered users and 5 guests