Hey clickers. I was trying to find a dungeon generator for a game I'm working on, and while I did find one or two great examples, I had a bit of hard time to figure them out. Simply put: I couldn't get them to do what I wanted/needed. So instead, I decided to make my own. It was a rather interesting learning experience, and what I'm posting here is my third attempt.
The code is a bit messy, and I've tried to clean up the functions that got removed during the process. While working on this, I more or less on accident created an auto tiling system for it as well. I've commented on the mayor parts in the event editor, but I've probably missed one or three things...
Be aware that this example is based on a 8x8 pixel grid, simply because I needed to have a better overview of the created rooms, so if you want to use it for larger tiles, you'll have to do some poking around. Another thing that might happen (but really shouldn't) is that once in a while a section might be totally seperate from the rest. I think I know why, but not entirely sure.
Feel free to use this for whatever you like!