Simple Dungeon Map Generation

The Smol Dungeon banner image.

You feel compelled to go down…

Available Now!

As of Smol Dungeon v1.1 (the launch version) there are four flavors of map generation. This is a rich topic and there are loads of awesome map gen algorithms to read about online. This is just a smol sample of what’s possible.

Rooms

If you’re interested in map generation this is the algorithm to start with. You dig out a series of rectangular rooms and then connect them up with a series of hallways. For a classic look, don’t allow the rooms to overlap. In Smol Dungeon rooms are allowed to overlap.

An animated graphic showing the rooms map generation algorithm.
Rooms Map Algorithm

Circles

The same idea as the rooms algorithm but with circles instead of rectangles. The circular shape combined with overlap creates more organic “cave-like” maps.

An animated graphic showing the circles map generation algorithm.
Circles Map Algorithm

Hallways

Monsters block your path in Smol Dungeon, so having narrow corridors can create quite tense situations for the player to resolve (or die from). We select a series of points and then join them up with some tunneling.

An animated graphic showing the hallways map generation algorithm.
Hallways Map Algorithm

Templates

Although procedurally generated levels are technically “limitless” they can end up having a very repetitive feel (hence three different proc gen map types). To further alleviate this we also have many pre-defined hand drawn maps. I drew most of these on paper and then translated to my very sophisticated tile map data structure.

            let ZIG_ZAG="""            ############            #..........#            #..........#            #########..#            #########..#            #..........#            #..........#            #..#########            #..#########            #..........#            #..........#            ############            """        
An animated graphic showing a template map being created.
Template Maps

Given Smol Dungeon’s 10×10 map constraint, map generation for the game did not need to be more complex than these few procedures. A larger game would likely benefit from a more sophisticated approach. If you’re working on a game I’d encourage you to try mixing and matching different procedures, e.g. a rectangular approach for dungeon levels and the circular approach for cavern levels.


Note: This article have been indexed to our site. We do not claim legitimacy, ownership or copyright of any of the content above. To see the article at original source Click Here

Related Posts
Amazon finally opens doors to its serverless analytics thumbnail

Amazon finally opens doors to its serverless analytics

If you want to run analytics in a serverless cloud environment, Amazon Web Services reckons it can help you out all while reducing your operating costs and simplifying deployments. As is typical for Amazon, the cloud giant previewed this EMR Serverless platform – EMR once meaning Elastic MapReduce – at its Re:Invent conference in December,…
Read More
Pictures and specifications of Realme 9 Pro have appeared thumbnail

Pictures and specifications of Realme 9 Pro have appeared

14.01.2022 11:43 | Mobile Očekujemo da će Realme uskoro objaviti ostatak porodice Realme 9, ali već dobijamo dobru ideju šta da očekujemo od Pro modela, zahvaljujući nizu slika i listi specifikacija koje su dali leaksteri @OnLeaks i Smartprix. Oni otkrivaju da će Realme 9 Pro imati rupu za selfi kameru u gornjem levom uglu ekrana,…
Read More
The 29 best sci-fi movies on Netflix right now thumbnail

The 29 best sci-fi movies on Netflix right now

It seems like every big blockbuster these days is about space, aliens, or superheroes, which just goes to show that sci-fi is officially mainstream. Sci-fi movies have bigger budgets, bigger stars, and more incredible effects than ever, expanding the genre to previously unseen heights. Whether you’re a sci-fi junkie or you’re just looking for some…
Read More
Amazon brings new AI-driven features to Thursday Night Football thumbnail

Amazon brings new AI-driven features to Thursday Night Football

As Amazon’s Prime Video gears up for its second year as the exclusive rights holder to NFL’s Thursday Night Football (TNF), the streaming service hopes to give fans a more enhanced viewing experience with a slew of new AI-driven features. During a demo with Prime Video executives, TechCrunch learned about the AI elements coming to
Read More
Finnish startup to launch ‘software-defined’ satellite with ESA thumbnail

Finnish startup to launch ‘software-defined’ satellite with ESA

Helsinki-based startup ReOrbit is preparing for the first demonstration of its “software-enabled” satellite. This marks the next phase of the ESA’s UKKO programme, which works with ReOrbit to develop and test next-gen tech for Earth observation satellites. (Fun fact: Ukko is the god of the sky, weather, harvest, and thunder in Finnish mythology). ReOrbit’s first
Read More
Index Of News
Total
0
Share