Skip to main content

Interview: No Man's Sky And Procedural Generation

Following Procedure

No Man's Sky is a space exploration game by Hello Games in which every dot in the night sky is a star you can actually fly to. This is not the game's most ambitious claim.

The game's most ambitious claim - described as "Peter Molyneux-esque" by lead developer Sean Murray - is that the procedural generation of those planets is built "from a real atomic standpoint". The chemical compounds in a planet's atmosphere dictates everything from how light refracts from the nearest sun, to the colour of the grass, the minerals in the soil, and the behaviour of creatures.

Yesterday I wrote about what you do in No Man's Sky, but there's a lot of understandable skepticism about the game's claim to generate a galaxy from code. In this lengthy interview, I spoke to the Hello Games team about how they hope to building that galaxy, from the rules of its procedural generation, to the challenges of making a pretty procedural galaxy, and where the boundaries are between generated and authored design.

RPS: Isn't three programmers with one artist the inverse for how most development teams would be structured?

Sean Murray: The art that you're seeing, we're in a really weird place where you don't... Grant [Duncan, the game's artist] was just saying a minute ago that he was super skeptical when we started out on this. Grant wants to build things and then see them in game as those things.

Grant: Yeah. In the world of artists, especially videogame artists, you see procedural stuff and you hate it. Because there's no finesse. There's no polish, there's no love gone into it. So when you're doing environment work in games, you often, especially if you look at Uncharted and those kinds of games, it's all just--

Sean: You like those skyboxes.

Grant: Everything has been thought about from multiple angles. It's almost 3D composition. Everything's placed so you turn and it moves your eye around. Whereas with procedural stuff it's often just a rolling landscape with a tree plonked on there and these trees plonked, and it just feels random, and not random in a natural, real-world way.

RPS: There's messages on screen in the trailer, showing the chemicals in the atmosphere and the water. What's the significance of that?

Sean: If there is a thing that we're doing, that I think we're doing well, it is that we have built this from a - this is going to sound really wanky and Peter Molyneux-esque - but from a real atomic standpoint.

We're using really simple rules that have very complex outcomes and I think that we are producing worlds that have a natural sense of gameplay and a natural sense of structure that is very different to what happens when people normally make a bunch of random terrain. That is where a lot of the original development time went into and a lot of the stress.

Grant had to be really kind of fooled by us into working on it because we would, you know, at the beginning we were like, 'Oh, we'll build presets and all this kind of thing', but actually, coders... [whispering] 'Push it as far as we can!'.

Grant was making concepts and he would say, 'Like this!' And we would say, 'Yeah! Or infinite number of variations of that.' And he would say, 'No, exactly like this. It's nice when there's a planet's there and the sun's there and...'

We're now getting to a point where I think, in the trailer, we're seeing moments where it really does look like exactly like the concept art we were originally using to inspire us. It has moments where it looks like the scifi book covers.

What's really good about that is those things are there for kind of natural reasons. If there's a crashed ship, it's there because a ship has crashed. You know? If there is a trading outpost or wahtever, those things are there for real reasons, and the way the creatures behave around those, and the type of creatures you see are there for real reasons.

Going back to that atomic thing, there's this weird thing that we've found very useful, very powerful, where like Grant said, people think of procedural and they think of random, and I think random is bad. The world isn't actually random, it's governed by a set of rules. So the planets that you saw there, the ones that have life, they will have like a lot of them are oxygen based, and that leads to a massive set of things, right? The sky is the colour that it is because it has an atmosphere and that atmosphere refracts light at different wavelengths and that defines its colour.

And that is a fucking nightmare for an artist because they say, 'I want the sky to be green.' And it's like, well, it depends on what the chemical composition is, right? But it leads to things which have a sense of reality to them, and it leads to much more interesting worlds and landscapes and keeps it away from being just all the colour variations of this thing.

Grant: We are still in control of it, especially when it comes to colours. There's certain things, especially colours, that you never want to see, and if you did see them together then you'd think it was hideous, but we can control what colours things go depending on the rules.

That ship will be procedurally generated, but its cockpit won't be.

RPS: Do you have rules that say make certain atmospheric make-ups more likely, dependent on the look you want?

Sean: [The atmosphere] actually leads to what minerals are in the landscape and it creates things which naturally are pleasing to your eye, because they follow the rules of the universe that you understand. So you don't suddenly get everything being completely red, because that doesn't generally exist. And trees get the shape of leaves, and the colour of them sort of matches what's there in the terrain.

So there are natural rules that we use, and we do have control. Oxygen based systems went in recently, and that was something something I was working on for a while, to get quite Earth-like things and pretty much everything in the trailer is of that type.

RPS: If everything is connected, when you want to add something new to that world, does that have this huge ripple effect? Does it make it easier to add stuff?

Sean: We were thinking about how to talk to people about it and Hazel said this thing at lunch the other day. What people don't realise generally is that we actually have different universes on different machines. When it will release, it will be the one that we will release, but until then every time we boot it up to make changes, it's different, right? You destroy millions before you settle on that one. That kind of breaks people's brains to think about, and it's a weird way of working.

But as we go through that maze of ideas and options, we are getting closer and closer to something that feels right for us, and we're going, 'That's amazing, oh my god,' 'I found this,' 'check this out, that's happening because of this.' It is emergent for us and when it releases, we won't have seen everything. Not by a long, long shot, and no one ever will. No one will ever be able to visit the entire game.

Dave: The first time we see people sharing videos of, 'Check out this crazy thing I just found', and not to be like, 'oh, I meant to fix that.'

Sean: Like red sky with red ground.

Dave: But it won't be a bug! It'll just be like, oh, right, I guess that would happen.

Sean: So there is an extent to which there is authorship, obviously. And there is a large extent to which we are designing this. A very large extent. That is where all the work will go. We are designing a set of rules, we're not designing a game, and I think Minecraft or DayZ, that's how those feel to me.

We don't want you to land somewhere and be like, ohh, they've put that there and that there, because we just don't have control over that in the same way, and we don't know where you're going to land, and you will visit that same planet at night or day. There is all sorts of mind-bending things like that which you find, when you're recording a trailer. Like your planet is rotating as you stand on it and that's going to change where planets are in relation to you on the horizon, or when you fly up into space. Those are things we haven't had to deal with in a game before that are a little bit mind-blowing but that we're getting used to.

RPS: The ships are also procedurally generated?

Sean: Yes, but ish, right? So your cockpit isn't. Your cockpit at the moment remains the same and it's the ship that gets upgraded around it. So the cockpit is kind of a lifepod. Your ship can be destroyed but that can't be.

RPS: You're using procedural stuff for the art and the world and the bedrock, but do you procedurally generate mechanical stuff, like puzzles?

Sean: There's a thing that Dave [Ream, Hello Games' Creative Director] and I were talking about. We have rooms that are procedurally generated, but I wanted to make them like little dungeons and occasionally put them in there. So that's something that we've been talking about that I really like the idea of.

I think the thing for Dave that he has to deal with unlike other games is that, say that shark [in the trailer], we were trying to record that video and we knew that he was down there, but just occasionally. So we're going to record this bit, in the water, and sometimes he doesn't show up. Sometimes he does and he just attacks you.

Things behave differently, and that is a weird thing when you're trying to do the handling of the gun or the aiming or something like that, because you are no longer in a situation where you can say 'I'll only ever be attacked by one person or three or they'll take their turn'. There are elements of that but a good system can do that anyway.

Dave: It's all those simple rules, that all make sense, in such a way that it always responds to all those situations in a nice way.

This stuff is cool, but no guarantee of fun.

RPS: Do you spend a lot of time dealing with edge cases?

Sean: There's a really interesting thing I remember from the early days with Hazel [McKendrick, coder on No Man's Sky] where we were trying to get rock colours right and it was just random, and we were panicking. Occasionally it would look nice, but most of the time it was 'Holy Fuck'.

And you actually dig into it a bit and you actually find, rocks can only form in this way, and they can only be made from certain elements, and you won't find certain combinations of things. There are rules that govern that sort of thing. So that red planet with red sky or whatever, if it does exist, I would like to think that we won't be like, 'Oh fuck!' That's what generally happens at the moment, where it makes sense, 'Oh, because of that and that'. There will always be bugs, but what I mean is there will always be weirdness that we look at and think, 'isn't that nice'.

RPS: What kind of worlds does the create right now?

Sean: Probably one of the biggest challenges has been, and I hinted at that earlier, but in the early days the things that we made didn't play well. That was the biggest thing. Our environments look a little bit like handmade environments. Not massively, but a little bit. This is just a really mechanical thing, but if you make a certain kind of mountain, then the mechanics to traverse that become really weird. If you make certain shapes, then they don't naturally fall into what you want.

I think the ultimate for me is probably Zelda, which is box-size and then dressed up afterwards, and that is on some basic level what we're trying to do, is create worlds and heights and distances between features that you look at and think, 'Yeah, I feel like going over there,' and… how do I, and when I fall down I need to go all the way back up and all that kind of thing?

It's a really hard thing to solve. But one of the things is that, and this is probably the biggest thing, is that the planets are stepping stones on your journey, so in some ways they're not important. They are important to you, but it is not that you are trying to set up camp and live there forever. There's reasons why you might really love a particular planet and keep it to yourself but ultimately the way that people will play it, the way I'd like them to play it, is those will be stepping stones along your route and they will be stop off points and you are an adventurer going forth.

Everyone talks about Minecraft. The thing that people don't really talk about, I think, is the moment I loved Minecraft was I just dug down and then there was a cave underneath. It's the simplest thing in the world, but no one can deny the feeling you get when that happens. You know that they're underneath everywhere, and that everyone is having the same experience, but there's something... 'Hey guys, check it out.' It's probably the best example of a game which is randomly generated but really the game doesn't feel random. It's not about the landscapes in a weird way, but it really adds to the game that they're procedural, which is what we're going for.

Remember to read our preview from yesterday to learn more about what you do in No Man's Sky.

Read this next