Press to play gameView on GitHub

Introduction: The intention is to provide the player with a balance of survival horror and action horror elements that can lead to the player having both moments of weakness and a strength depending on the encounter. It would appeal to survival horror aficionados who are well versed in games of the genre (“The Evil Within”,”Resident Evil”). It is a game where the player's success relies heavily on their ability to balance their use of consumables items by picking the right moments to use them and conservation of ammunition.

©Capcom

Setting: Outside a Siberian village (snowy mountains, trees and soviet blocks) during a snowstorm meaning low visibility.

Story: A private military company is sent to investigate nuclear reactor outside of village in Siberia has been down for a number of days following a large blast, accompanied by radio silence from the site, it is vital to get it up and running again as the reactor is powering not only the small village but also the surrounding area of towns.

After the mission briefing, the player performs a Halo Jump after which they land on top hill / mountain with their sidearm and they make their way down by performing an abseil down the cliff face. They find a small cabin where they hear noises in the basement. The player is then attracted by the only open door in sight and begins to investigate.The Player will then make their way through the house, possibly finding some of the ammo pickups along the way. They then find a person who appears scared. He tries to attack you and so you fight back without killing him. He then mentions that he thought you were quote “One of those things”, Not knowing what he meant we question further where we find out there is a virus going around ever since the reactor explosion causing people to go crazy. He then tells them that the power plant is just a front for a human research facility that is fusing parts of a “Creature” they’ve captured with humans, leading to the outbreak. Upon telling their handler this information, they are then instructed to destroy the site by using a flaw within the RBMK Reactor.

They then make their way into town where they are met with the first infected person at the abandoned military blockade. There is a quick time event where you have to try and kill the infected. After killing them you are tasked with trying to find out how to turn on the power and open the blockade into the city. 

After making it into the city you do some exploring and eventually trigger a boss fight in the town square. The fight involves dodging the creature's tentacles and ranged attacks along with the hordes of infected people.  Upon killing the boss the fountain in the town center breaks and you can then drop down into the sewers and you find a way to the reactor.

After entering the reactor base, you are met with a horde of enemies to kill and puzzles to solve to make it into the final room, where there is another boss fight then The game ends after beating the final boss and escaping on a helicopter.

Gameplay: The bulk of the gameplay will consist of a player entering an encounter where they are presented with puzzles that the player must solve to progress, and enemies to fight or avoid. There will be items found later that will require the player to backtrack so that they can have more resources to work with.

Features - Overview

Skydiving

Abseiling

Item mechanics

Enemies 

Inventory

Interaction

Features - In depth

Skydiving

The first thing you do in the game is complete a HALO jump. A HALO jump is a “high altitude low open”  skydive. This maneuver is designed to not be picked up on radar and be undetected, In the story it is so that they can get in without anyone noticing them.

The fist step to the skydiving is setting the animation states to the skydiving mode as well as hiding the weapon. It also plays some camera shake and some wind noise to add to the effect.

The next step is then to move the character along the spline that is placed in the world from the plane to the ground. This spline ensures the player follows the path that I have set while it looks and feels like they still have control.

Notice how after the skydive the animations and weapons are set back to being visible.

Another thing that you have to do while skydiving is keep an eye on your altimeter which tells you how high above the ground you are. This is handled by simply blending between two different animations.

Abseiling

Firstly I made a new Blueprint called Abseil. From within that Blueprint I added two splines, One for the vertical axis and one for the horizontal one, The idea of the abseil is to work similarly to a CNC machine that has a central object that moves around on a 2D axis. The player being the central object.

The above picture is a 2 axis movement machine that I am aiming to replicate. The benefit of course with using the splines is that I can sort of bring it into the 3rd dimension and wrap the 2d axis around the mountain as shown below.

The snippet shown below is how the player is attached to the Abseil actor. Firstly it attaches the player to an empty scene component and it turns off the player's gravity as well as zeros out its velocity to stop the player moving.

The Blueprints below then are what enables the player to move around on the abseiling rope. The left and right input controls move the scene component along the horizontal spline and the forward and back inputs move the scene component up and down the vertical spline. The scene component is clamped to the bounds of the splines using the clamp node. 

Because the player is attached to the scene component, the player moves with it giving the effect of moving around on the side of the mountain face. 

The Blueprint can then be reused many times throughout the game for abseiling down a building for example.

Item mechanics

The weapon mechanics are an important section of the game because it is how you kill the enemies and the bosses.

I made the entire weapon system in C++ and added it as an ActorComponent on the player blueprint.

Setting the item

I have a function made called SetCurrentItem which is responsible for finding the DataTable and setting all the appropriate variables such as skeletal mesh and animations.

Using the item

The “UseItem” function essentially uses the main function of the item you are holding. If it is a gun, it will shoot, if it is a shovel it will swing, If it is a med kit it will heal you.

If the first thing that happens in the sequence of events is the system calculates the fire rate of the item you are using. It works by having a minimum time between uses. It does this by dividing the “FireRate” var by 1 to equal the delay in seconds.

Next what happens is the calculations for the Start and End points for the line trace. This is calculated by the camera location and rotation. 

If there is a hit then the next things that happen are : 

It is important to note that it does all this based on its selected property values in the DataTable assigned with each item. This makes it extremely easy to add new items into the game and quickly change variable values.

Enemies

Enemy #1 - This is the standard enemy in the game known as the “Infected”.

Setting the infected type

The first thing that happens when a is a number between 0 and 2 is picked at random correlating to a walk cycle and speed determining if the infected is a Crawler, Walker or Runner.

Tracking the player

Once the infected is spawned and selected its mission then is just to reach the player. It does this by ising the pawn sensing component build into Unreal.

This component allows me to them easily have the infected find the players location and move to it using the nav mesh volume setup in the scene

Enemy #2 - Boss

This enemy is the boss fight enemy that is at the end of the first part of the game.

 

The main attack that the boss has is shooting its bulbs at you, but it will only try to attack you if it can see you. It does this by repeatedly trying to do a line trace between it and the player and if the line trace collides with the player then it knows it's looking at the player. 

If it can see the player then it will attempt to hit it with the bulbs by spawning one of the bulbs and in the “SpawnTransformLocation” and “SpawnTransformRotation” variables it just passes through the same values as from the line trace. The spawned bulb then has a projectile component on it making it fly in the set direction from where it was spawned.

This end piece of the Blueprint checks if all the bulbs are destroyed and if so to kill the boss.

The above blueprint is what checks if the bulb has hit a player and to decrement the players health. It decrements the health with a random number from 35 - 60 to have a bit of luck involved when fighting.

Inventory

The inventory in the game is very simplistic and is just meant to be able to store a small number of items.

The system works by simply having an array of strings saved which is all the items that are in the players inventory. I've done this in c++ to make it easier for me as I work better in c++.

The inventory actor component is then added to the player to make it able to interact with the script.

This system then makes it very easy to do checks in the inventory for certain items such as a key. For example this door in the game requires the player to have a key in their inventory before the interaction will work.

It may be a simple system but it does the job in this instance where the game is relatively small in scope, though if I was to expand on the game and continue the development I would be wanted to upgrade the inventory system because you might run into issues with multiple items stacking up weirdly and not working as expected if there is more than one key for example.

Interaction

The interaction code is handled in two sections. The first part is the player's interaction with an actor. Below is a code snippet showing how it is achieved. It is simply a line trace coming from the camera. When the line trace collides with something it broadcasts using the delegate system in c++.

The interact function is called from Blueprint using a standard enhanced input.

The below code is how to set up the receiving delegate that will be listening to the broadcast.

Assuming the actor has the interaction script added as a component they will get access to this “OnInteract” node that will be able to do whatever you want it to, in this case destroying the actor.

Level design

After jumping out of the plane at the beginning of the game you will traverse through 4 main sections.

Section 1

This is the landing zone from the HALO jump. From here you will get a map overview and see all the following sections that you will have to navigate through.

Section 2

Section 2 is where we are introduced to the first non player character in the game. You Enter a house where you meet a villager and explain that there are monsters in the village and how it is unsafe to go into the center of the town. The player can grab ammo food and med kits from here as well as possibly picking up some melee weapons.

Section 3

The third section is known as the city blockade. There is a blocked off main entrance to the city in which the player will have to figure out how to get through while also fight the first enemy in the game.

Section 4

After making it into section 4 you will be faced with a boss fight where the player will have to battle a boss while being surrounded by other minor enemies. After killing the boss it unlocks the sewer area where there will be a title screen letting the player know that they have completed the game.

Conclusion

All in all I quite enjoyed working on this project, I learned quite a bit about animation for first person games and the more deeply hidden things you can do within the AnimBP. I think the main thing that was slowing me down was definitely the art pipeline, Because I am quite stubborn with wanting to do everything myself I was taking way too much time to make all the models myself as well as animate them all by hand, which of course was eating away the the time to do other more core gameplay stuff. I also think more collaboration could have definitely aided in the project being done quicker and to a higher polish. Due to everyone in the class deciding to work on their own solo projects this year it meant that everything had to be done by me. If I were to do it again from the beginning I would have liked to plan out what I was doing a bit more from the start rather than making it up as I went, which definitely is a reason for me losing sight of some goals and overdoing things that weren't as important.