Create procedural random dungeon

Hi guys, I need your help. I want to create a random room generator mechanism for my topdown game. I need some examples because I can’t find any made with gdevelop

I’ve been attempting the same type of thing in my game, generating islands. I’ve had some success by making my scene a sort of grid, and making generation kind of half-random. For a dungeon, I would have it randomize room location and room size, but have there be predetermined shapes that it picks out, so that you don’t have to go crazy making sure that exits and things are always accessible. Then you need halls between rooms, and I’m not completely sure how that would work. My initial thought is to raycast between walls to detect if they are traversable, then make a straight line of floor and surround it by walls. That’s not tested, however. Then for chest or enemies inside the dungeon, do something like:

Conditions:
If number of object < x
Pick random floor
Actions:
Create Chest at Floor.X(), Floor.Y()

Again, that’s not tested, but I think something like that could work.

Perlin noise exists as a random generation method in GDevelop. The concept is complex so I’d recommend going through both full tutorial details here: Procedural Generation [GDevelop wiki]

Unfortunately, I’m not aware of any completed (or incomplete) procedural generation games made in GD5 at this time. It’s definitely doable, but you’re going to have to figure out what method you want to apply on your own.

Actually doing something with procedurally generated dungeons.

It is in very early stage, but the logic is kinda simple:

 + Make a grid with N by M objects, the ones that will work as walls, with pathfinding obstacle behavior, yet not active.
 + On random spots, create up to 10 rooms seeds (tiled texture objects) in the same size of the pathfinding grid.
+ Make a pathfinding object move from room 1 to room 2, and so on. For each step, create a hall object. With this, you ensure a path from room to room, without closed rooms.
+ For each room, make width and height random number.
+ For each grid object don't touching the rooms or the halls, delete them.
+ For each grid object touching the rooms or the halls, ignoring the ones just touching, delete them.
+ Make the walls impassable obstacles.

Now you have a group of rooms and halls, surrounded by impassable walls.

It took me a while to make it work, but I may say it works. The downside of it is the amount of hall objects made by the pathfinding object (For a group of 10 rooms I have got over 100 hall pieces), so I am working on the logic to cut the hall.