Page 1 of 1

How much does the seed control?

PostPosted: Sat Oct 27, 2012 05:22
by 0gb.us
I thought all of map generation depended on the seed. So, when using the same seed, two maps would be identical. But it seems that isn't the case. The general feel of most land features tends to be the same, but sometimes dirt will become stone, or an extra cave will show up. Papyrus was also scarce near 0,0,0 the first time I used a particular seed, but on about the fifth time, papyrus had completely taken over the edges of the lake. Mostly, I'm noticing things around 0,0,0. I didn't memorize the whole map, so I can't put my finger on the differences, but the rest of the world feels a different as well. I can't find the landmarks near my old creations, but that could be just bad navigation.

PostPosted: Sat Oct 27, 2012 08:45
by Topywo
I think after use of the seed to build op the map, the mapgen.lua file (in /celeron55-minetest-25cf375/games/minetest_game/mods/default) causes the variation. But I'm not 100% sure :-)

Edit: typo's and some more text.

PostPosted: Sat Oct 27, 2012 11:18
by PilzAdam
Yep. The perlin noise generator does not depend on the seed. This will cause that papyrus, cactus and dry shrub can be different if you use the same seed. But ores depend on the seed, so all ores will be at the same position.

PostPosted: Sat Oct 27, 2012 11:21
by PilzAdam
PilzAdam wrote:Yep. The perlin noise generator does not depend on the seed. This will cause that papyrus, cactus and dry shrub can be different if you use the same seed. But ores depend on the seed, so all ores will be at the same position.

Oops, I just read that the perlin noise does depend on the seed: https://github.com/celeron55/minetest/blob/master/doc/lua_api.txt#L1037.
So what I wrote here is bullshit.

PostPosted: Sat Oct 27, 2012 23:27
by 0gb.us
Even dirt and stone seem to be partially indepentent of the seed. Sometimes a structure will be made of dirt, other times it will be made of stone.

That's very interesting. So this perlin noise must be generated for each map chunk, or must pe stored in the map.sqlite file. Every time I delete only that file, changes are made to the natural state of the map.

Thanks for the information!

PostPosted: Sun Oct 28, 2012 00:27
by GloopMaster
perlin noise is based on the seed; however, is randomized with the seed as a BASE number. Meaning you are LIKELY to have the same results.

I believe the structure generation algorithm uses just the seed, while dirt/stone ratio uses perlin.