Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics

Dungeon Under Grindstone

A topic by sgibber2018 created Mar 02, 2019 Views: 253 Replies: 18
Viewing posts 1 to 13

I'll officially start working on my 7DRL at 1pm PST. I'm hopeful that I'll be able to finish it but not 100% sure. It'll be a good effort though!  The basic premise is a Torchlight or Diablo sort of plot where there's a dungeon under a town and you need to get to the bottom to kill a boss and secure a macguffin. It'll be standard fare except: The battles will be turn based RPG-style affairs and the game will be party based. You'll regularly retreat to the surface for provisions and replacements. Darkest Dungeon is an inspiration but I hope to make it much heavier on the Rogue like elements. Graphics will be straight ASCII and it'll run in a Linux terminal. Development will be with C and the ncurses library. I expect difficulty towards the end with distribution and I have never tried to make a save system before but I want to try both of those things as best I can.

This page will see daily progress updates for anyone interested! Good luck everybody.


Some basic code to save/load from files in c.

I used it in some c rl I made and it works quite well. It's usefull to save binary data, like the structure of the player/map and load them easly. Keep in mind that this does not support pointer ... if you have pointers in your structure, you must write some custom code to load each chunk of data and then build the final structure.

Hope it helps.

thank you! If I get far enough to feel safe trying out the save system I'll definitely refer to that. Much appreciated.


Can't wait to play it! I like party-based RPGs, and a party-based roguelike is an exciting idea. Good luck!

(1 edit)

Day 1 Progress:

Wheeew. I spent most of today working on a map generation algorithm. I'm lucky that there's a lot of cross-over between this and other Roguelikes I've been working on lately. So far I've written everything from scratch for Grindstone but I've definitely borrowed concepts from the other Roguelike I've been working on, a survival-horror affair called Ultra Station. While some of the concepts translate really well such as the movement system or the ncurses display others do not. The map is a case in point: Because this game will feature turn-based battles on a disembodied battlefield there's no reason to have all that open space that you need for being tactical in other Roguelikes. I'm turning this to my advantage by creating a maze of twisty corridors, but I had to spend most of today working out the algorithm. It still needs a little more work as it is prone to "pooling" near the bottom due to what is almost certainly a math error somewhere but it will do for now as I move on to other systems.

So far I have it instantiating and populating 5 dungeon levels. The player's party can move around on them and can descend to the 5th one. The encounter tiles are randomly generated at the start of the game and are invisible to the player just like in a JRPG. At the moment all you get is a placeholder blurb but tomorrow the real work begins on the Battle System. I have done the same thing with items and traps by creating placeholder icons and placeholder events. 

FOV is something of a wild-card for this one. I don't think there's actually a real need for it. What I'm experimenting with here is hiding the exit tile and the nature of the loot/trap tiles until they've been stepped on. But if I can think of a way to meaningfully add FOV later on I certainly will.

Well that's all for today I think. I was hoping to get work off for the week so I could focus 100% on this but I was unable to get it. So my goal is to work out the majority of the combat system tomorrow before i have to start juggling this with work. If any of you have feedback, ideas, or criticism please let me have it! I already have a road map for this planned out so I can't promise I'll listen to all or even most of it but I have an open mind and if I can incorporate something good down the road I definitely will. Good luck everybody and happy developing! That's all from me until tomorrow.

Short YouTube clip of the game so far:

(2 edits)

Day 2 complete! I had a lot of distractions today and was not able to get as much done as I wanted but I still managed to wrap up the basic skeleton of the combat system. When the player lands on an encounter tile they are whisked away to a separate screen. Initiative order for all the members of the fight is determined randomly at the start and persist until the end of the fight. Items are not in yet but that is going to happen tomorrow or the day after. 

The stat system is pretty simple so far: You've got Health, which is static for enemy types (Emus always have 15 HP, for example) and can only be increased for the player's party by leveling up. You've got Damage which is static for given enemy types but for the player will increase slightly with levels and increased significantly through gear. Defense is really damage reduction and mitigates incoming damage. An attack has a flat 90% chance to hit whether it's a player or a monster although gear and status effects will alter that in future versions. Damage is (0-3 + the Damage Stat ) - Target Defense for now but I'll probably add more nuance down the road. Fleeing has a 50/50 chance to work and all you lost for failing is that character's turn. Whether you win the fight or flee, that encounter is removed from the map.

At the moment I don't have any animations but later in the week I'm going to add some. It's not going to be difficult but it will be a little time consuming so I'm saving it for after I've finished the inventory system and the "town." Right now in the combat screen there's a big empty space that occupies the top-right portion of the screen and that's where item menus are going to go. Items will play a major role in combat. Right now there's only basic attacks which aren't that interesting.

For anyone interested, here's a short video of my party fighting some Emus:

Looking good! We seem to have a similar idea. I'm also implementing a party into my game, however our approaches to combat are very different. I wish you the best of luck!

Thanks! I'll consider this a smashing success if it's even remotely playable by the end of the challenge. I look forward to trying out your game and all the other awesome ideas people have put up here.

I like how the player is whisked away to a different screen for the battlefield. It sets focus to what is important at that moment and allows for clear layout to scrutinize all combatants. Great work so far!

Thanks! If I have time to polish before the time is up I want to do a sort of cutaway animation like you would expect to see in Dragon Warrior or Final Fantasy. It is totally possible with ncurses. No sound though unfortunately.

It's nice to see true maze in roguelike - they need more refining than traditional rooms-and-corridors levels in my opinion, but have big potential.

(2 edits)

I agree. What I would like to do is figure out a way to place loot at the ends of dead-ends and other little things like that to take better advantage of the algorithm. The thing is though my algorithm is pretty simple. It's just randomly sizing and spotting room chunks and only placing them when certain criteria are met, until it hits a limit. There's no real logic to it beyond "Does it fit?" and "How many adjacent floor Tiles are there?" So the map generation itself is very simple. The loot generation even more so. I am just placing a set amount of loot on random floor tiles. Optimizing it so that I figure out where I should place loot to take advantage of dead ends is actually a lot harder than anything else I've done in here so far. I'd like to do it but may not get to it in time.

Day 3: No progress, folks. I had to work a split shift today and had no time for developing my game. That said I am confident I can still make it on time.

An aside: I've been running a screen recorder in the background while I make this game so that I can laugh at my amateur-ness down the road but there may also be entertainment value here. After the challenge, if anyone is interested in watching a total amateur bumble his way through making a game, I'd be happy to make it available.

A highlights cut would be awesome!

Day 4:

Work on Grindstone, my Roguelike/RPG hybrid continues. I'm playing catch up because I missed yesterday. I'm not putting up a video today because most of the work was under the hood. Being written in C I had to sort of make my own OOP (if I can even call it that) , and being a newer programmer my encapsulation gets pretty messy. To make items I wound up hardcoding an inventory array, and hardcoding an enumeration of item types, and creating functions for each item effect and functions to do things like display the # of items in a menu, or remove a used item from the inventory. I only added 6 basic items for now but it's enough to test out the system and so far so good. They are functional on the overmap but not yet functional in the turn-based battle sequences.  

Life has been throwing me some minor curve balls but it's nice to have a project to lose myself in. Working on this has been the highlight of my day and I'm excited to say that it'll almost certainly be done on time in a rudimentary state at the very least. I'll definitely continue working on it after the challenge as well whether I finish on time or not.

I do have a question though:  Is it acceptable to present it as source code with compilation instructions? I want to make .deb and .rpm packages out of it but I've never tried that before and doubt I'll have time to learn. The only dependency it has is ncurses. I could use some advice from the seasoned developers on how to distribute my game so that it's valid for submission.


There have been problems in the past with releasing only source code, since the judges have had mixed success with compilation. An executable for windows will cover most of the judges though.

You could submit it within the time frame as source with compile instructions, then spend a few days after the jam finishes to create the packages you want. It's completely acceptable to spend time after the close for things like that. But people will want to play the game, and the first couple weeks after the jam will have the most traffic, so you'd want something playable by non-developers at that point.

(2 edits)

Day 5: 

Video highlighting the new Item System (skip to 3:20 if you just want to see the fire scroll):

Progress goes slower than I had hoped. It is possible I won't finish in time, and even if I do the game will probably not be easy to play. You may be expected to compile it yourself. But if I have time on the last day I'll dedicate it all to finding an easier method of distribution. That's 100% on me for not coming into this with any experience distributing C code. 

That aside today was productive (and not yet done, although this seemed like a good time to take a break and post about it). The rudimentary item system is in play and works for both the overmap and the combat sequence. The few items in the game are:

Potion of Healing: Heals the entire party by 25% of their total HP. Can heal past max HP so that there's never a reason to not use it. I thought about capping it but that would discourage use when only one or two members are hurt.

Potion of Buff Damage: +50 Damage for 10 turns (all turns, so 2-ish full combat rounds). This is a huge buff which is why it doesn't last very long. Potions of healing are semi-rare but all the other items are much rarer.

Potion of Buff Defense: +50 Damage Reduction for 10 turns. 

Scroll of Mapping: Reveals all the encounters on the map and also the exit tile. If I implement an FOV system (doubtful but may happen) then it will also reveal the unseen terrain.

Scroll of Teleport: If used in combat it ends the encounter as though the party had fled successfully. If used outside of combat it teleports the player to a random tile on the current level. I will probably change this later so that it teleports the player closer to the exit.

Scroll of Fire: My personal favorite thing I've done so far. Used only in combat, this does 10-30 damage to each enemy and comes with a nifty timed animation. My goal is to add little animations like this for every combat action from healing to potions to basic attacks but so far this is the only one. It may be the only one I get done before the end of the challenge.

The Last Two Days: I am going to refine this concept after the 7DRL challenge whether I finish a playable build on time or not. However for this to be "done" enough for me to consider submitting as a playable build I need to work out the following features:

Town and Shops: The player is supposed to be able to retreat to the town every so often to buy stuff and replace dead party members. I have not even begun work on this aspect of the game.

Leveling and Experience: The ground-work is laid for this system but that's all. It needs half a day's refining at least.

End-Game: I need to make the boss on the final level and work out the end game high score list.

Monster Variety: When I wrote the encounter functions I made it so that I could easily add any number of monsters. And I plan to use the whole alphabet. But so far the only one I've coded in is the Emu. I still need to code in the rest of them and fine-tune their stats. 

And that doesn't even take distribution into consideration, which remains an open question. So I may wind up being a victim of excessive scope and not finish in time. Either way I'm having a blast and I hope you guys get a kick out of it whether I release it in time or down the road.

Midnight Update: I wrapped up the exp and level systems and laid out a plan for doing the monsters tomorrow. Each level of the dungeon will be much harder than the previous one and, as the name of the game implies,  grinding will be required (Dragon Warrior and grindy JRPGs like it are my favorite games aside from Roguelikes). Game over happens when all your party members die. At any point the player can retreat to the town to buy new gear or replace lost party members... and when they do so the denizens of the deep will reclaim the ground they lost. As of right now victory will be achieved when a MacGuffin is secured from the 5th level but I will also probably throw in a super hard boss fight.

I have 10 monster types planned for tomorrow but will add up to 26 total if I have time. Some will drain stats, some will have a rare chance to insta-kill, some will get initiative bonuses or penalties, and some will use magic that hits everybody and looks cool with a snazzy animation. If I can get all that in tomorrow and then do the town and gane over/high score stuff on Friday then I think I'll be in good shape. No matter how it turns out I'm definitely going to make something bigger out of this after the challenge.

Day 6:

I'm starting to feel the time crunch. This concept will make a fine game when I have weeks or months to polish it and balance it but the playable build I'll be submitting on Saturday is not going to be that. On the up-side it will be playable! I'm caught up enough to say with confidence that I should have something worth playing, even if it has to be compiled from source code. But I'm definitely going to spend the next several months turning this into something much bigger. I've had so much fun with this concept and it's going to be awesome. Thanks to the organizers of this event for giving me a reason to make it!

Today I added a variety of monsters to the dungeon. There are 5 dungeon levels and each level has 2 monster types. The jump in difficulty for each dungeon level is such that you'll need to go back to town and grind multiple times before you are comfortable on, say, level 3. Although 1 to 2 may be feasible without retreating back to town. The monster stats need literally weeks of testing to balance out so what I have here errs on the side of grindyness. This is a game for grinders. The dungeon levels are as follows:

Level 1: This level is inhabited by simple Goblins and their War Emus. Both enemies are simple melee attackers with no special abilities.

Level 2: This level is inhabited by an organized gang of Bandits and Archers. The Bandit is like a stronger goblin, and the Archer is like a Bandit with a stronger attack and weaker defense. 

Level 3: This level is inhabited by brutal Ogres and a cabal of evil Mages. The Ogres are a powerful melee opponent (think Stronger Bandits) and the Mages are like stronger archers with a twist: They have a chance to cast an Ice Spell that does significant damage to all players. I made a nifty animation for the spell that is similar to the one I made for the Fire Scroll.

Level 4: This level is inhabited by the diabolical Undead and the even worse Wights. The Undead are an even stronger melee opponent than Ogres but the Wights are different: The wights have low stats and can be killed quickly if you target them but if they land a hit there's a chance they will permanently drain Damage or Defense from a random player. They are my game's homage to the Rust Monster or the Aquator.

Level 5: This level is inhabited by small but evil dragons called Drakes. They do massive damage and have very high stats in all categories. There is a chance they will breath fire on all of the players and do massive damage to everyone. I made an animation for this that is basically the Fire Scroll animation in reverse. The other denizen of this level of the dungeon is the nefarious Lich. They are stronger than the Wight but still a weaker opponent that can be killed quickly if focused on... but there is a very small chance they will case a deathly curse on a random player, who may die instantly! 

In future version of the game I intend to add many more monsters but I feel this was enough for this build. 

Also: I somehow introduced a weird bug with my potion of buff defense where it prevents the enemies from taking their turns in the right order. I spent a lot of time today trying to track it down but to no avail. It's truly a mystery bug. I have decided to roll with it and make it into a POTION OF HASTE that not only increases your defense but also makes the players take more turns than the monsters, so that the name of the potion reflects what the bug actually makes it do. This is the first time I've had a bug I couldn't track down and it makes it clear that I should be using a debugger for projects like this. But, in a pinch, renaming the potion to reflect what it actually does will do instead. I will also adjust the rarity of the drop so that its drop chance is in line with its new-found power. 

Still to do: 

Town: Tomorrow's big task is the town sequence. The player will frequently retreat to town to resupply, buy gear upgrades (which multiply their natural defense and damage stats but cost big bucks), and replace dead party members (free but they start at level 1, so the cost is the time spent grinding them into usefulness). 

End-Game: I need to add the MacGuffin (and possibly a boss) to the final level.

High Score List: I want to create a persistent high score list. If I don't have time for this I'll at least make a thorough end-game stats blurb that lists all the monsters killed, gold collected, etc.

Distribution: I've still got no better idea than to release the source code with compilation instructions. Someone over on r/roguelikedev suggested some other options but it's a low priority for me. Down the road though I will learn how to distribute it in different ways.

No video today! I'll make a big long one for submission day though.

(2 edits)

Well I found a few bugs this morning after playtesting jt for 3 straight playthroughs and I just don't think it's ready for release. It can be played from start to finish and it's pretty fun but:

1. There's  major bug where the turn order in combat gets messed up if your defense is too high. I am closing in on it but haven't fixed it yet and that's a major system.

2. There's a cosmetic bug where buying new gear in town sometimes messes up the graphical display. It has no effect on gameplay but I worked hard on making the town menu look good and that's a bummer.

3. It just needs more playtesting to get the balance right.

4. I'd like to do something better for distribution than just releasing source code.

So no 7DRL for me this year. I'll keep at it and release it when it's done and even if it's a 20DRL or a 30DRL I'll be proud of it but I'll have to wait till next year to do one in 7 days! Good job to everyone who finished. I'll keep posting the occasional update over on r/roguelikedev for sharing saturdays until it's done for sure.

Here's a link to a video of a FULL playthrough of what I've got so far. It's coming together, but it won't be ready in time. Thanks anyway guys and congrats to everyone who finished! I'll definitely be playing and enjoying some of your games. See ya next year.