I would love to learn more about how dungeons are generated like this - is there anywhere you can point me in the right direction to learn more about it?
Press X to restart.
Log in with itch.io to leave a comment.
Well, I can point you to a good example of dungeon generation: Pixel Dungeon. Here is the code, you want to look at:
*it's in java
Can't recommend anything else, try to search a bit about BSP dungeon generation. That's one of the methods, that I use.
thanks I’ll check it out - I was curious because most examples online use hall ways to connect rooms, but yours generates each room side by side making it feel more like a building than a some sort of cave system - it’s a really neat effect. Thanks again for the link
Well, the trick that pixel dungeon uses, is that it generates just room. Then it selects room in some path, that is in a circle form. And then it paints each one. But some of the rooms are painted like tunnels, so it doesn't need to implement pathfinding and stuff. I really love this idea.
Awesome! I did manage to get some weird results, where a door was placed exactly at the crosspoint of three walls. In this example there's also a door in a pool of water. But hey, that might be a trap:)
Yeah, I know this bug 😕 Messed up random bounds somewhere. But well, this was a 30 min build, so yeah ;) Can be also solved by going over the map once again and looking for a door with 3 walls near.
But... what i do whit this?
That is so cool it would be great for a game!
Wow! Juste wow! It's very nice!