Archive for the 'Test-driven Development' Category

Health and Damage

February 4, 2009

To keep combat simple all attacks are successful. The only thing I customize is an actor’s health and damage. My actor class is really simple at the moment and has the bare minimum to implement the original requirements.

    9     public interface IActor
   10     {
   11         /// <summary>
   12         /// The amount of life force
   [...]

The Endgame

January 27, 2009

The game will end if any of the following conditions ever become true

All the monsters are dead
The player is dead

An actor is dead when it’s life has been reduced to zero or less. In order to implement the above I had to give some thought to the game loop and how the player [...]

The speed system

January 22, 2009

My speed system will have the following characteristics:

All actors (who are able) should have at least one turn per game turn.
Faster actors should take their turns before slower actors.
If Bob is twice as fast as Fred then Bob should have two turns per Fred’s one turn.
The game turn ends when all actors have had at [...]

A Circular FOV

March 8, 2008

Introduction
The FOV calculated using the recursive shadow casting algorithm (using the default implementation) forms a square shape around the player. This square FOV allows for an equal viewing distance in all the major directions. Unfortunately I find it a bit ugly and distracting as illustrated in the screen shot below.

The effect is even more [...]

FOV Using Recursive Shadow Casting in c#

February 17, 2008

Introduction
After completing my Dungeon Generation article series I started hacking around some code to walk around on my generated maps. Walking around on a fully visible map is Ok but you immediately realise the need for some kind of way to determine which parts of the map are visible to the player.
This is where field [...]