A Look At How No Man’s Sky’s Procedural Generation Works

A Look At How No Man’s Sky’s Procedural Generation Works

No Man’s Sky might not be everyone’s cup of tea but its code is pretty impressive. Blogger gregkwaste outlined exactly how the space exploration game creates its procedurally generated creatures and more.

In a post at 3dgamedevblog.com, Greg provides an exhaustive breakdown of the process behind No Man’s Sky‘s various monsters and spaceships. Here’s how a potential creature’s model looks before it is generated:

A Look At How No Man’s Sky’s Procedural Generation Works

The animal is a horrific mess of potential body parts and contradicting geometries. However, each geometrical object has a name that points to a descriptor. These classify each regions such as a creature’s head or other body parts. These descriptors can then be mashed together and assembled through code to make a new animal. Essentially taking bits and pieces from descriptor pools until they create a valid critter.

Greg assembled creatures that all come from the model you see above, the result are a variety of aliens that share commonalities but still end up being relatively unique:

A Look At How No Man’s Sky’s Procedural Generation Works

All of the above creatures started from the same base model. What determines the chance of a body part being used is a bit unclear. Greg posits they are either decided by the game’s engine when running or contained elsewhere in the code. However, each piece seems to have a relatively equal chance of selection. This applies for spaceship models as well. Ship designs are procedurally generated in a manner similar to animals. Greg’s post also covers texture generation and animations. I highly recommend reading it in full.

This doesn’t mean there’s infinite possibilities for the game Last month, an intrepid player decided to see what would happen if you entered into a 256th new galaxy. It turns out that after you moved beyond this number of galaxies, they start to repeat. You can see specifics in Ryan Zea‘s video below:

Whatever your thoughts about No Man’s Sky, I think the raw breadth of the code is impressive. If anything else, it’s given us no end of penis monsters. And for that, I am eternally grateful.


The Cheapest NBN 1000 Plans

Looking to bump up your internet connection and save a few bucks? Here are the cheapest plans available.

At Kotaku, we independently select and write about stuff we love and think you'll like too. We have affiliate and advertising partnerships, which means we may collect a share of sales or other compensation from the links on this page. BTW – prices are accurate and items in stock at the time of posting.

Comments


11 responses to “A Look At How No Man’s Sky’s Procedural Generation Works”