Jump to content
  • Advertisement
  • entries
  • comments
  • views

Roguelike dungeon generator update

Sign in to follow this  


Unfortunately I've been plagued with this feeling of irritation. Just can't seem to focus or sit still lately. Finally got some things in life out of the way that I think was bringing this on and got the refactoring almost complete. While I was cleaning up some code I made a couple small tweaks to the dungeon generator. Oh boy it made a big difference in my eyes, funny it was sort of a bug that I fixed that made this huge change ;) . My BSPTree wasn't splitting and reporting pairs correctly, though it worked good enough it went unnoticed.

Heres a couple shots of the new dungeon layouts that are possible now.


The layouts are quite a bit more varied, and less grid based like they were before. Just a quick run down of how I generate my layouts. I use a BSPTree to split the level into a series of rooms. The splits have a slight bit of variance but always split on the longest edge. Once I have these rooms, I randomly remove a third of them. This was the biggest affector to the new look. Once again using the same bsp tree I query it for every pairing and connect each one together with a corridor aslong as one of the pairs still exists. Another change was including "parent + child" as a pair and not just "child + child". This causes the more varied hallways.

I'm really pleased with how it turned out. It does have a slight bug where one or two 1x1 rooms sometimes exist with no connecting corridors. i thought about just making a quick pass and removing any of these. but once I get the LOS system back in the player will never know they even exist. Also because of their size nothing will ever spawn within them.

Another day and everything should be back in place and ready to move on. I've done a little assestment of things so far and I'm thinking all that's left beyond polishing and adding in the rest of the assests. Is just getting the ability/skills system and the new ranged targeting system. I'm hoping to power through the rest of it by the end of the week, release a build and start polishing.

To help speed things up, I'm dumbing the system down a little. You'll no longer be able to go back up stairs, the goal of the game will still be reaching the end and grabbing the magical item at the bottom. You just won't have to bring it back up. Each floor will be generated when you enter it rather than generating every level at the beginning.

Till next time. keep on coding.
Sign in to follow this  


Recommended Comments

Looks good.


I love random generation. I'm too lazy to make it in my own games though. But randomly generated stuff can look incredibly pretty in some instances.

Share this comment

Link to comment

Thank you, it's actually been pretty fun working on the generator. Not that hard either once it got going, now it's just tweaking numbers. I'm hoping with each iteration I can take the idea of procedural generation into more and more of the sub sytems.

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!