Download

Random Generated Tile Dungeon

Hi guys.

I got absolutely obsessed with trying to make a “old school” random dungeon generator. Like this one : http://donjon.bin.sh/fantasy/dungeon/ , but with a little twist, I wanted to have a manual start point and end point, so I could add custom events. So lets say you want to have a start point of the dungeon, a end point, and in the middle you have a “custom event”, a puzzle or a boss fight.
The journey between the start point and the “custom event” will be a random generated dungeon, and the journey between the “custom event” and the end point would also be a random generated dungeon. The journey between the “designed” game play elements would be random. There will also be a option to turn of the custom start point and custom end point, to just create a normal random generated dungeon with the start and end point is just spawned at a random place.

This is nowhere near as complex as dungeon architect, and I am not a pro ue4 user nor a programmer. Heck, all I know is a little blueprint. So this is for my own benefit and also hopefully whoever is interested.

Anyway, I started a blog, that sort of explains my logic and how I try to figure out how to do it. I wont be showing off all the blueprints, but wanted more to give a understanding of how to do it. So its sort of a blog of my journey trough this, and also explains what I learn. I hope it is to some benefit for someone? If not I might as well just stop blogging :stuck_out_tongue:
It can be found here :

I want to stress, between work and being a father, I dont have much time. I will try to update it when I can. I am also going out on fathers leave the next 10 weeks, so it might take some time to update the next blog posts.

http://oyvindberget.com/blog/

Here are some of my results for now :

The light tiles are Mazes, the dark tiles are rooms, and the blue ones are doors. I havent yet figured out how to get the tile to always end up at the same “end point”, but that is something I am trying to figure out. Right now it starts at 0,0 and just goes wherever, it needs to be fool proof, something I am working on. Any tips on how to do this, please let me know :slight_smile:

dungeon02.jpg

dungeon01.jpg

dungeon03.jpg

here is also a screenshot of how an old version looks like with mesh. I made some stupid decisions when it came to how to create the modules on my first attempt and decided to start over with the modules. (fewer pieces). I will explain that in the blog when I get to that point. It also created double doors, something I have removed in the new version. :slight_smile:

oldmesh.jpg

@ThatLittleSpider, Looking very nice!

Would taking the endpoint and connecting to the nearest tile (after the generation) help? Since you don’t have isolated sections, it should be accessible from the start

Thanks for the tip Ali. I did what you said, to avoid creating problems for the maze I ended up using 2 tiles to connect to the nearest tile. So it could take a bend. It sort of builds towards the nearest tile one step at the time until it finds it, then it attach itself to that tile…

Here are updated results, I still got some bugs to iron out, and I haven’t added any mesh to this revision. I want it to be safe to use, never make a mistake… So Im just sitting here hitting compile :stuck_out_tongue:

I will follow up with the tutorial when everything is completely ready.

Forgot to put in that green are doors on the images :stuck_out_tongue:

96906c4ad8c4f5547a3c474b307cfb0fc9aab0f2.jpeg
f48aa114d428e430342d85ec98960bedc0acbb22.jpeg
3f422b6c4ac1b91c360d84e275278b6a396126a5.jpeg

It is really starting to come close to the idea I had :slight_smile: I am going to add inn a value that I can adjust to create more loops… Like previous images, I had them removed for now (didnt like that the maze always run all around edge.)
I want to add a percent chance for secret doors and traps…

The red tiles you put in custom mesh, example “from previous level” is a stair, or an elevator and “hint to puzzle” is a custom made room with a hint on how to solve the puzzle later in the level.
The puzzle is also a custom made room.

Dungeon_Test02_v01.jpg