Gamasutra is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Gamasutra: The Art & Business of Making Gamesspacer
View All     RSS
August 3, 2021
arrowPress Releases
If you enjoy reading this site, you might also want to check out these UBM Tech sites:

What the code of  No Man's Sky  says about procedural generation

What the code of No Man's Sky says about procedural generation

October 17, 2016 | By Alissa McAloon

October 17, 2016 | By Alissa McAloon
More: Console/PC, Programming

Greg of 3D Game Dev Blog took a few weeks to dig into the code of No Man’s Sky to try and figure out how the game engine created by Hello Games creates each element of an entirely procedurally generated game world. 

This blog post is definitely worth checking out if you’re a dev at all interested in the code that went into procedurally generating nearly every bit of content on a multi-planetary scale. 

The post splits its findings into three main categories: geometry, textures, and animation. The section on geometry is by far the most in-depth and talks mostly about how the game creates creatures, ships, and other models by combining multiple parts from assets with a predetermined chance value. 

A similar approach is used to procedurally generate the textures and color pallettes used for creatures and planets within the game. 

An example of randomly generated creatures using <i>No Man's Sky</i> assets in an external viewer.

“...except [for] designing different model parts, [the game artists] have also provided multiple different textures for each part. So traversing that file in the same fashion with the descriptor file, one can calculate the final diffuse texture of the procedural generated model,” he explains. “And here is the even better part. Even if two models are identical geometrywise, they can end up having completely different colors, marks, shapes, etc using those procedurally generated textures.”

The piece-by-piece way No Man's Sky generates all its content leaves the door open for Hello Games or modders to add additional model parts post-release and exponentially increase the procedurally generated possibilities. While this might not say much about the current state of the game, Greg explains that this way of content generation speaks volumes about the game engine itself.

"The mindblowing thing about this generation procedure is that if they had double the number of [artists] working exclusively on [models], the game content (just for the creatures) would be hundreds of times larger," he says. "And this fact alone shows me the capabilities and the potential that NMS game engine has."

The full post, which includes models rendered in a viewer and a more in-depth explanation of the code behind No Man’s Sky, can be found over on the 3D Game Dev Blog.

Related Jobs

Microsoft — Redmond, Washington, United States

Senior Software Engineer
Disbelief — Chicago, Illinois, United States

Disbelief — Cambridge, Massachusetts, United States

Senior Programmer
Microsoft — Redmond, Washington, United States

Software Engineer II

Loading Comments

loader image