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:
- If there is space, place a new room.
- Choose a random wall of a random room, or the end wall of a corridor.
- Attempt to build either a new room or a new corridor outwards from that wall, if there is space.
- 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.
- 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!