Roguelike dungeon generator update
roguelike 2d sfml c++ adventure rpg
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.