Submitted by , posted on 08 December 2002
Image Description, by
Since December last year I've been busy working on a solo project to create
an updated version of the Lords of Midnight game. This started with the
goal of learning how to code using Open GL, but things have gone extremely
well and moved on to a full-blown game development project (called Legends
from the Lost Realms, or Legends for short).
For those who don't know, Lords of Midnight was a game originally available
on the ZX Spectrum in the 1980s. It was a turn-based strategy game set in
the snow-covered fantasy world of Midnight, with the player controlling a
series of lords and their armies in the war against the evil Lord Doomdark.
The game was viewed in full 3D with armies and castles being hidden behind
mountains and forests.
There's still some way to go yet, but progress has been good (especially
considering this is something squeezed in between the day job and normal
family life). Features already in place include,
THE TERRAIN ENGINE: I've implemented the terrain engine using multi-pass
texturing with no level of detail processing. However, as the camera angle
is fixed to ground level) I've been able to introduce 2D culling to avoid
drawing anything out of view. Trees in the landscape are drawn using
billboarding, with only one billboard used per tree, this rotating as the
viewing angle changes. While this would probably look funny in a first
person shooter, it seems to work fine here. In addition only using one
billboard per tree means that I can draw more trees without effecting
Other objects (castles, villages, windmills, bridges, etc) are created in a
3D graphics package, exported as ASC files and then converted into the
homemade file format used by the terrain engine. I've used a 'Lego'
technique were a number of basic building blocks (such as towers, wall
sections, gates, etc) are created and then combined to create each
settlement in the game. The terrain data is held in a bitmap file, the red
channel being the height map, the green channel holding object information
(indicating if a tree or building is found at each location), while the
blue channel is used as an index to the list of place names used in each
In addition I've implemented a simple climate system that changes the
skybox texture, alters fog levels and changes lighting fro day to day. Has
a big impact on visibility and therefore on gameplay.
Everything is unoptimised at the moment, but optimisation is less important
for this type of strategy game than it is for a first person shooter.
EVENT HANDLING: Right from the start I wanted to include some kind of
scripting system to help control the AI and allow scenarios to evolve as
they were played. Initially I planned to integrate an existing scripting
language into the game, but after working out what I needed this seemed to
be a bit of overkill. Instead I coded my own event handling system where
each event is made up of linked lists of triggers and responses. If all
the trigger conditions are true then all the responses to these triggers
are carried out. Triggers can include characters in the game moving to a
particular location, castles being attacked, etc, while responses can
include changes in game data (characters switching sides for example), cut
scenes and changes in the AI. It is even possible to enable and disable
other events allowing for surprisingly rich scripting possibilities.
AI SCRIPTING: In parallel with the event handling system I have implemented
an AI scripting system controlling the variety of characters in the game.
At this stage the AI can hunt characters or follow a series of waypoints
across the map. Events can trigger the loading of new AI scripts during
the game to respond to the player's actions (so that for example the
computer can switch from an offensive to defensive strategy if the player
is on the attack). Further refinements are planned, but for initial
testing the existing system seems to already be working well.
THE USER INTERFACE: As someone who spent years researching user interface
design I thought I better mention this aspect of the game. As much as
possible I have tried to make the user interface as customisable as
possible. Several resolutions are supported (nothing new there!), all
keyboard controls are completely re-definable, icons used in the game can
always be available in the game, never visible (if the player uses the
keyboard exclusively) or fade in and out as required. In addition the game
has multilingual support, with English and French versions already
incorporated into the same code (it would have been easier to do completely
independent versions for each language, but less fun).
Things to come include multiplayer support with play by e-mail and hotseat
games possible. A lot of placeholder art needs to be replaced and I need
to work on the 3D objects used (a lot of them are best described as
programmer art and at the moment there is a lack of variety in the objects
To quickly describe the screen shots ...
TOP: The Legends Engine in all its glory. Things need to be polished a bit
(particularly the icons), but the basics are finished.
MIDDLE LEFT: Two images showing the different texture sets already defined
(the default 'Scottish Highlands' set and an ice and snow texture set used
to recreate the look from Lords of Midnight).
MIDDLE RIGHT: One of the larger settlements in the test scenario. I'm
currently using the same (small) set of 3D objects for all settlements, but
eventually there will be several different sets available making it
possible to have different architectural styles available for different
races or factions.
BOTTOM: An image showing a number of armies converging on the player.
Characters and armies are displayed using billboards (just like the trees).
Armies are made up of different subimages to indicate the different units
in each army (unfortunately all the armies shown in this image had the same
composition - I was testing the battle handling algorithm at the time I
grabbed the image).
Hope you like the images - if you're interested you can see more screen
shots on my web site or you can send me an
e-mail at firstname.lastname@example.org. Sorry there isn't a demo available at the
moment - I've just finished a big series of alpha tests and there are a few
bugs to squash before a beta version can be prepared.
Looking forward to you comments and suggestions,