Roguelike dungeon generator update

Published May 12, 2014
Advertisement
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.

screen008.png
screen007.png
screen009.png

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.
5 likes 2 comments

Comments

Shane C

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.

May 13, 2014 11:25 PM
coremarq

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.

May 15, 2014 05:07 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement