Knight in Hell game


Short description:

The game is done in C++ using OpenGL. It was done as part of the coursework where I had to create a first person or third person game from a very simple 3d engine.

As the title suggests is about a skirmish game about a knight who got stranded in a nightmare (or a horrible reality) his only chance to get any answers is to go through the legions of evil demons to get to the portal located in the entrance of a sinister looking pyramid, as you later learn you have to go through 9 levels of increasing difficulty to win. Some of the levels are shown in the video above.

Features implemented:


  • Controls:
WASD, SPACE, Enter and 0 buttons. W - move forwards, S - move backwards, A - turns left, D - turns right, SPACE - jump, Enter - use melee attack and 0 - shout a warcry to gain enhanced speed for a period of time
  • Camera:
Camera technique is a basic 3rd person camera which always follows the player. The only problem with it is that if a player gets too close to the pyramid and then turns, the camera will go through it as well.
  • GUI
I implemented a basic Intro screen, which lists the information which is essential for the game.
Simple text based HUD on the top left of the screen that tells the player all the essential information:
Position, speed, warcry effect duration and cooldown, jump cooldown and HP left.
  • Game sounds:
Sound was implemented using FMOD, there is a continuous looped tracks of boiling lava and daemonic sounds. 
There are also a couple of sound effects that are triggered by game events: The splash effect when player dies in lava and a warcry shout which is triggered by player pressing 0 to shout the warcry. (doesn't work when the warcry is on cooldown)
  • Collision detection:
The game uses a bounding sphere collision detection. The melee attacks are only effective if there is a bounding sphere collision and the character that is being attacked (be it player or the enemy) is in the direction of the attack.
  • Height mapping:
The terrain is made using a height mapping technique. One of the image files from game resources contains a greyscale image that is mapped onto the game map and depending on the value of a pixel (from black - 0 to white - 255) that piece of terrain is raised or lowered compared to a base height (grey - 128). This terrain is then textured as burnt rocky ground. (keeping with the theme of a hellish landscape)
Lava is made using another flat surface that cuts through the height mapped plane and is textured with as lava.
  • Lighting:
There are several types of lighting: 
A dim directional light that represents the sunlight that shines from above (or something that is the hell's version of the sun)
And there also are 4 spotlights on each of the map's corners that simulate the glowing effect of the lava and light the scene from beneath as well. By allowing the light to go through the lava plane, but not allowing it to go through the rocky terrain it really gives a good immersive effect of the light source coming from lava itself.
Finally there is a red spotlight directly above the pyramid in the centre that really makes it stand out from the rest of the scene.
  • Special effects:
There are a couple of extra effects i've made. Firstly the fog that is appearing only in the background, to almost completely obscure the edge of the map and the skybox. However some of the skybox can be still seen, which I thought would make it more realistic.
There is also a geyser shooting from a proceduraly randomised position every 12 seconds. Geyser is made using a particle projector that expands with time and then dilutes. The height of the geyser is randomized each time too. It also only appears over the rocky terrain, never over lava.
  • Enemies/AI:
I have 4 npcs, they are similar in a way that they are all demons and use the same class, but they they have unique rarity, health, damage, etc. They are randomly spawned on each level with progressing difficulty (more enemies and more stronger ones). The AI is quite simple they use the large bounding sphere to detect a player and if detected they will follow and attack the player unless he manages to outrun them and exit their detection zone (using warcry).


A full documentation is located here: