Monday, 1 June 2026

In the sewers

Sewers are a great example of how crazy roguelike development is. I added sewers I think couple of decades ago, but only now I'm starting to implement them... Until now a sewer has just been an object type with a pit and a lid. The lid is actually a door, it's just on top of the sewer. So now I have to figure out stuff like if the lid is closed then the character wont fall in the sewer and so on. Another thing I finally have to add is how to get up from a sewer. I think there will be a climb command which changes the action mode of a creature to climbing. There are a bunch of action modes and none of them are working at the moment, but it's getting there.

Sewers will store objects like containers, so you could in theory use them as a stash. An unreliable one. One of the craziest idea I have is that you could enter a sewer which would be a mini-sized level of maybe a maze type, but the current engine does not support this kind of wacky idea. It's so bananas to think about how much there is still to do, even on basic level like this, just to get game objects to work. Then again, maybe sewers are a special case, because I think they just were left unfinished. After all the game does have working doors, containers and that kind of stuff.

I'm going to post again when I get out of the sewers.

Sunday, 11 January 2026

Scene refactoring

New year begins with refactoring. This is an "old" problem, because for a longest time I did not understand how double buffering works in SDL until it became hardware "forced" in SDL3 that shows it. The way you are supposed to draw stuff is just draw everything for each frame. This doesn't work in Kaduria as expected, because there are stuff like menus which have their own drawing loop and they only draw their own window and text, nothing else.

To fix this you can do a lot of things, but one way is to create "scenes" which show everything for that screen. So when you are in a menu loop, it's showing the current scene on the background, then draws the menu window and text. Problem fixed, right. In most cases yes, but in some cases you need to figure out how drawing works inside the Scene class.

Then again, this refactoring is a minor problem when compared to lack of content. I still have to create most level themes, try to make the RPG system etc. I've been reluctant to even think about level themes, but they should not be that difficult. Most pieces needed for level themes are ready to use, although I'm not sure how to implement town type levels.