関連記事

A practical look at "Procedural Generation 2.0" or template based procedural generation fo...

So yesterday u/Viloneo made This post suggesting No Mans Sky ditch the current noise based generation for a more hand crafted template based procedural generation approach. While I appreciate the enthusiasm for addressing the issues with proc gen in the game I don’t think this approach would really work unfortunately. After commenting there that I thought it wasn’t likely to be the fix they imagined it to be and getting a response I went to reply and ended up writing a lot more than I had intended to.

I’m a game developer and while I’ve never done anything quite on the scale of NMS I have implemented a lot of different types of procedural generation (I can provide links if you’d like but I’m not here for self promo I just love this game :3 ) and while templates can work great (here’s a great interactive walkthrough of how Spelunky generates with templates) they have some major downsides such as making grid structures more obvious and massively increasing dev time.

(If I have some time I might see if I can add some diagrams into this post if people are interested)

I’m curious about how this suggestions practicality so I’m going to do some math and see how it might work out in detail.

Part One. Setting up our example area:So you want a chunk full of randomised patterns and you likely want minimal repeats, lets say you’re working in a 32×32 km area and each template defines a 1×1 km chunk of templated terrain using noise to add some degree of variation. That’ll be 1024 chunks to be filled in. Lets be generous and say we can get away with repeating the same structure 8 times across that and hoping the noise will differentiate things enough that they won’t be noticeably the same (this is likely to break down regularly and create very noticeably similar results) we’ll need a total of 1024÷8 or 128 unique chunks to fill in that area.

Part Two. The logistics of designing templates:so lets think reasonably about how long it would take to create these templates. For a 1km² area I’ve spent multiple days in the past to create maps with the unity terrain system. However this only deals in height values without the possibility for caves or overhang that the NMS terrain allows (I believe it uses marching cubes). One positive way in which this isn’t entirely comparable is that creating a template isn’t necessarily filling in every single detail just laying out the rough forms of the landscape. We can assume that the talented team at Hello games could make a tool suited to this workflow(I’m not going to guess how long making the tool would take but if it’s being used on a massive scale you want a pretty robust tool built from scratch) allowing the designer to define the landforms and areas where certain detail objects will be placed (eg. where forest goes). With this tool we can say the developer will take maybe half a day to make one template and another half to test it in engine with all the different biomes it can appear in and make any necessary tweaks (there’s 11 major biomes in the game so I think this is a fair if not generous estimate). So for just this 32km² chunk with templates possibly repeating 8 times within it that makes it 128 days worth of work. This can obviously be split up between a team but it will still cost the same amount in wages.

Part Three. Stitching the seams:Cool so now we have a relatively varied 32km² area of template based generation. But hang on how are we even blending these chunks together. We don’t want the edge of one chunk to just be a massive wall against the edge of the next. One thing we can do is to apply them to a larger height map and make sure all their edges are flat and line up this means the edges inherit the height from the heightmap but would need to be relatively featureless. Now the edges have less detail which is a problem because if you play enough you’ll likely start noticing the chunk grid, so maybe we should try to define a set of rules about which chunks can go together? We could use something cool and cutting edge like Wave Function Collapse (it’s really cool you should definitely read up on it here’s a neat open source implementation) well okay now we have a consistent level of detail across everything. But hang on I’m playing our new template based NMS with chunks that match up nicely but what’s that?! I’ve seen roughly that sort of mountain beside roughly that sort of lake 5 times while exploring this one planet? Hmm turns out there’s a sacrifice you have to make if you’re going to take an approach where certain chunks can go beside each other and others cant. each chunk now has a limited amount of other chunks it can actually appear beside and the reoccurrence of these patterns of chunks beside each other will become much more noticeable than if any chunk can go beside any other.In the end I don’t quite know what the best solution for this would be but remember every piece of hand designed content can take a lot more time to develop than you might expect so it’s unlikely merging the edges by hand is the right way to go.

Part Four. 32km² would be a very small planet:Lets assume we get over our chunk boundary issues and we have a lovely 32km² area of procedural generation with only minimal repeats and some variation applied to the repeats. now we need to fill 18 quintillion plus planets with this stuff. I did some searching and found this post about estimating the sizes of planets in NMS. For the planet they use in the example they get a total area of 478,000,000,000m² or 478,000,000km². That’s a lot bigger than 32 if we take our current set of 128 chunks we’ll have roughly 3,734,375 repeated occurrences of each chunk. Even if we can scale up and produce 512 unique chunks that’s still about 933,593.75 repeats on this single planet. In practice I suspect even a really good implementation of a template system for No Mans Sky would lead to a very similar level of infinite variations on the same thing as the current system does.

Some unfortunate side effects could also be:

  1. It would likely eliminate the current possibility that the noise and other structures used to generate the existing planets have of creating super rare combinations of features that are nearly unpredictable.
  2. Larger form features such as the curved trenches that form on some planets would be very hard to keep around.
  3. More than likely this would have big performance overheads.

In conclusion while I also want improved variation to the generation I can’t say I think templates are the right approach and I’m going to wait and be patient and try to make the most out of the current generation while it lasts. If it is ever replaced I’m sure there’ll even be people going back to previous versions of the game to revisit it just like people do with pathfinder nowadays.

If you made it this far I hope you enjoyed what I was saying and maybe learned a thing or two. I’d love to write a bit more about topics like this so I’ll keep an eye on discussions of the proc gen going forward.

TLDR:Planets big, templates small. You need a lot of templates to fill a planet with minimal repeats and matching up the edges of templates in a natural way is a major task.

edit: fixed some weird wording.

submitted by /u/Breoganhackett
[link] [comments]

続きを読む シェア
0

Community

This planet has been the creepiest one I've found for two weeks, and I just saw this today...

️S̴̨̛͇̺͇͕̟̘͎̗͖̙͍̭̞͇̒͆̀͝Ě̵̢̧̛̦̼̜̲͕͕͍̤̙͉͓́̅͒̽̍̐͋͜͝️N̴̟̬̠̣͍̹̜̠̘̮͎̥̜̳̖̋͋͛̆́̂̀̅̓̕ͅͅD̸̢̮̫̰̥̗̘̱͉͙͙̺̫̏͒̅̌ Ḩ̶̳̣̮̻̪̜͍̹̭͓͍̳̼̈́̅́̄̍̀͐́̊̽͌̊̂͂͠͝͝Ě̵̢̧̛̦̼̜̲͕͕͍̤̙͉͓́̅͒̽̍̐͋͜͝L̴̢̥̞͚̫̠̰̳͍̹͎̠̲̺̳͛̾͌̆́̂̒͗̓͝ͅP̴̘̤̯͙͐̔̍͊̑̏́̌̇̎̓̀͘ submitted by /u/Burgerdude…

続きを読む シェア
0

Are there any planet types/areas you avoid?

I avoid planets that have large bodies of water because of lassophobia. The last thing I want is to accidentally crash my ship in the middle of the sea.

I also try to avoid planets with those giant worms. I have come across them in 4 different star systems now.

I avoid crashes freighters because I’m scared there might be something there to attack me.

I avoid the bases that are infected with eggs too.

All of these give me anxiety to I avoid these bits in the game.

Apart from the top 2, what am I missing out from not doing the others?

Also is there anything you avoid?

submitted by /u/MosEspaDaimyo
[link] [comments]

続きを読む シェア
0

Popular Posts