how do “seeds” work in video games such as Minecraft?

1.15K viewsOtherTechnology

For example, how does an infinitely randomized world like Minecraft manage to generate me an identical world to my friend with just a handful of numbers that they send me?

In: Technology

23 Answers

Anonymous 0 Comments

Most random number generators on a computer aren’t really random. Instead, they generate a sequence of numbers that *looks* random, by picking a starting value and doing math to it. That starting value is the seed.

Usually, you want your random numbers to be different every time, so you use a value that changes naturally as the seed, like the current time. When you want to generate the same sequence of ‘random’ numbers, you can provide the random number generator with a seed. The math starts in the same place, so it generates the same series of numbers.

Then, when Minecraft generates a world, all it has to do is make sure it does the random world generation steps in the same order every time: that way, the same sequence of random numbers turns into the same world output.

You are viewing 1 out of 23 answers, click here to view all answers.