For my programming exam, I was tasked to create a stealth game within the time limit of 24 hours. We could interpret the brief (see below) however we desired, so I decided to create a multi-leveled game featuring some sort of story line.
Create a stealth based computer game.
This game must involve a character starting from a start position at one end of the level or screen and then moving towards a destination point at the other end.
Main Game Conditions
Mandatory conditions that the game must demonstrate:
- There must be obstacles in the way of the character, and there must be at least 3 moving guard characters within the level for the character to avoid.
- If the guard characters spots the hero character, they should give chase and fire projectile weapons at the character.
- If the character is hit once by a projectile, or a guard (touch damage), the character dies and must start again.
- There must be a function within the game so that, if the hero character remains “out of sight” for enough time, the guard will stop chasing and return to patrol.
You are free to interpret this brief, in any way you choose, so long as the above conditions are met completely.
Eventually, I decided that the player character should act as an assassin, entering the mansion of his target in order to take him out. The game proceeds to take the player through each level, moving from floor to floor in order to find the target, then escape.
The levels are as follows:
Level 1 – Outer Garden – A basic level with 3 guards moving around. The player simply dodges them and reaches the end level blob.
Level 2 – Inner Garden – A more complex level where a rock is blocking the player’s path. The player must instead dodge past a guard and use a secret passage over the gate to get out.
Level 3 – Ground Floor – A simple level that is much more linear than the first two, this one teaches the player to dodge around a single guard that roams the corridors.
Level 4 – First Floor – A more complicated linear level where the player has to wait for the perfect moment to get past the guard.
Level 5 – Second Floor – Another linear level, this time filled with guards. The player must make use of the dodge function in order to dodge past and outrun the guards.
Level 6 – Third Floor – If the player dies in this level, the game ends. The player runs to the centre of a room where the target waits. He traps the player and creates a turret that spins. The player must search the edges around the room to find one that leads to the end of the level.
Level 7 – Upper Roof – Open area filled with three turrets that the player has to run past.
Level 8 – Lower Roof – A mixture of other levels, the player must choose a path and dodge round the guards and central turret to find the exit.
Level 9 – Back Garden – A maze patrolled by one guard. The player must find the right route by hiding in the guard’s blind spot.
Level 10 – End Game – The end of the game, congratulating the player for getting through it and featuring a restart button. This level tells the player their average number of deaths per level.
The guard’s are very slightly slower than the player, but their bullets are faster, so it is in the player’s best interest to avoid all the guards and not be seen until absolutely necessary. The turrets rotate and fire bullets, the particle effects creating what looks similar to a flamethrower. The guards randomly choose patrol points and move to them, giving the game a degree of randomness. On the other hand, this can lead to glitches where guards block each other from their patrol points and end up in a scrum.
The player has the ability to dodge, though this is simply launching the player in whichever direction they are facing. This can be used to get away from a chasing guard or quickly moving past them while their backs are turned.
To build each level, I used basic meshes from Unreal and textured them with the in engine textures, though the grass and hedge were specially downloaded. To pass the number of deaths between levels, I turned them into an array and placed them into a Game Instance that is then accessed at the start of Level 10.