ELI5- how does a game like Minecraft infinitely generate terrain ?

430 views

ELI5- how does a game like Minecraft infinitely generate terrain ?

In: Technology

2 Answers

Anonymous 0 Comments

It’s related to pseudo random number generation.

You start with a “seed”. A value that your generator uses as a starting point, and every step it makes a new random looking number that is defined by the previous number and an algorithm that jumbles it until it looks like it’s completely unrelated.

And then you start creating world features based on that. Simplified examples:

If the number at coordinates X,Y is bigger than z then make a mountain. On the mountain create a tree whenever your random number ends in a 13.

And then you tinker around with the rules of how that numbers translate to a world until it looks good.

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