Dissertation/Applied Research Project

December 10, 2010

My final year Applied Research Project was entitled ‘Investigating a model of place for game AI and evaluating its performance as a method for authoring agent reactions‘. It received an ‘A’ grade.


Applied Research Project (PDF, 1.93 MB)


This project examines whether concepts of place can be usefully applied in game AI, specifically in the context of authoring agent reactions. It reviews current spatial approaches to world representation in games and literature on place from other disciplines. A conceptual model of place for use in game AI is then proposed, influenced by the theories of implacement and affordances. A place agnostic test case is presented, together with an analysis of two parallel implementations of it; a control implementation and an implementation derived from the proposed model of place. The implementations are then analyzed in objective terms, revealing that the place-based implementation performs worse but supports authoring better. The recommendation of this report is to use place-based representations judiciously, bearing in mind their additional overheads as well as their authoring benefits.

Critical Evaluation (abridged)

I am generally satisfied with the outcome of this project although I would have preferred (if time had allowed) to employ a more thorough methodology. As it was, I felt that the scope of the project was too limited, given the scope of the topic. I am pleased that a model of place was synthesized, but disappointed that the scope of the project prevented me from exercising it fully. If I could do it again I would focus more on layering behaviours rather than agent reactions.

There are many sources of information on concepts of place, across a wide range of disciplines, and their study has been very interesting. One point of difficulty was the high level of noise to signal found in the more philosophical writings, which might make this material inaccessible to game AI practitioners. In this respect I feel the industry could benefit from more literature reviews and summaries of thought in this area, and perhaps more multidisciplinary collaboration in the study of place. I am pleased with the literature review section of the project, which I feel provides a useful summary of thought in this area in fields which might not usually be considered by game AI practitioners.

There is definitely a movement in the game AI field towards more complex, semantic representations of spaces (driven, I believe, by the increasing complexity of agent behaviour) and concepts of place have been proposed as the way to achieve this. From my experiences throughout this project, I tend to agree. Implacement is the foundation of our experience of the world around us, and games have always striven to create the feeling of implacement in virtual environments. As graphics technology improves, virtual worlds have become more and more realistic, yet virtual agents often appear to behave unnaturally; unbelievably. I suspect that the reason this is so jarring to a human observer is because it makes it apparent that the agent itself is not implaced in its environment, a similar phenomenon to the ‘uncanny valley’ in robotics (Mori, 1970). I believe that applying concepts of place to agent architectures, for the purpose of implacing agents in their environments, is the most natural approach to overcoming this problem.

Overall I have found this to be a very worthwhile project. I feel well placed to apply the knowledge gained during the project to my game programming practice.


Videogame Middleware

November 10, 2010

The final year Videogame Middleware module comprised two distinct phases. Firstly, the design and implementation of a middleware component. Secondly, putting together a short Gamebryo game experience leveraging as many middleware components as possible.

Through this process I was able to gain insight into the challenges facing both middleware providers and integrators.

Build Phase

I chose to design and implement an input abstraction layer called HInput. The primary purpose of HInput is to decouple game/application code from specific input implementations. For example, rather than checking whether a gamepad button is down, or a key was pressed, we just query whether a named input was satisfied without needing to know how exactly it was implemented. This extra layer of abstraction gives us the flexibility to:

  1. Change input schemes without code changes or recompilation.
  2. Dynamically switch between input schemes at runtime (e.g. we might choose to load a new scheme if we detect that a gamepad was connected). We can mix and match schemes, and different player can use different schemes. All this is completely transparent to the game code.
  3. Using input metadata, it is possible to allow dynamic configuration of the system at runtime (which is how the HInput Editor works).

HInput also has various layers of complexity in its interface:

  1. The simplest way of interacting with the system is through the Editor application (written in C#).
  2. The InputManager singleton [HInput::GetManager()] provides everything you need to use an input configuration to provide input to your game.
  3. Advanced users can write custom Inputs, InputDeviceServices, and plugins that can be loaded dynamically at runtime, as well as custom GUIs using the InputMetaData stored in the system.

Full source code and compiled distributions of HInput, complete with documentation, example projects and editor application and plugins for keyboard and gamepad are available from Sourceforge. For an overview of the system, please read Getting Started with HInput.

Leverage Phase

In the leverage phase I chose to build a tongue-in-cheek action RPG style demo based on the Gamebryo ‘Kinslayer’ sanple, called ‘Kinslayer-Ville’.

Conversations are all voiced at runtime using Microsoft SAPI. There is also voice recognition to choose conversation options. The Environmentz day/night cycle skydome is supplemented by CIELO clouds. Inventory is with Happy Sacks. LibCT provides the conversations and QuickQuest provides the quest log. Input is through my own HInput input abstraction layer. The opening cinematic is powered by Cinesigner, while FMOD Ex provides 3D positional sound.

Simple SAPI – Text to Speech and Speech Recognition

May 18, 2010

This is a simple C++ integration of basic Text to Speech (TTS) and Speech Recognition (SR) features provided by the Microsoft Speech API 5.3. The SAPI itself if a very good and full featured API, but a little arcane for first time users. This code is intended to be an easy way to get basic functionality without much effort.

It provides a basic interface for TTS, and a dynamic ‘command and control’ grammar for SR (as opposed to the ‘dictation’ grammar which is easier to get working but fairly useless for games). You can specify a word or phrase at runtime and this code will create a grammar rule to listen for it.

The download includes source code and a sample Visual Studio 2008 project.

Download Source (9KB)

Search for a Star

March 17, 2010

This was my entry for Round 2 of the ‘Search for a Star‘ competition run by Aardvark Swift with Develop and Relentless. Of 150 people who entered I was one of 5 finalists who progressed to Round 3 (a panel interview), ultimately winning third place in the competition.

Develop Magazine, June 2010, p. 64

Develop Magazine, June 2010, p. 64



Key Improvements

  • Fixed numerous deliberate bugs including buffer overruns.
  • General graphical improvements.
  • Gameplay improvements (enemy behaviour, player control, scoring).
  • Implemented support for DirectInput and XInput. Gamepad allows analogue control of rotation and thrust.
  • Implemented a gun base class and three guns; machine gun, bomb (falls under gravity) and splitter gun. Machine gun is weak but fast, splitter is devastating at mid range but not so good at short or long range, bomb will take out anything it touches but is hard to use.
  • Used XAudio2 (encapsulated in a singleton manager) to implement music and sfx. Base game state automatically changes music. Each gun has a firing sfx and there is an explosion sound for enemy/player destruction. There is also an engine noise which changes pitch and volume with the throttle (right trigger on gamepad). There is a built in interpolation so that it works with the digital keyboard input too.
  • Implemented 3 different types of enemies, with differing sizes, colors and health.


Download executable (7.8MB)

AI Demo

January 7, 2010

This app (in C++ using GDI+ for the graphics) demonstrates some key game AI techniques, including:

  • Finite state machines
  • Steering (seek, flee, path follow)
  • A* graph search for pathfinding
  • Goal Oriented Action Planning, using the same A* graph search code used for pathfinding

The work was graded A- with these comments from marking tutor (and noted game AI practitioner) Adam Russell:

Highly challenging extension topic (planning). Great documentation, with UML diagrams and discussion of reference texts. Full coverage of requirements, in a manager showing great evidence of orthogonality, abstraction and asynchronicity. Steering is solid…, pathfinding is really the highlight though as an abstract graph search powers both GOAP plans and an asynchronous pathfinder! Very very nice.


Executable demo –  AIDemo.zip (47.4KB)

Advanced 3D Graphics

January 7, 2010

A final year assignment at university consisting of three mini-projects: shader techniques, character animation and large scene rendering.

The Brett Butcher Prize for Outstanding Contribution to Graphics

December 9, 2009

Recently, the University of Derby awarded me The Brett Butcher Prize for Outstanding Contribution to Graphics, which was a lovely surprise.

Dead Space: Extraction

September 25, 2009

I spent my placement year (2008 to 2009) working at Eurocom as a member of the game programming team on AAA title Dead Space: Extraction, the Wii exclusive prequel to Dead Space.

I was responsible for designing and implementing the weapon system (including stasis and kinesis), dynamic (‘fear’ based) music management system, data-driven player control schemes and one of the minor bosses, as well as other game programming tasks. I programmed in C++ within a mature codebase.

My lead programmer was kind enough to write me this LinkedIn recommendation:

“Henry joined my programming team as a placement student at the start of our one year project, and returned to university after the project had completed, giving him the experience of a full project life cycle. Henry integrated with the team fantastically, and very rapidly became an invaluable member of the programming team. Henry has an excellent work ethic, he plans his work thoroughly and embraced the code design process we use within the team. The standard of Henry’s code is excellent, and he works extremely quickly and efficiently. I was able to assign very complex systems for Henry to design and implement with confidence. I would not hesitate to recommend Henry to any employer, and was sad to see him leave the team to return to his university course.”

September 1, 2009
Gareth Clarke, Lead Programmer , Eurocom

Other students or junior programmers may find my article about the lessons learned on placement useful.

Published Article on Game Career Guide

May 26, 2009

Today I’m featured on the front page of Gamasutra, with an article I wrote for sister site Game Career Guide about my placement year. Click the pic to visit the article.

Gamasutra front page

Postmortem: Pie-Parazzi

June 30, 2008

Pie-Parazzi was developed over two weeks in June 2008 by Derby Games Studio for BBC Blast. The game design concept was produced by pupils of Swanwick Hall School during a competition organised by our client. We had previously spent three days implementing two prototypes of the strongest candidates in Game Maker.

The prototype phase gave us a good idea of how the games would work in practice. The runner up (by Chellaston School) was a scrolling platformer called ‘Eco Warrior’, in which two teams of two competed against each other above and below ground to collect tokens and powerups. As such it would have been a much easier game to implement, but it was felt that it lacked depth and had not been pitched particularly well. Therefore Swanwick Hall’s ‘Celebrity Game’ was chosen for full development, despite the prototype itself being less polished than its competitor.

The game was to run on a Windows platform, but it would have to be shown and played on the Derby city centre big screen (rather large but also rather low resolution). It had to support four players so we decided that Xbox360 controllers were the way forward rather than crowding the keyboard.

This post-mortem is from my point of view as Project Manager and Programmer.

Read the rest of this entry »

Derby Games Studio and BBC Blast

June 26, 2008

I was employed by Derby Games Studio (a commercial enterprise of the University of Derby) for a short project earlier this month.

The University has issued a press release about the project.

The Project

Tennis Star PoseOur client, BBC Blast, ran a competition for local school children to design and pitch game concepts. The first stage of the project was to develop prototypes of the two best entries using Game Maker, over three days.

Once the prototypes were completed, the winner was selected and their game was developed for a further two weeks.

The finished product was shown on the Derby city centre big screen on 25th June 2008 and will be published via the BBC Blast website, and the studio’s own website.

My Role(s)

I was hired as the Project Manager, reporting to the Studio Manager, Technical Manager and Art Manager. In the prototype phase (3 days) I managed two teams, each consisting of two programmers and one artist. I also wrote some code to support both teams, such as a class to manage an XInput extension and some vector manuipulation functions (dot product, magnitude etc) which were requested by the teams.

In the final phase (2 weeks) my role changed to include more programming, as well as leading the enlarged team and managing the project.

The final product was a great success (described as ‘awesome’ by a number of players) and more importantly the client was very happy.

My contract was also extended to help in providing three game development workshops for young people during the BBC Blast on Tour (Derby) event.

My Credits

Project Manager

Gameplay Video

Additional Info

As well as my own postmortem on the project, one of the other team members has written about the project.

Postmortem: Space Trading Game (C++)

May 23, 2008

This game was produced on a 12 week deadline in a team of four/five programmers (one late addition) in C++ using Emergent’s Gamebryo.

Click for Postmortem…
Read the rest of this entry »

C++ Software Renderer

March 20, 2008


My demo starts by running a scripted demonstration of the various features supported, culminating in a Martian disco! After the script runs, buttons are revealed to allow the demo to be used as a sandbox. 2d and 3d effects can be turned on/off by the user. The user can also choose to run the script again.

The demo features an animated Marvin the Martian, loaded from MD2 format. In addition to rendering the demo features both 3D effects (such as spike, pulse, dissolve and character animation) and 2D image post-processing filter effects (such as gamma correction, brightness, bloom and blur). The effects are implemented as loosely coupled objects which decorate either a game object or a rasterizer.

Update (12 March 2009) – I have now fixed a few problems with the renderer. Specifically:

  • It now interpolates properly between animation keyframes.
  • The orbit camera now works.


ExecutableCPPSoftwareRenderer.zip (1.37MB)
ReadmeReadme.pdf (87KB)

Read the rest of this entry »

C++ Source: Definite Integral Calculation

March 17, 2008

I have recently been doing some research on flight and aerodynamics for a project that’s in the pipeline, in particular how to calculate lift under varying conditions. According to Wikipedia:

“The total Lift force is the integral of vertical pressure forces over the entire wetted surface area of the wing.”

This got me wondering about how to calculate the definite integral of a function programatically, so I wrote this program which aproximates the area under a curve to a given degree of accuracy by breaking the area up into a number of trapezoids.


Source: integral.cpp (3.0 KB)



This post is now [3 July 2008] the most popular on the whole blog. If you find it helpful (or not) please leave a comment. Thanks.

XNA: Extreme Pool

December 17, 2007

This features both standard ‘speed’ pool and an ‘extreme’ version. The standard version is limited to potting balls as quickly as possible.

The extreme version features a ramp in the middle of the table. If the cue ball passes through the pink spot then the balls on the table will shrink or grow for a short time. There is also a random chance of any ball on the table moving on its own while taking a shot.



Win32 executable and source (XNA Framework required – redistributable included)
Pool.zip (3.6MB)