Free gmdungeon - a dungeon template creating asset for GM:S

example3.gif
gmdungeon is a dungeon template creating asset that can be used in any kind of project requiring dungeon generator. It's easy to use 👆

Download and examples: github
Price: Free

Installation proccess
For GameMaker: Studio 1.4

Drag all scripts from src/scripts folder into your open game maker project, add sDungeonCells_strip17.png and sDungeonRooms_strip13.png files as a sprite strip, name them sDungeonCells and sDungeonRooms.
Delete dungeon_macros.gml script and then import constants.txt as macros.

For GameMaker Studio 2
Drag all scripts from src/scripts folder into your open game maker project, add sDungeonCells_strip17.png and sDungeonRooms_strip13.png files as a sprite strip, name them sDungeonCells and sDungeonRooms.

Generated dungeon's template can be used to build full-sized dungeon (see docs in every script)

Usage for basic dungeon
Create event:
GML:
var setup = dungeon_create(); // Basic dungeon settings
dungeon = dungeon_generate(setup);
Draw event:
GML:
dungeon_draw(dungeon, 0, 0);
example.png

Pretty easy right? You can check a litle bit more advanced example on the github.

If you like this asset, you can always support me on Ko-Fi
 
Last edited:
Can you reverse halls and rooms, so you get small rooms separated by long hallways?
Hello, 2DKnights. I've just made an update on gmdungeon.

If you want to make something like on image below, I can suggest you to use this code:

GML:
var setup = dungeon_create(); // Basic dungeon settings

// All cells become hallways
dungeon_set_hallway_chance(setup, 100);

var list = dungeon_create_rooms_list();
dungeon_add_room(list, dungeon_room(2, 3, REGULAR), 3);
dungeon_add_room(list, dungeon_room(4, 4, REGULAR), 1);

// And now apply rooms list
dungeon_set_rooms_list(setup, list);

dungeon = dungeon_generate(setup);
1593525271502.png
 

Sedgwick2K

Member
Can we port those dungeons into 3D environment or does GMdungeon has 3D functions?

If so, that is a very great tool to enchance potentials of GMS.

Even if not so, much props to your hard work 🙌
 
Can we port those dungeons into 3D environment or does GMdungeon has 3D functions?
Hi, Sedgwick2K!
Unfortunately, gmdungeon doesn't have build-in 3D functions, neither it has script to expand this template to full dungeon (I don't want to include this script because it's not flexible and I use it in my own game).

You see, each cell in ds_grid, which gmdungeon generates, has values representing border states (closed, doorway or hallway).
By looping through the grid you use them to make "functional" dungeon with wall objects.

You can check docs for every script. Hope it will be helpful ;)

So, yeah, it can be used with with 3D environment.
 

Pierd

Member
Hi, Sedgwick2K!
Unfortunately, gmdungeon doesn't have build-in 3D functions, neither it has script to expand this template to full dungeon (I don't want to include this script because it's not flexible and I use it in my own game).

You see, each cell in ds_grid, which gmdungeon generates, has values representing border states (closed, doorway or hallway).
By looping through the grid you use them to make "functional" dungeon with wall objects.

You can check docs for every script. Hope it will be helpful ;)

So, yeah, it can be used with with 3D environment.
Hi can you pls say how to set up macro son this
 

Pierd

Member
Hi, Sedgwick2K!
Unfortunately, gmdungeon doesn't have build-in 3D functions, neither it has script to expand this template to full dungeon (I don't want to include this script because it's not flexible and I use it in my own game).

You see, each cell in ds_grid, which gmdungeon generates, has values representing border states (closed, doorway or hallway).
By looping through the grid you use them to make "functional" dungeon with wall objects.

You can check docs for every script. Hope it will be helpful ;)

So, yeah, it can be used with with 3D environment.
Im new to gm2 so i dont really knwo how to setup this
 
Top