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:

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:

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.
Comments
11 responses to “A Look At How No Man’s Sky’s Procedural Generation Works”
Finally, some actual critically in-depth discussion on this game. I never played Spore, but are the comparisons unavoidable? Same with Noctis.
I still want to play this:
Can I pick the game up and still experience a ‘fresh’ universe?
Or has the population by now named everything and explored everything else?
I don’t know the ‘story path’ but how long until I’d want to check that out, roughly?
These two issues have been my main bugbears, the reviews of the game were sort of useless at the time for people on the fence, and they became more and more useless as time wore on. I don’t remember seeing many (if any) ‘revision reviews’ (even though I don’t really like those anyway) for the game to address such things.
Pretty sure this was well covered before the game even released – the sun will die before anyone gets a chance to do that, even if everyone on the planet was working on it non-stop. Or something absurd like that.
That’s great news.
If you follow the waypoint path in space (The “Atlas”/story path), then you’ll likely run into some planets and stuff discovered by other players quickly – I ran into stuff discovered by other players within an hour of starting on launch day.
However, if you go off the beaten track – pick your own path to your goal, then most of that is undiscovered. Even in systems discovered by other players, most of the time it appeared they were just passing through, and hadn’t explored the planets and other features in the system.
Depending on the size of the systems/planets, you can spend many hours exploring and finding new stuff in each one. Some of my first systems took me days to fully find everything that could be “discovered”, and even after that point, there’s monoliths, language stones, bases, beacons, crashed ships and stuff like that to find.
Unfortunately what tmis listed here, is it. That’s the whole game it its entirety.
I had a similar experience, coming across discovered content fairly early on, and those discoveries pathing along the same trail to the centre. It became clear pretty early on that I was just following someone else’s exploits (at least two people actually), so took a punt on a black hole. Since then, no other evidence of others.
While there are effectively infinite planets, there are only so many Atlas stations and they act as bottlenecks. Tends to get missed or glossed over a little. Even so, theres still a hell of a lot of Atlas stations out there.
I’d wait. The radio silence from Hello has only been broken by a comment saying they are working on updates. Some of the missing features might appear.
There have been a few posts mentioning updates since launch.
But yeah, the silence isn’t doing them any favours, love it or hate it, we are all waiting to see what the hell things go from here.
It has potential, but nothing close to the dream Sean had.
It can only improve within the boundaries of its current state, much of the more impressive and grand features that Sean spoke of are impossible unless they plan to start from scratch.
(Let’s face it, there is no way that is ever happening)
Haha I would argue that the silence is doing a lot less damage than Sean’s big mouth.
There is a reasonably good chance that more than one team are already trying to do something in that space. I imagine we will get some NMS-like games in 2-4 years.
Possibly for the most ambitious, like true multiplayer. That seems unlikely. A ‘ghost’ multiplayer where only the other players position, ship are shared and not world events seems slightly more feasible. i.e. You could see another person but not what the animals, objects in that players version of the world are doing, or what effect his actions have on those and the world.
Much of what was cut wasn’t impossible. There was a more complex system for distribution of resources and a more complex resource system in general. Those being slashed removed a lot of the actual gameplay and survival challenge.
The system for orbits and so on should be possible.
There are a number of performance issues, especially around the change from distant to detail view while flying low. I have wondered if some of the cut features work, but they were unable to get them all to work at the same time on target hardware? If so, there could be feature complete (or close to) systems that would work with optimisation.
Dunno. I expect we will see *something* from them. The silence might indicate they actually learned their lesson. Nobody is going to listen if Sean starts saying “we are fixing A, B and C up in the game guys! Its going to be so cool!”. Hopefully they realised actions speak louder than words? Fingers crossed.
@leigh
I had to start a new game so experimented by trying it over and over (quit before saving). I was interested to see how much variation there was. Only once was my starting planet already discovered by someone else. I haven’t landed on any others that have been named, not that I’ve gone far towards the centre with two games going on PC and PS4. A few planets are just too dangerous to stay on for long (including one where every single creature attacked me) or are barren so nothing to name other than the planet itself. If you enjoy just wandering about exploring then you can probably do it for quite a while and just deal with the path stuff when you feel like it.
I certainly didn’t shirk the achievement, that’s for sure.