Today I got to improve some of my not so awesome code! The version of my level generation process was not quite as elegant as hoped. It was a one big giant procedure that puked out all the rooms in the level when the level is called.
So I re-arranged some code, wrote some more and got out of the whole mess with a little smile on my face. I’m not gonna go in to great detail of what I did but I can show you some progress shots here.
First things first, yesterday I got sidetracked while coding this thing to make the chests now spawnable (and hold items inside) as well as redesigning the barrels I had. Which previously only had two frames of poses. Intact and broken.
Now you can smash them, hope hearts fly around and watch the ugly WIP particles explode! (Seriously, I’m gonna work on them later)
The chest turned out a lot better imho, at least when I get around adding more items to the container list. Why Waldir has a bunch of hearts laying around inside chests in his basement is a question I can’t answer though.
bonus madness gif
Next up, the actual progress stuff. Although small, it is a significant change from the old stuff I had.
I’m not sure if that gif shows it very well (I need a better director for these gifs), but the room doesn’t actually generate untill you walk in to it now. This means I can better control what kind of conditions apply and what rules to abide when randomization happens. Mainly I did this so the system can check better if miniboss rooms will appear. (Depending on how long deep you are in to the dungeon, the better chances of spawning it has)
This also allowed me to do a boolean check for the minimap that sees if the room has been visited or not. So now when you visit a room, it’s marked on your minimap and all the rooms it’s connected (excluding all the secret rooms & stuff) are shown a little darker and transparent untill visited.
Not perfect, but I like the direction it’s taking. The font for the heart counter is a bit out of place but since it’s pre-alpha it’ll do it’s job!
I still have a lot of work to do untill saturday! I hope to keep my deadlines this week around after missing some last week 🙂 Mainly I’ll try to do treasure rooms appear, aswell as begin working on the first boss or miniboss, either way.
Huge thanks for reading through this rant and hope to engage you to wait untill next time!