The purpose of this demo is to show off the dungeon generation that makes use of dynamic and static light sources and custom dungeon prefabs. You can download the binaries at codeplex.
For this release I improved the room and door placement as well as adding the dungeon prefab functionality. I still have situations where the dungeon generator creates unreachable areas. This is due to the way rooms are placed resulting in certain corridors being cut off. I tried to remedy this by
always adding a door to a deadend with a corridor on the opposite side. Its not perfect yet, but I’m happy with 90% of the results.
I haven’t thought of placing lights in a procedural manner and as a shortcut I make use of the prefabs to get them into the dungeons.
The lighting has been adjusted to allow for proper alpha blending of the light values (before I just used an additive blending which resulted in mostly white lights). There is still the problem of tiles being lit by lights from behind walls. I hope to correct this in a future release.
I am still undecided as to whether lights within the dungeon actually add any value.
Enjoy, and as always comments and feedback are welcome.
This application was developed using .NET 3.5 and is written in C#. I use SDL.NET which runs on top of the Tao.NET framework. Input is handled using SDL and rendering via OpenGL. I use DevIL to do image loading etc.
I have only tested this on Windows XP. And you will need .NET 3.5 to run the application. I have added the SDL dependencies to this release.
I am struggling with getting the application working on OpenSUSE. The error has something todo with DevIL. If anyone is willing to assist. You will need to install Mono 1.9 and SDL.NET. To run the application on mono you will have to use the following script ‘mono RogueLib.Game.exe’
I have noticed some rendering issues on my Radeon X1900. Could be driver related. Works fine on all NVidia machines I’ve tested. I didn’t expect to have any issues using OpenGl but I do.
Use the direction keypad or numeric keys to navigate the map.
Use spacebar to create a new dungeon.
Use escape to end the demo.
Custom Dungeon Prefabs:
The dungeonprefabs.xml file in the config directory is used to configure custom dungeon prefab rooms.
The layout tag uses a CSV layout to describe the structure. Use 0 for a NULL tile, 1 for a floor, 2 for a wall and 3 for a closed door.
Each dungeon row begins on a new line.
The light sources tag allow you to specify lights within the prefab. You can customize the light colour, radius and the attenuation function. The attenuation parameters are used in the formula 1 / constant + (linear * distance) + (quadratic * distance * distance).
The connectors tags tell the dungeon generator how to place a prefab within the dungeon. The generator will attempt to connect the prefab to a corridor for each connector specified. I haven’t really tested this algorithm for connectors within the prefab. My examples only have connectors on the edges of the prefab.
The prefabs will be placed over any existing dungeon structures. At the time of placement there should only be corridors and the prefabs will be placed adjacent to any corridors.