Hook
More breakout videos from this creator.
A single Minecraft world is about 60 million blocks wide, which makes it larger than the surface of Neptune. Yet the save file in your machine is tiny. It's about the size of a photo. And the game isn't actually storing that world anywhere. It's just rebuilding it from one number. The seed. Minecraft, when it was created in 2009, and then Microsoft bought the studio Mojang for 2.5 billion in 2014. And from the start, it had a problem that sounds impossible to solve, right? Its world is effectively endless. It stretches out to a world border roughly 60 million blocks away. And you can't store a near-infinite world on your hard drive. So the game had to do something other than remember it. The first layer to this is world generation on demand from a single number called the seed. And as you walk toward new ground, Minecraft needs your coordinates and that seed into noise functions, Perlin-style pseudo-randomness. Output: land height, caves, biome, ore. All comes as a result of that seed. The math is deterministic. So the same seed will always produce the same world down to the block. And the second layer is what makes it cheap to store. The world is built in 16 by 16 columns called chunks. And only the chunks near you are generated and kept near you. If you walk away and untouched chunk can be regenerated from the seed later, instead of saved. The game really only holds the ground around you plus whatever blocks players change by hand. So two people on the same seed, 1000 blocks apart, see the exact same mountains. And the game never sends or stored them. So a world larger than a planet can fit in a file the size of a photo because Minecraft doesn't remember the world at all. It just remembers the recipe. One number plus math to expand it. And it can rebuild any piece on demand. Video codecs actually use similar ideas, drawing the instructions to rebuild a frame instead of the finished pixels. So a world larger than a planet can fit in a file the size of a photo because Minecraft doesn't remember the world at all. It just remembers the recipe. One number plus math to expand it. And it can rebuild any piece on demand.