Escape The Apocalypse

Graduation Project (Solo Project)

'Escape The Apocalypse' is a first-person shooter combining elements of PvP (Player versus Player) and PvE (Player versus Enemy). Within this game you and 3 other survivors, the players, battle eachother to get out of a zombie infested city. The objective of the game is to be the first to repair an escape vehicle (car), with which you can leave the city. You gather supplies marked on the map to repair the vehicle. But beware, zombies and opponent players are here to make that objective a lot harder.

With this project I set out to create a playable proof of concept for a multiplayer zombie shooter, within a short period of time, completely built in Unreal Engine 5, with C++ and Blueprints.

Details & Responsibilities

Escape The Apocalypse
Graduation Project HKU
Sep 2022 - Feb 2023
-Creating a multiplayer first-person zombie shooter, with competitive elements.
-Designing a fun and engaging gameplay loop with clear objectives.
-Programming all game systems with design in mind. Creating tools for easy in-engine tweaking.
-Implementing networking capabilities in all relevant game systems, for gamestate synchronization.
-Implementing all Animations, FX and Audio, aswell as creating FP animations for all weapons.
-Utilizing Unreal's Gameplay Framework to save time writing core systems, thus creating more time for iteration and playtesting.

A more in-depth look into the programming of certain aspects in this project can be found below.

Game Mechanics & Programming

Weapon Handling

An important part of this game was the ability to defend yourself from zombies and other foes with different weapons. To implement this feature, and make it easily tweakable, I created a system that utilises a simple data file (data asset/serializable object) with all relevant settings of the weapon. This data file is used by a lot of different systems. The player class uses it to determine how to use it's networked firing code (e.g. is this an automatic or single firing weapon?), whilst the weapons world object (the object the player sees before it picks up the weapon) uses it to determine how much ammo this gun may carry, and which mesh it has.

All Weapon Variables are easily accesible in-engine and can be tweaked on a whim.

This code segment demonstrates how the above mentioned classes/systems implement the data provided by the DataAsset (WeaponData).

Based on delegate functions declared in the PlayerWeaponComponent (See code snippet), a designer or artist can easily add FX in-engine without having to touch any C++ code. Via the provided functions (OnFire/OnSwitchWeapon).

AI Spawning System (Populating the world with zombies)

A constant threat in this game are the zombies roaming through the level. Populating the game with these zombies (AI), is handled by a custom spawning system. As I was designing this system, I took a lot of inspiration of other games that play with a lot of zombies. For example, I studied the AI design document of Left 4 Dead by Valve. Deducing a lot from this system design, I created my own version of a zombie spawning system based on the needs of my game concept.

The spawning system of Escape The Apocalypse is based on the concept of an Active Area Set (AAS). The map/level of the game consists of small areas the players travels through. Whenever the players are in a certain range of these areas. the area gets marked as active by the Spawning Manager, when the player is out of range of this area get marked as inactive. Together the active areas make up the Active Area Set.

The Active Area Set is then used by the SpawnManager and the GameManager to populate the scene with zombies. The zombies will only spawn in this area set, and when they move out of this set (or when the players are too far away) they will be destroyed. When a zombie gets destroyed it will be brought back to a spawning pool, and reinstansiated on a place actually in the Active Area Set.
This makes it so that large levels aren't always full of zombies on places that aren't relevant/visible to the players, which also creates the illusion of a more populated gameworld and saving costly hardware resources.

This Gif demonstrates the Active Area Set (AAS). All green areas are active within the scene, and will actively spawn AI/Zombies. The purple sphere indicates the player range, and any active areas within this sphere will be considered part of the AAS. The red area contains the player, so AI won't spawn here to prevent breaking immersion whilst playing.

These segments demonstrate portions of code with variables that can be tweaked by designers in-engine, and how they are used within the underlying systems to spawn AI.