On Minecraft, how is it possible that during a map creation, you can just scramble letters, numbers and symbols as a seed and still have a random map as a result?

696 viewsOtherTechnology

My real question is, how is it possible on programming context?

Like, typing “dioasdjklasdknlvioj3e40435905$%” randomly on the seed input, start the map and have a still totally randomly generated world.

And by that, i actually mean how can that be possible if Minecraft wasn’t complex to program, as far as i know.

EDIT: Forgot to add, there is also a more than a sixtillion (Or even far, far more) of character combinations (Incluiding quantity of characters). All of them, if you change a single character in any place, generates you a random map. The slightlest change, and your map is completely different.

Where i am going is… how is it possible that such a small game like Minecraft could have an infinite number of randomly generated maps if it just weights a few Gigabytes (Or even Megabytes) on your PC?

In: Technology

11 Answers

Anonymous 0 Comments

The text you input is getting converted into a number using a technique known as hashing. This number is then used to start a sequence of random-looking numbers. There are techniques that will ensure that you always get the same number sequence from a given start. That’s what “seed” means. 

Games then use this number sequence to build the world, using mathematical procedures that create “organized chaos”. This way you can have a lot of variation, but it always looks structured. 

The number of maps Minecraft can generate is not infinite, it depends on how its number generation machinery works. At the same time it is probably large enough to be considered almost infinite. 

I think the final bit of the puzzle is that small changes to the seed string will result in very different number sequences. That is by design – these random number and hashing techniques are designed to maximize difference between similar inputs. After all, you want the result to be unpredictable. 

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