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
Is Elon Musk Actually Unblocking Himself From Twitter Accounts? thumbnail

Is Elon Musk Actually Unblocking Himself From Twitter Accounts?

Koshiro K/Shutterstock It has hardly been a week since Elon Musk acquired Twitter, the internet's favorite and most controversial microblogging website. As tends to be the case when people are upset with the platform, many have turned their attention to the open source and decentralized alternative Mastodon, while others have simply deleted their accounts in
Read More
Ghana’s Central Bank may fine Lemfi, Wise, others for unapproved FX operations thumbnail

Ghana’s Central Bank may fine Lemfi, Wise, others for unapproved FX operations

Ghana’s Central Bank has barred eight money transfer organisations (MTOs) from offering remittance services without regulatory approval. According to a notice seen by TechCabal, these companies include LemFi, Wise, Transfer Go, PayPal’s Xoom, SendValu, Boss Revolution, Aza Finance, and Supersonicz.  According to the notice seen by TechCabal, the Central Bank warned the public, commercial banks
Read More
Local Digital Capital Index: A framework for levelling up thumbnail

Local Digital Capital Index: A framework for levelling up

bluebay2014 - stock.adobe.com How can the tech sector ensure digital equality across the UK in support of the government's levelling-up agenda? TechUK is trying to set the benchmarks By Julian David, TechUK Published: 01 Oct 2021 The concept of “levelling up” has been at the top of the government’s agenda for years now, with the…
Read More
The macro mode of the iPhone 13 Pro also appeals to doctors thumbnail

The macro mode of the iPhone 13 Pro also appeals to doctors

Les iPhone 13 Pro apportent pas mal de nouveautés sur le terrain de la photo et de la vidéo. Le mode cinématique ou le ProRes n’en sont d’ailleurs qu’une fraction. Et s’il y a bien une amélioration en particulier qui fait beaucoup parler d’elle, c’est l’arrivée de la macro. Si Apple a beaucoup tardé avant…
Read More
Xbox Series X/S now supports Dolby Vision for gaming. thumbnail

Xbox Series X/S now supports Dolby Vision for gaming.

Microsoft ประกาศว่ากำลังจะอัปเดต Xbox Series X และ Series S ให้รองรับการใช้งาน Dolby Vision สำหรับการเล่นเกม ก่อนหน้านี้ทั้ง 2 รุ่นรองรับแค่เพียงระบบเสียง Dolby Atmos เท่านั้นทาง Microsoft ได้ให้สัญญาว่าเกมมากกว่า 100 เกมสำหรับเครื่องเล่น Xbox Series นั้นจ ะถูกปรับให้รองรับ Dolby Vision ตัวอย่างเช่นเกมดังอย่าง Halo Infinite ก็จะเปิดตัวพร้อมระบบนี้ด้วยเช่นกันMicrosoft และ Dolby กำลังทำงานร่วมกับนักพัฒนาเพื่อปรับปรุง Dolby Vision โดยตัวเกมที่รองรับ HDR10 หรือฟีเจอร์ Auto HDR ของ Microsoft อยู่แล้ว จะได้รับการอัปเกรดเป็น Dolby Vision ทันทีเมื่อเชื่อมต่อกับจอแสดงผลที่รองรับDolby Vision เป็น HDR ที่ได้รับการพัฒนาอย่างมากเมื่อเทียบกับ HDR10 ด้วยค่าความสว่างสูงสุดและต่ำสุด…
Read More
Index Of News
Total
0
Share