Home Artists Posts Import Register

Content

New blog post! This is an extension of the previous article, examining level design details specific to underlying layout planning for procgen maps.

I've embedded it in image form below, but Patreon is actually terrible with images and formatting (which is why I also didn't just paste it here...) so it's probably easier if you check out the text version here.

The password for access is "procgen" :D


Comments

Amphouse

Wow nice blogpost! I sure learned a lot about mapgen.

Kyzrati

Thanks Amphouse! Was glad to have the right opportunity to cover some elements I've never touched on in procgen articles before.

Suslik

Hey, that's an interesting read. I'm curious to see what kind of layouts mapgen code rejects and why. Also might be cool to add an animated gif of how the map is generated iteratively. Like, how the tunneling algorithm works, how a couple of them are rejected, how you fill the result with objects and enemies, etc.

Kyzrati

Hey Suslik :). Yeah I was planning to do another post in the future about the content process, which goes far beyond layout considerations. As for rejection reasons, the parameters are of course map-dependent, but the reasons can fall into a few categories. - random important prefabs are unavoidably overlapping (this is a problem with the design and it needs to be redone) - too few/many open cells (a given map needs to fall within a certain percent range) - too many rooms - too many rooms of a certain size - too many large open spaces - too single large open space that exceeds the desired limit - tunnelers got caught on something before they could even get started working - any number of pathfinding failures, including inaccessible areas and prefabs

Suslik

It's interesting how there's always a balance between how smart(reliable) you want your mapgen algorithm to be vs how many attempts at rebuilding you can afford. Like, if you make your algorithm produce desirebale results twice more often but it takes three times more time, it's not worth it. But generating thousands layouts randomly and rejecting over and over, hoping to generate something reasonable does not work either, so you have to find the right balance.

Kyzrati

Precisely! I guess that's something I could've shown as part of the process, too, watching sample output from the rejections. I've had to change map concepts in early dev before when it was simply taking too long to generate one that could pass all tests. On average most Cogmind maps fail about 3-4 times, although sometimes it's still possible to get upwards of 10-15 failures, and that's when you might be more likely to notice a bit of loading time (though generally still within 2-3 seconds, depending on your CPU). A longer wait time is naturally more likely on a larger map, not only because of the raw generation time, but simply because each failure will be more costly.