2

In minecraft, before creating a world you have an option to input a seed. The algorithm takes the seed and creates a completely unique world. How does this work?

3

1 Answer 1

13

It gives the seed to a pseudorandom number generator (PRNG) and uses that PRNG to generate the world.

Giving the same seed will give the same sequence from the PRNG and thus generate the same world.

5
  • Good point, though has anyone tried giving the same seed to Minecraft more than once to see if the terrain is really the same (or even just "approximately" the same)? Oct 21, 2011 at 17:15
  • 2
    @FrustratedWithFormsDesigner Notch (the designer of the game) says that the generated world will be identical if the same seed is given.
    – user4595
    Oct 21, 2011 at 17:16
  • I guess that answers it! Oct 21, 2011 at 17:18
  • 5
    The only times the terrain changes when the same seed is input is if the generation algorithm changes (which is just about every major update...). It's worth pointing out that the terrain generation is commonly called procedural generation
    – thedaian
    Oct 21, 2011 at 18:09
  • 2
    Minecraft also runs a hash function to transfer string seeds into numbers.
    – Pubby
    Oct 21, 2011 at 18:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.