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
This chart shows why heat pumps are still hot in the US thumbnail

This chart shows why heat pumps are still hot in the US

Heat pumps are still a hot technology, though sales in the US, one of the world’s largest markets, fell in 2023. Even with the drop, the appliances beat out gas furnaces for the second year in a row and saw their overall market share increase compared to furnaces, sales of which also fell last year.Heat
Read More
Movano announces Evie Ring FDA submission and launch date delay thumbnail

Movano announces Evie Ring FDA submission and launch date delay

A 501(k) for the Movano Evie Ring has been submitted to the FDA. (Image source: Movano)Movano has submitted a 510(k) to the FDA for its Evie Ring, a first for the brand. The filing includes data demonstrating the accuracy of the wearable’s heart rate and SpO2 sensors. However, a later-than-expected submission date has led to
Read More
The SASSA status check 2023/2024 thumbnail

The SASSA status check 2023/2024

This guide aims to assist applicants in manoeuvering the application process, understanding payment methods, using the SASSA status check, and accessing available resources. Understanding the SASSA grant application Online Application Prospective applicants can initiate the grant application via the SASSA portal. Ensuring accurate details Providing precise and verified banking and personal information during the application
Read More
Curious: people use Bing to search for Google thumbnail

Curious: people use Bing to search for Google

Mitchell Luo, Unsplash Einen ordentlichen Schlag in die Magengrube des großen Konkurrenten hat Google jetzt überraschend ausgeteilt. Während Google gerade in verschiedensten Verhandlungen steht, hat man vor einem Gericht in der Europäischen Union einen kuriosen Fakt auf den Tisch gehauen. Bei der Konkurrenz von Microsoft schauen die Nutzer nämlich nur vorbei, um nach Google zu…
Read More
HRW repudia destierro de Anamely Ramos de Cuba thumbnail

HRW repudia destierro de Anamely Ramos de Cuba

La organización defensora de derechos humanos Human Rights Watch repudió el destierro de Cuba de la activista y curadora de arte Anamely Ramos, impedida de viajar al país donde reside por orden del régimen de la isla.“Hoy la artista cubana Anamely Ramos intentó volver a su país. El régimen le ha prohibido ingresar. @hrw_espanol repudia…
Read More
Index Of News
Total
0
Share