Eli5: How can games like minecraft or no mans sky be essentially infinite, yet take up a very small amount of storage?

1.80K views

No mans sky is like 18GB or so on my PS4, yet there are 256 galaxies and literally around 18 quintillion planets. It can be played completely offline too, so it isnt coming from some server somewhere

I understand they’re procedurally generated, so they dont even exist until you pass through that area, but even after playing for countless hours and crossing thousands of miles of landmass, the save file is still extremely small

In: 1323

32 Answers

Anonymous 0 Comments

Imagine you’ve got a maths test coming next week. You know that it’s just basic arithmetic and a bit of geometry – you know that calculating the area of rectangles, cubes and cones will be tested. Now you could go and memorise the area of every rectangle that you can think of, or instead just learn that you can calculate it by multiplying length with width – thus, you only need to remember basic mathematical rules and a few formulas and can calculate the area of any given triangle that the test may want you to calculate. There’s a lot of different lengths and widths the rest can give, but knowing the formula means that you only need to remember that one formula.

A fellow student tells you that the teacher forgot the test, with the results, at his desk. Now you may be tempted to just learn the answers instead of the Formulas. This might work if the test is just a page or two long, with say 20 questions total.

However, it turns out that the test is a few thousand pages long. Now, remembering every single answer takes a lot longer to do and takes up significantly more memory than if you just learned the basic formulas, and can answer every question on the go.

Minecraft and no man’s sky have procedurally, “randomly” generated environments. There is a set of instructions that is stored in the files, and depending on the key, the “seed”, the world is generated – with every key leading to a different world. Instead of storing every single combination of worlds, the games only need to memorise the rules, or Formulas from above, and can calculate how the world will look like according to the key. Now, they also don’t need to store the part of the world they’ve generated once you’ve seen it, because it just needs the formula and the key to calculate the exact same thing again

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