Witherwyn Development Log

Adventurers have been claimed by the Blue Screen of Death

Updated: September 6, 2005

Download Most Recent Version

Introduction

Witherwyn is my attempt at creating a roguelike game. Inspired by the disgustingly UNIX-like user interface (that is to say, unusable) of most other roguelikes, this project aims at creating a roguelike with intuitive play. I personally detest any game whose interface gets in the way of playing the game. In this respect, Witherwyn is the spiritual descendent of the popular Castle of the Winds (which I hear is now in the public domain) and Yoda Stories.

State of the Project

Witherwyn is far from complete. In fact, it is not even a playable game at this point. Witherwyn and its source are being released simply as a demo of certain algorithms and data structures used in roguelike games.

Features

Witherwyn is different from other roguelikes in several ways that might make people interested in looking at its source. First of all, it is the first and only roguelike written in C# (though there are others in development, I believe). This means that the design of Witherwyn follows a very object-oriented design, as enforced by the language. This has been a difficult issue for me since my personal background is more in writing procedural C/C++ code. I have looked at the source for other roguelikes in trying to figure out how to approach OOP design in a roguelike, but even those roguelikes written in "OOP languages" like C++ fall back on procedural techniques. In my opinion, an object oriented design is preferrable in any project since it makes extending functionality easier.

Download

When Witherwyn becomes a playable game, I shall create a handy installer for the common man. For now, however, distribution is limited to those who know what they are doing. Witherwyn is a C# program that uses Managed DirectX. Thus you need the .Net framework (1.1 or higher) and the Managed DirectX framework installed on your machine to compile and run Witherwyn. These items can be found on msdn.microsoft.com or by using Google. All available versions listed in the development log section below.

Rec.games.roguelike.development

This usenet group is the hub of roguelike development activity on the web. During those times that I am actively working on Witherwyn, I will often post under the name "shedletsky".

Links

* * *

Development Log

Witherwyn v. 0.02 demonstrates:

  • Simple melee combat, with Player vs. Monster and Monster vs. Monster
  • Rudimentary inventory support
  • More object-oriented map structure
  • Reworked tile and entity management system

Roguelikes are apparently notorious for the number of rewrites their code bases require before one can complete a finished game. I did my first one this week. I decided that my goal of having user-edittable resources was all well and good, but was complicating the process of managing tiles and managing entities (the player, items, monsters, ect...). The key problem is that you can let the user make up new tiles easily, but it's difficult to make the random dungeon generator understand where and when to use them. At some level, this information has to be hard-coded. So I bit the bullet and did that with the new GameData class which replaces the TileSet and TileResolver classes.

Inspiried by looking at the source to IVAN (also known as "Iter Vehemens ad Necem"), I decided that I would be better off if I changed the MapElem struct into a full-fledged object. I did this and moved some of the map logic into the new MapTile object. Most people on rec.games.roguelike.development said this was an unecessarily wasteful way to go. A lot of respondents were UNIX clerics and think that using ten extra kilobytes is a Big Deal. I saw no difference in Witherwyn's memory footprint after the change.

I got some simple melee combat working. The game crashes if you died, though, so try to avoid it. To attack a boogaboo, just run into it. In the future I'm going to add floating number animations above the target of an attack which shows how much damage was taken (like the Blademaster doing a criticial strike in Warcraft III). In the near future, you will be able to equip weapons and armor.

I subclassed Entity into Critter and Item objects. Critters are any Entity that has an inventory (the player and monsters). Items are anything that can be picked up. Inventories hold items. Pressing ALT-I or clicking on the "inventory" menu item will open the inventory window. Eventually the items shown there will have context menus for manipulating them. I'm going to augment the inventory screen with an equipment list so that you can drag and drop items onto your character to equip them.

Download Witherwyn v. 0.02 Source

Witherwyn v. 0.01 demonstrates:

  • A tilemap implemented using Direct3D (with some neat tricks like "free" alphablending)
  • A typical Line of Sight algorithm
  • Serializable XML classes for persisting game data
  • Random dungeon generation
  • Rudimentary game entity (monsters, items, tiles, player, ect) management

This is the first publicly released version of the Witherwyn source. Witherwyn v. 0.01 C# Source