Dungeon Prefabs are Ready

I always intended to have support for some form of custom rooms in my dungeon generator. The idea is similar to Angband’s vault system, but a lot more generalized. Instead of using custom rooms or prefabs for vault encounters, I wanted to supplement the dungeon generation with custom built rooms or sets of rooms.

These dungeon prefabs required me to implement a file format in XML that would represent the prefab structure. My schema allows me to set up the layout, specify light sources, and connectors.

The function of the connectors tag is to give the dungeon generation algorithm some guidance in placing the prefab within the dungeon. The algorithm will try to place a prefab with each connector located next to a corridor within the dungeon. Locations with no connected connectors are rejected.

The added benefit of the prefab implementation is that I now have serialization for most of my dungeon data. This means that I can easily save a generated dungeon which will be useful for save files in the future.

I hacked the prefab generation into my existing dungeon generation code, but it soon became a mess. This led me to revisit the room and door generation code.

The room and door generation code now has a nice set of unit tests. The algorithms for each are also a bit more purposeful in terms of placing rooms and creating doors in an intelligent manner.

I am not 100% happy with it yet, but its a substantial improvement. I will need to implement some form of maze (or dungeon) solving algorithm to make it smarter.

There are still a few issues with the lighting system, but I want to implement some new functionality before I continue tweaking. It’s really boring running around dungeons without any monsters.

I hope to have a new tech-demo ready for download in the next few days. I am just doing some Linux testing before I upload.

A long overdue progress update

My adventures in getting the code to run on mono have led me to port the rendering portion of my code to OpenGL. Its been quite a journey from planning to use the c# console for output, to using XNA, to SDL.NET and now OpenGL alongside SDL.NET. The thought process was as follows.

Lets make a roguelike using ascii and focus on the actual game and not the graphics.

Damn. c# console support is lacking.

Lets use XNA!!! Wow this is really nice and easy. Lets try and deploy it so that people can play around.


Lets go mono!!! Cross-platform support sounds cool. SDL.NET looks nice. OK working nicely so far, but the rendering is a bit limited. (SDL.NET uses software rendering and I need alpha blending etc.)

Time for OpenGL. Rendering is looking better now and I’m happy with the output.

So that’s where I am now. Got everything working on OpenGL and I’m busy doing some cleanup and making a bit of a engine. Nothing too hectic, just the ability to customize key mappings, textures, and dungeon prefabs.

I hope to have something to show in the near future.