NMS HOT POST


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

NEXT PATCH 1.59 | 日本語パッチノート

PATCH NOTE PoloのQuicksilver Synthesis Botに新しいアイテムを追加しました 発見の保存を停止する原因となる問題を修正しました。 特定の数のインベントリスロットを持つプレイヤーが、他のUI要素によって他のスロットページが隠れてしまう問題を修正しました。 ミッション完了後、Community Researchポータルがプレイヤーを正しい銀河に戻さないようにする問題を修正しました。 宇宙ステーションテレポートリストの最初のエントリーが、間違った銀河のプレーヤーを自宅の銀河に戻すことを…

続きを読む シェア
0

NEXT PATCH 1.58 | 日本語パッチノート

UPDATE セーブスロットごとのマルチプレイヤーに対するユーザー権限を追加しました。可視性の設定、ダメージ+ベースの編集は、すべてのプレイヤー、友人のみ、または誰にも適用するようにカスタマイズすることができます。 地形の編集システムを改善し、地形を再生成する機会を減らしました。このシステムのさらなる改良が進んでいます。 プレイヤーの宇宙船の軌跡のビジュアルを改善しました。 惑星NPCからの使命プールに考古学ミッションを追加しました。 非常に大きなセーブゲームを持つプレイヤーが節約できない問題を修正しました。 セー…

続きを読む シェア
0

NEXT PATCH 1.57 | 日本語パッチノート

BUG FIXES 特定の船型を終了するときに惑星が発見タイムラインに追加されない問題を修正しました プレイヤーがセンチネルの宇宙戦闘機の波の間に、脱出するためにパルスエンジンを使用できない問題を修正しました。 ベースの移動/削除後にベースのNPCワーカーが応答しなくなる問題を修正しました。 水耕栽培のトレーで燃料の持続時間が大幅に延長 ノード数が多いシーンでXbox One Xがクラッシュすることを防止しました。 クリーチャーに関連したクラッシュを修正しました 地形の生成に関連するクラッシュを修正しました ゲーム…

続きを読む シェア
0

Popular Posts