Have a question about Dig Deep Dungeons?

Dig Deep Dungeons

The development diary for "Dig Deep Dungeons", a game about being trapped in a dungeon filled with darkness, monsters, traps, and lots of death — and perhaps you'll be joined by some of your friends, who may just end up being your worst enemies.

Reason and Madness

The past few months have been challenging, to say the least. Personal events have caused me to reflect and re-evaluate myself and my projects. Dig suffered from a spot of neglect and a lack of direction, until the last several weeks where I have reworked and rebuilt core pieces of it. Torturing it to death and bringing it back to life like some sadistic necromancer.

There is reason behind the madness, however. One thing that really started bothering me was the server-side code being so tightly twisted up with the front-end code. It meant the game relied on a Rails stack and a database, when it would be faster and more portable to have the browser do all the work. So I forked the front-end code out into a new project and focused on getting the game to a playable state without server-side dependency. It was a big broken mess at first, but eventually it all came together, and the game could run without being shackled to a database. All the dungeon generation is now client-side, and I added support for saving dungeon layouts locally in the browser.

So now if you place a torch on a block, it’ll be there the next time the page loads, along with all the other blocks, and the position of the player avatar will be right where you left it. This also meant it was a heck of a lot easier to build in new features, so now you can dig blocks instead of getting stuck in a corner somewhere with no way to get out. Of course if you dig a block with a torch on it, the torch goes away and you’ll be left in the dark. And if you dig a block near a torch, it’ll stop occluding the light, which is a pretty neat effect.

In honor of Halloween, last week’s efforts were put into adding skeletons (well, one skeleton anyway) to the game. The skeleton will spawn in a dark area of the map and wander around until it sees the player avatar, at which point it’ll move toward the player avatar. For now the skeleton doesn’t attack, but that will be my next task.

Mobile support is likely broken, and the stairs don’t work anymore, but give it a go at http://digdeepdungeons.herokuapp.com/.

Arrow keys to move. Move into a block to dig. Press x or spacebar to place a torch. If you get stuck or just want to build a new dungeon, click the RESET button.

There are definitely some bugs. There’s some weirdness with the lights and some areas remain dark that should be lit when blocks are dug out. Also there’s an issue with Chrome where the darkness disappears when a block gets dug. Firefox and Safari seem ok, though. YMMV!

iPhone/iPad Support! Broken Stuff!

So I broke everything. Well not everything, but I did break a lot of things in the process of performing major surgery to improve support for mobile devices. Playability on mobile has been one of my goals with DDD but I have neglected to make it a priority. Until a couple of weeks ago when I decided to focus on getting the game running on iOS, specifically my old iPhone 3g.

Not an easy task, unfortunately. I made a lot of wrong turns getting things to work without the frame-rate dropping to unplayable, but ultimately got DDD working. Sadly, the demos had to be sacrificed. It didn’t seem worth the effort to retro-fit the codebase to prop them up again. Better to spend my time working on the actual game rather than keep the demos running.

Goodbye, demos. You served us well.

So the AWESOME here is you can play (I’m using that verb loosely) DDD on an iPhone (even the 3g) or iPad (and probably iPod Touch). May even work on some Android devices, but I haven’t gotten around to testing those yet (let me know if you try it). The UI needs love and the controls I implemented are complete garbage, but it all works.

I even optimized it to work as a “web app”, meaning if you load it up in mobile Safari and use the “Add To Home Screen” feature it’ll get a nice icon and start-up image.

Visit digdeepdungeons.herokuapp.com on your mobile device and check it out!

It smells a bit gamey in here.

I’m not building any more demos, at least for now.

And this is a good thing.

I started working on a new demo, adding a player character, keyboard movement, and tweaking a bunch of back-end code. Feature creep began to settle in (mostly in the underlying codebase but I’ll blog about that later), and my goals began to diverge and run off into the forest. But as I wrangled things back together I realized that the time for building little demonstrations of features and functionality was over.

I had something that smelled like a game. Like the game I wanted to make. “Playability” manifested. It was barely there, but it was there. I was super psyched. So I pushed a little further, and now I have something that admittedly looks like a demo, but finally has the capability of growing into a proper game, given a little discipline and five servings per day of fruits and vegetables. And love, lots of it.

I’m still working on wiring up the player sign-ups, so dungeons can actually be saved, but for now you can move a player character around and hang torches on the walls. I’ve only made one basic player character for now, but over time I’ll make more pieces and chuck them into a random character generator (I think). He looks like this:

 Play the pre-alpha-ish game thing here.

Heart of Darkness

Before now, I have only shown the progress of Dig Deep Dungeons in a fully-illuminated world, but one of the core principles at the heart of the game is darkness. The darkness is the unexplored world, the unknown chaos from which monsters are born, and the primary antagonist threatening the player’s character. Thus, sources of light become critical to survival and progress. Any action to be performed by a player’s character requires some amount of light. Light is also a finite resource in a number of aspects: light sources have a limited lifespan and burn out after a period of time, the light emitted from a source has a limited range which diminishes as the source burns, and the sources themselves must be purchased or constructed by the player’s character.

Building the lighting engine has proven to be a significant challenge, requiring more than a couple of refactoring passes and numerous tweaks. I thought I had everything pretty well nailed down last weekend, but while I was constructing a demo to show off the lighting engine I stumbled across a show-stopping bug (and then another and another). This is one of the reasons why I have committed myself to producing these demos — to give these things a good run-through before the code turns into spaghetti and becomes a nightmare to debug or change.

So after some serious rewiring and clean-up I can finally share with you this humble lighting demo.

“Now with 100% more stairs!”

Going down&

In the classic dungeon model, descending a staircase generally means getting closer to the goal (treasure, boss, relic, etc.) and also increasing the difficulty of the obstacles (traps, terrain, monsters, etc.). The vertical dimension of a dungeon denotes progress. While to a great extent the concepts of a goal and progress towards that goal are designed to be left up to the player in Dig Deep Dungeons, I wanted each player’s dungeon to have an apparent classic structure where descending deeper equates making progress (of a kind). The dungeon is supposed to be “deep”, after all. So the mechanism by which the player moves vertically is by a set of randomly placed stairs on each floor, one ascending (with the exception of the first floor) and one descending.

I put together a demo showing this here.

If you’re following along, this is a small step away from the previous demo, but what is interesting to me is while adding the stairs and linking the floors together is a relatively simple operation, it is creating a significant change to the model of the world by adding the concept of the unknown. An isolated floor indicates a complete and contained space, but adding a single descending staircase exposes the possibility of something unexplored which lies beyond, a void which the imagination fills with potential. It creates a feeling of depth without literally adding depth (the literal depth gets added when the player descends).

In the current design, you can play Dig Deep Dungeons without ever leaving the first floor — you could never descend, but would you?

Super Awesome Dungeon Floor Generator Demo!

Over the past year I worked here and there on this game, but up until now I didn’t focus on making much of anything for other people to look at. I put some work-in-progress posts on Forrst, but I made the mistake of not really trying to make something indicative of the “final product” (or at least how I imagine the final product to be). So I decided to kick off the new year with a real, honest-to-goodness demo. Something simple, but indicative. A foundation upon which something great may be built…

Behold! For your amusement and enjoyment (hopefully), the Super Awesome Dungeon Floor Generator Demo!

In case you want to know more about the development of the algorithm behind the generator, I invite you to peruse this post and this post.