Post news RSS Claustrophobia Development Log #1

Featuring a discussion about the new dungeon generation algorithm, and some screenshots of it in action.

Posted by on

Well hello, and a very happy new year to you all! Welcome to the first in a "hopefully-weekly-ish" series of development posts designed to keep you up to date with Claustrophobia's redesign and recoding process. I've not quite yet decided exactly how these are going to work, so for now, expect my normal design ramblings fleshed out with a few screenshots/graphics here and there. Maybe even a video from time to time. If I miss the deadlines now and again, I apologise, but University work will have to come first. I'll be trying my best to keep everyone up to date.

So firstly, I'll summarise my current plans for Claustrophobia. The original game will remain up for everyone who wishes to play it while I work on the new version. Once I reach a stable early alpha build which I am happy to release, the new version will be made available to all previous and new purchasers as a download alongside the original game. That version will then continue to be updated until I feel happy enough to release it as the main version, at which point original Claustrophobia will take a back seat and have a much deserved rest. Possibly a nice blanket too.

Anyway, that's the plan. On to the actual development status of the new version. Over the last couple of weeks I have worked on the new graphic style (which I am rather pleased with now, and will be showing soon), rebuilt the main terrain generation from the ground up, and begun work on the code for units (player and enemies). These new systems include a number of changes from the original version, including massive improvements on how the dungeon is actually built.

The original system placed rooms randomly in the dungeon until there was no more room, and then attempted to run corridors between all of the rooms until they were all connected. Of course, this resulted in a couple of issues, firstly that every possibly space was then full of half finished corridors, and secondly that some rooms were not connected to anything at all. The new system instead works like this:

  1. If there is space, place a new room.
  2. Choose a random wall of a random room, or the end wall of a corridor.
  3. Attempt to build either a new room or a new corridor outwards from that wall, if there is space.
  4. If a new corridor was placed, continue building the corridor until either another room is dug into, or there is space to place a new room.
  5. Repeat from step 1 until there is not more space.

What this results in is a dungeon layout of rooms and corridors which are all logically connected: All corridors lead somewhere, and all rooms can be reached. This also allows me to lock or trap various rooms without the fear of creating unreachable content. And of course, means less backtracking, and more natural, fluid terrain to explore. I'm also currently working on different shaped rooms.

Here are some examples of the kind of dungeon layouts the new system is generating (doors are currently a brown square, I haven't finished their graphic yet):

Apologies for the resolution of the images, they're obviously too large to fit on screen to screenshot, so quite a bit of image compression has gone on. You get the idea though.

Until next Dev Log!


pos_car - - 91 comments

The flow of the design looks leaps and bounds better. I can't wait to see how everything shapes up!

Reply Good karma Bad karma+2 votes
FlyingShisno - - 96 comments

New dungeon generation feels more 'roguelike-ish' to me. The previous 'endless maze' type generation was getting old quick. I still think there should be an 'occasional' level like that, but I have no idea how hard/easy that would be with you re-doing the code. I won't be missing it. :p

So, what are you going to do with the previous version? Just leave it up for buyers? Maybe you can do it like Desktop Dungeons and offer it as a free prototype.

Reply Good karma Bad karma+2 votes
TheIndieForge Author
TheIndieForge - - 258 comments

Agreed, which is one of the main things I wanted to iron out when I started the new system. I will more than likely make the old version available as a free download - there's a lot to be gained from making the original freely playable.


Reply Good karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.