I want to generate a completely unique world with biomes (like what Minecraft and similar games do). I don't understand how they generate these entire worlds from a single "seed" number. Can someone provide a basic overview of the technique?

This question came from our site for passionate videogamers on all platforms.

11

Notch actually wrote a blog post about terrain generation, which is now completely obsolete since the new code's got biomes and FRACTALS and other such wizardry. There never was a part 2, either.
–
lunboksOct 21 '11 at 17:07

1 Answer
1

How do you generate random X from a seed? a seed value is the initial state of a random number generator. In most programming languages, you can set this seed. For example, C uses srand(). If you don't specify a specific seed to start with, usually a timestamp value is used as the seed. That way, each time you run, the random numbers are different.

Actually, you wont be able to use Perlin Noise I'm afraid minecraft has over-hanging cliffs, caves and so on, and PN cannot into that.
–
jcoJun 6 '12 at 9:02

4

Perlin noise is just a noise system which you can use as part of a larger terrain generation method. eg. You can use 3D perlin noise with an altitude-dependent threshold value to generate cliffs, caves, etc. (Edit - in fact, I see from the link in the answer that is exactly what Notch was doing at one point.)
–
KylotanJun 6 '12 at 15:17

1

+1 Kylotan. Here's the quote from Notch's blog: "Specifically, there’s no way for [2D Perlin heightmap] to generate any overhangs. So I switched the system over into a similar system based off 3D Perlin noise. Instead of sampling the “ground height”, I treated the noise value as the “density”, where anything lower than 0 would be air, and anything higher than or equal to 0 would be ground. "
–
JimmyJun 6 '12 at 17:03