But why, Dana?
Listen, I love games like nethack, Angband, and brogue. Even some of their gussied-up children like Hades. And despite coding being my day job, I still find it a lot of fun, too. And roguelkes and coding are two great tastes that go great together.
When you're a programmer and you play a game like this, I think it's natural to think about how it is implemented. So, as happens to me periodically, I got the itch the work on a roguelike and this time I decided to scratch that itch. My last attempt was back in 2021 and I'd made some good progress until fighting with Rust just got to be too much. After a couple of months with the language I was still regularly fighting with the compiler and it made working on my game a miserable experience. This time I'm using C# (my day job language, and I genuinely like it as well) and my main goal this time is the game itself and not learning a new programming language.
A week into it
So far my work has been infrastructure stuff: opening a display, drawing characters on it, moving your avatar around, etc. I implemented brand new dungeon generator and field-of-view algorithms (I mean new to me, not that I invented them!) and translated my old Rust code for generating an over-world wilderness map. As in the past, getting the display has been a dilemma for me. My game uses ASCII characters like a traditional roguelike because (1) I do not have the skill to make my own sprites and (2) for a game like nethack I legit find the ASCII display cleaner and easier to read than squinting at low-res tilesets while trying to figure out what monsters are nearby but figuring out a cross-platform terminal solution can be a pain. In my Rust game, I was using SDL and this time I decided to try a library designed for roguelikes called Bearlibterminal. It does exactly what I want and is quite simple! The fly in the ointment is that whle it's cross-platform, it's an older project and not really updated anymore. I couldn't find binaries for it compiled for Apple silicon and when I compiled it myself, it worked for certain defitions of work, but had bad display glitches. The low-level guts of displaying my game aren't what I'm interested in so I also translated my Rust code for an SDL2 display to C# and got that working! This is good in a way, because it forced me to separate my UI code so that the details of how things are shown on the screen is separated from the game logic and higher-level UI logic. If I want to add true terminal support or even -- heaven forfend -- sprites in the future, it should be fairly easy.
In the wilderness. I'm pleased with this colour scheme -- it gives me Ultima IV vibes.
Exploring a (currently empty) dungeon!
At this point, I've implemented a lot of the basic UI stuff. Menus for your inventory and picking up/dropping items, save and loading game (so it doesn't become a big, tricky thing later). Lots of work to do before thinking about adding actual content to the game...
One thing I did different than my previous stabs at roguelikes is to have a non-blocking main game loop. What I mean is that the simplest way to implement a turn-based game is to just have the game processing grind to a halt when it's waiting for user input. But in 'real' games this doesn't happen. Even in a turn-based game you may still want to have music playing or animations going while the player is idle. Getting this to work nearly broke my brain, but I did it! I'm not sure what I'll actually use the feature for but it was neat to work on. In the meantime, I implemented clouds that float by on the wilderness map whlie player is idle!
I am way too amused by my animated clouds
Next up, I'll probably work on implementing some simple monsters and get them walking around the world.
The future
The thing is, I don't have any grand plans for the game. I'm not like "here's a niche in the genre I want to explore" or "here's what I dislike about nethack". It's just fun to work on the game and just cool to see my little @ dude walking around in a world that my code created!
So I'm going to do a fairly generic fantasy roguelike rpg where you need to descend into a dungeon and kill the bad guy lurking in its depths. But I have some ideas to make my game distinct a bit from, say, Angband. There will be a town not far from the dungeon (the premise of the game is that you've arrived to rescue the town from the danger lurking in the dungeon) with NPCs who know things about the dungeon. Previous adventurers may have mentioned the vampire on level 7 or the hidden shrine on level 4. The villagers might mentioned an earthquake a few months back (resulting in some of the dungeon levels being partially destroyed and full of rubble). I want a dungeon with some history. Some other vague ideas: the player may find a scrap of a journal from an explorer who talks about how the Rat Prince is immune to fire, etc. So, I'll need to generate most of the dungeon in advance. I'd also like to have a few different end game bosses and as you get deeper in the dungeon the levels become more theme-appropriate. If the final boss is a balrog levels might progressively have more lava and fire-based monsters. If the final boss is a lich, more undead. I haven't played Caves of Qud but I gather it has a very deep, procedurally generated in-game history so that will be a game I need to research (ie., play a bunch).
I'd like the townsfolk to be fairly rich. I don't know how well that can be done procedurally so perhaps I'll have a pool of NPCs whose dialogue is somewhat hard-coded and then each game will get a random subset of those NPCs. People don't mind interacting with the same characters in multiple play-throughs of, say, Stardew Valley so I don't think that will be too much of a problem. I have no idea yet how to code NPCs and how to store the generated facts about the world in a way the NPCs can use, so that'll be something to research.
I was also thinking about a grit/stress mechanic similar I guess to games like Darkest Dungeon. So if you spend too long in the dungeon your stress starts to increase and you accrue penalties and status ailments (fear of darkness, nervousness, or you become reckless, stuff like that). I hope this might promote some risk/reward decisions, as in how far does the player push their luck. And it will also hopefully encourage the player to return to the surface to interact with the NPCs since they'll need a spa day to recover. Finally, what if after a certain amount of time has passed, the Boss Monster bursts form from the dungeon and lays waste to the town?
I'd like the overworld to be somewhat living. As in, there are occasional events on the surface that affect the game. A necromancer might take up residence in a cave and plague the area with zombies. Pirate raiders might come ashore. Townfolks might move in and out, etc, etc. An unnatural winter rolls in.
These are all pie-in-the-sky ideas for the moment!
For now, my current goal is to create a Minimum Viable Dungeon: a 10 level main dungeon, a boss at the bottom so there is a win condition, a bit of the aforementioned dungeon theming, and enough content to make those 10 levels not boring. A town with NPCs even if they are dead simple and have a few canned lines to speak. Some shop keepers.
I haven't named the game yet, but the code is on github under a CC0 license. I consider my code to be in the public domain!

