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?

694 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 numbers are just indicator where to start the randomness. The seed would be followed by random numbers as long as you explore the world. Since computers generally doesn’t generate true randomness, using the same seed would lead to the same world.

Take this as an example, imagine a seed of 123, and the seed acts as a height for the blocks you are standing on. so for the first block it would be 1 block high, the second one would be 2 blocks high and so on. This simple mechanics makes world generation possible.

So how about seeds such as 309 that has a significant amount of difference to them?.. Your world will be in chaos as the different height of blocks wander around your world. In order solve that, they uses a technique which involves Perlin Noise. Perlin Noise creates a smooth gradient between these blocks and make sure that your world is smooth in world generation. Each part of the world uses different Noise like for the Cave Generation and Biomes.

The beauty of minecraft is on how they uses basic programming techniques such as Perlin Noise in order for them to create an amazing game

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