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

1.19K 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

True randomness doesn’t really happen. You can roll a pair of dice and the result looks random, but if you start with the same hand position and throw them in the exact same way, you will find that the dice end up with the same result.

Computers are very good at perfectly doing things the exact same way multiple times in a row, so if you watch it generate some random numbers and then start the program over, you can actually predict what numbers its going to generate.

A “seed” is a sort of intentional offset to mess with the initial starting point of the randomness simulation. In the dice metaphor, it’s like telling the program to start with their hand in a specific position before rolling. It’s still not technically random, but nobody can predict the results anymore unless they know the seed. A lot of gambling-type simulators use a seed based on current day/time so that it’s super hard to force seed reuse (and therefore cheat the system), but something like generating a minecraft world only needs to look random enough, but there’s no problem if people decide they want to go back to another world they’ve seen before, so they decided to just tell you the starting position of the randomizer.

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