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
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
The vast majority of storage requirements for modern games is in art assets and sound files. Code is just text and even millions of lines of code is only a few megabytes.
Each separate art asset requires its own files. But additional uses of the same asset do not increase size. For example, say your game needs fruit. You model and create art for a banana asset. Now it doesn’t matter if you include 1 banana or 200,000,000 bananas in the game, they will all look to the file of the banana asset on how to build it. But if you instead of 100s of different fruits, you now have to model and have art for each of those hundreds of fruits. Now expand on that for every different unique asset in a modern AAA game like Balders Gate with so many different environments, objects, weapons, character classes, appearances, and armor.
Same with sound, if your game can get away with just a few sound effects to draw on for every scenario, you don’t need much space. But if you require many unique sound effects, dialog options music cues, size increases rapidly.
Procedural generation can be tiny if they use a smaller pool of assets and rely more on code to mix-and-match those assets into unique environments.
Minecraft does work like you suggested, once a chunk of the world is generated it stays in the world file forever and heavily-explored worlds will take up a lot of space. But Minecraft has a limited block palette on a strict grid, so these chunks don’t take up too much space anyway.
I haven’t put as much time into No Man’s Sky, but if I remember right, changes are only saved in bases. So if you put down a base computer it’ll save what you put down in the area and how you edit the terrain, but most things outside will be regenerated eventually to keep your save file small.
There’s not a map that needs to be stored. Or in some cases for procedural games, there’s not even enemy designs that need to be stored. At least not in the game files. All that the game files need to contain is how to build the world, how to build the quests, how to build the characters. It doesn’t actually need to keep 100 renders of the one mob ready to go. It doesn’t need to keep every possible seed world ready to go. It just builds it new each time. All the game files need to store is how to build the game.
I find that the comparison to letters works well.
You have 24 letters in the alphabet. That’s your starting game size. Then you have a book. Which is just lots and lots of the same letters over and over again in patterns that we recognize as words and sentences.
There is an infinite amount of books that we can write from just two dozen elements. Games with procedural generation do the same thing. They take elements and combine them into larger elements you recognize as planets. Or trees. Or hills. They are still just the same pieces. But the way they are combined creates different elements.
2a=b. This formula needs no space at all. But it can draw an infinite line. Infinite!
Stuff that get’s changed or generated in minecraft is like that formula. It takes not much space at all to store some math.
What actually takes space is textures and graphics. There are not a lof of them in Minecraft. Everything is build out of the same blocks.
To come back to the base principle: Text or numbers takes almost no space. Minecraft can save every block you changed as a short number.
A whole book is some kb. A 5 Minute video can be multiple GB.
You’re seeing a rendering of something that is absurdly simple.
With no man’s sky much of the game is based off a set of randomized factors. The terrain, placement of certain buildings, and even animals is all randomly generated. So it tells your computer, “This animal is head number 8, legs number 2, and body number 13.” Your computer finds those texture files and loads them.
It’s the same reason a bunch of people can play battlefield in a big city setting and not have insane lag. The data the computer is transferring is related to coordinates and simple polygon hit boxes, not actual visible things.
Essentially, your computer does all the heavy lifting.
As others have said, it’s about using some math to generate detail from a description of a thing rather than storing every detail.
To see this taken to the extreme, check out the [demoscene](https://en.wikipedia.org/wiki/Demoscene). The folks who are good at this can “write a description” that includes everything necessary to generate [cool space scenes](https://www.youtube.com/watch?v=JZ6ZzJeWgpY) or [whole playable games](https://www.pouet.net/prod.php?which=12036) with graphics, music and everything in less than 100K.
I assume everything is procedurally generated. The world you’re on can seem persistent but it might be something as simple as:
* here is the random seed for this planet
* generate planet surface for player based on location and seed and planet type (this could be derived from the random seed for the planet)- ie these bits determine temperature/climate, these bits determine flora/fauna theme, etc
* seems randomly generated and persistent, but so long as you know the player’s position on the planet and the seed, it will always generate the same stuff at the same place
* if the player drops a prefabricated structure at a certain position, all you have to do is know which asset it is and the orientation and you’ve still only stored less than half a dozen simple variables about the planet
Latest Answers