This article is part of a collaboration with iQ by Intel.
A veteran explorer, low on supplies, lands on an uncharted alien planet with a cyan ocean and ruby-red grass. Enormous, dinosaur-like creatures with horns graze nearby, but at least there doesn’t appear to be any acid rain, unlike the last place. After some scavenging, the explorer hops back onto her spaceship to tackle another one of the 18 quintillion planets ahead.
The space exploration game No Man’s Sky, released in August 2016, is already famous for its singularly beautiful digital world. But it’s also an unprecedented technical marvel, one that marries artistic ambition and creative programming. These five crazy technical achievements show why No Man’s Sky is in a gaming category all its own.
A Single Equation Birthed the Game’s Entire Universe
Typically, game designers use a technique known as procedural generation to create new, randomized environments every time the game is played, similar to how worlds are built in Minecraft. Titouan Millet, creator of abstract exploration game Mu Cartographer, described the appeal of this technique as “the magic feeling of creating art from lines of code and mathematics.” But No Man’s Sky used procedural generation differently. Instead of handcrafting each world, the small development team at Hello Games taught a computer how to create a seemingly infinite variety of different planets.
Simply put, rather than creating an experience that’s changing endlessly, No Man’s Sky used the technique to create a single experience that feels endless. To achieve this, the game’s equation combined a single “seed” value that’s 64 digits in length with 1,400 lines of code outlining the many planetary categories. “The cool thing is that every planet has a single number, a random seed, that defines everything about that planet. A single random seed generates every blade of grass, tree, flower, creature,” explained creator Sean Murray on the game’s blog.
The algorithm builds trillions of different planets by picking and choosing from a variety of characteristics (like fauna, animals, colors, topographies) as if it were assembling a dish at a salad bar: The ingredients need to be complementary, not random, regardless of the combination.
It Would Take 585 Billion Years to Explore Everything
Theoretically, it would take any object traveling at the speed of light 100,000 years to traverse the entire Milky Way galaxy. Meanwhile, Sean Murray calculated that, if a player discovered a planet every second while playing No Man’s Sky, it would still take 585 billion years to see it all. Finding where No Man’s Sky ends would require players to be immortal.
It Has Real Solar Systems
To replicate real-world laws of nature, Murray said most games cheat. “The physics of every other game — it’s faked. When you’re on a planet, you’re surrounded by a skybox — a cube that someone has painted stars or clouds onto,” Murray explained to The Atlantic. “If there is a day-to-night cycle, it happens because they are slowly transitioning between a series of different boxes.”
Instead, No Man’s Sky’s suns, moons, stars and planets obey strict laws of astrophysics just like earth. When a planet changes from night to day, it’s not because of a two-dimensional skybox. It’s because of the planet’s trajectory around the sun. The designers did such a good job replicating the enormity of space that they even had to invent a probe to help them keep track of everything efficiently. But how close does it come to replicating the actual universe?
“There are two things I think are important to get right when you’re recreating a planetary system for a game: scale and diversity,” said astrophysicist Lucianne Walkowicz. Hello Games’ endless universe is certainly huge and diverse, but the programmers did cut a few corners for aesthetic and gameplay reasons. For example, their moons orbit closer to their planets than Newtonian physics allows.
A Trillion Planets Without a Single Load Screen
To achieve a feeling of seamless, never-ending exploration, No Man’s Sky renders enough of the universe around the player to ensure an uninterrupted vista while flying around in the ship. Touching down and leaving planets is just as seamless, with a short animation shooting the player right back into the clouds. Even inventory management happens in real-time, so players rarely get taken out of the moment-to-moment action.
Math Created the Soundtrack
British rock band 65daysofstatic faced a unique challenge when scoring No Man’s Sky: How do you write music for a near-infinite experience? “What would normally become a kind of refining process, sculpting a single song out of a bunch of different noises, instead became a kind of cataloging process,” said guitarist Paul Wolinski.
Similar to how the game populates its planets by pulling objects and animals from a given category, all the potential variations of a bassline, drum beat and guitar lead were placed into what Wolinski called “pools of audio.” From there, an intelligent bundle of code arranges the music based on what’s happening in the game at that moment.
Wolinski called this approach “generative music.” Borrowing from the concept of procedural generation, it uses computer logic to tailor the music to the circumstances onscreen in a smooth, unnoticeable way. It’s like having a conductor in the cockpit with the player, matching the orchestra to every move they make.
If developers continue to evolve No Man’s Sky, it could become a true technology wonder and source for endless joy. Players who better understand the algorithms that make it tick could be in for exponential amounts of fun for years to come.