DirectX 11 Game

This project is a game made for a 3D Games Programming module at university, where students had to program some form of game in a framework and language of their choice. It is a terrain engine programmed in C++/HLSL using the DirectX June 2010 SDK with an added game element on top. My project score the second highest mark in the class (78% overall).

Engine Features

  • Heightmap support – the engine can load in greyscale heightmap images, normalise the data and render them as terrain on screen.
  • Slope based terrain texturing – terrain is textured using one of three .DDS texture files based on the height the polygon renders at. The values are managed in a shader file which can be adjusted to output the desired effect.
  • Quad tree optimisation – in order to support larger heightmaps, quad tree optimisation is used to store terrain information in multiple vertex buffers rather than one. This has a few advantages – it speeds up the engine, allows data that is not being rendered to be culled (using frustum culling) and functions as a way to check the height of polygons.
  • World lighting – the engine can calculate normals for the terrain so that world lighting can be used.
  • Multiple camera support – currently there is a player camera and a top-down camera in the engine, though the engine was designed for more to be added easily.
  • Sky dome and clouds – to add to the engine’s realism, a skydome and perturbed clouds were added using alpha blending.
  • .obj model support – the engine can load in .obj and .txt model files which can be textured and stored in a model list.
  • .wav audio support – .wav files can be loaded in a played both one-time or as a loop.
  • HUD – the engine can load a minimap texture and work out the player’s location on the map, as well as display text on the screen.

The game

The game is a basic ‘find the spheres’ concept, where the player has to locate 13 spheres in the game world before the score runs out. The locations of the spheres are randomly placed around the game world prior to the game start (they can’t be generated in the terrain) and the player must use the two cameras and minimap to work out where they are. While basic, the game is more challenging due to the sensitive camera and the all-keyboard control system.

Controls:

W, S, A, D to move
Up/down arrow keys to move camera up and down
Left/right arrow keys to turn the camera left and right
PageUp/PageDown to rotate the camera up and down
C to change camera
F (hold) to view minimap
Q to see debug information

Improvements

I aim to continue working on this game in my spare time, adding in features such as:

  • Collisions on game over
  • A start screen
  • Ability to reset the game
  • Local highscores written to text file
  • Multiple levels
  • Minimap improvements – e.g. models displaying on map, minimaps changing to match level

Project Type

  • University

Status

  • Completed