Tower Defense

Overview

A tower defense game. Written in C++, using Direct X9. I chose 9 for wide compatibility with Windows machines. The project was divided into a series of subprojects, all compiling together into a master "Application" project. These were Application, Game and Graphics.

Application contained all the platform specific handshaking to get a Windows application window and prepare it for the game and renderer. It also watched and recorded mouse/keyboard input for use by the game and maintained 60fps frame rate.

Graphics contained all the rendering logic for the game. It was implemented via DirectX, but game code accessed it through an interface, meaning it could be rewritten using OpenGL and the game code would not need to be modified. The renderer featured a texture loader and a text display. Text display function converted an ASCII encoded string into a sequence of texture offsets, then rendered a series of quads using those offsets to display the message.

Game contained all the Tower defense code. Having the code abstracted away from the specifics of the renderer and platform meant that the game could be ported more easily to other platforms, as rewriting definitions in graphics etc. would have no effect on the game code. The most difficult part of this code was writing an implementation of A* pathfinding and deciding how to manage when/how AI could request new paths.

[More information coming]