Tools Used: Unreal Engine 5.4.2
Roles: Game Designer, Level Designer
Base Defence is a prototype project that I undertook to further develop my skills in the Unreal Engine. The player must defend themselves and their base against a horde of enemies as they come in waves. They can push boxes to disrupt the horde, and heal themselves with pick ups.
I undertook this project to continue developing my skills and understanding of the Unreal Engine. I wanted to create a short, compact game where I focused on balanced mechanics and learning the engine. In my last project in Unreal, I had created very basic mechanics with no level design, while this time I wanted to create a real and functional game. My last project can be seen here.
I wanted to keep the level compact to focus on the mechanics. The player has the advantage against the enemy, as I designed the map so they would only be fighting on one front. Enemies will make their way directly towards the beacon.
I decided to funnel the enemies through a grouping of stationary boxes, making the movement route of the enemies less predictable.
I placed smaller movable boxes towards the entrance to provide the player a quick assist. However, these boxes are much smaller and do not provide as much cover. The larger boxes that fully block off enemies are placed away from the entrance. I did this to create a risk-reward scenario, where players can choose to spend time pushing the box over, or stay vigilant at the entrance.
The implemented iteration of the map had some changes and additions. I decided to implement health pickups as well as the movable boxes. To keep the choice between what to focus on, I placed the health pickups against the wall and encourage the risk for the reward.
I had three enemy spawners to stop them from being too predictable.
To avoid monotony, I designed each wave to allow for an ebb and flow difficulty. The first wave would allow the player to get used to the mechanics, while the second would build on their new knowledge. Allowing the player a break, the third wave would be easier. The fourth wave introduced new, faster, harder enemies. The final wave was the hardest, using both new and old enemies.
Enemy Spawning in Waves
The core mechanic of the game was the enemies spawning in controlled waves. Each wave was predetermined with how many enemies and which kind would spawn designed for balanced. The blueprints seen below are within the blueprint for the spawner, wave spawner, and game mode.
The enemies would be spawned at the beginning, with the game noting what wave it is and how many enemies remain to be killed. These variables are displayed in game as they are connected to widgets. After killing the last enemy, the game allows the player to take a quick break to move boxes or refill their health. Once the timer is finished, the next wave of enemies will be spawned. Using a structure and data pool, the game spawns the next wave of enemies.
Attacking & Taking Damage
For attacking, the player or enemy plays a pushing animation and deals damage upon a successful hit of a sphere trace. The player deals more damage than enemies, to stop the player getting overwhelmed.
When taking damage, the health is deducted from the player's max health and the player is knocked back. If the player health is less than or equal to 0, the actor is deleted. For the Beacon, if it's health reaches 0 it is destroyed and the player loses the game.
Enemy AI
The enemies are designed to head straight towards the Beacon. However, if they spot the player they will attack the player. If the player hides, the enemy will redirect back to the Beacon. If the Beacon is destroyed, the enemies begin to patrol the area.
Once the enemy gets to the Beacon they will begin to attack it.
Healing
The player can pick up small health pickups. They add 10 health back to their health.
Pushing Boxes
The player can push boxes slowly to cover areas.
I really enjoyed working on this project. The game was fun for myself to play, and I enjoyed balancing it to be just the right difficulty. Using the blueprint system was intuitive and I enjoyed the challenge of learning new things. In my next project I would like to further iterate on these mechanics and expand to include a weapons system.