Project 3: AR Survival Shooter

Technical description of the application

My project is a videogame that integrates augmented reality. The game is a survival shooter that is played with mouse and keyboard. The goal of the player is to survive as long as possible and improve his own best score every time.
The gameplay is divided in two phases that alternate until the player dies. The first one is the wave phase, which is when the enemies spawn and the player needs to kiil them all. Once he does it, the game goes to the next phase: the placing phase. Here the player has a limited amount of time to place some objects and traps that will help him in the next round. Killing monsters grants the player points that contribute to the general score and allow him to buy said objects.

During the wave phase the player is free to move inside the arena and shoot the enemies down. As the game goes on, the amount of enemies per round, the maximum number of enemies that can be spawned at once and the spawn timers will change, increasing the difficulty of the game. Every 4 waves, the game will spawn a miniboss that deals a lot of damage and has a lot of HPs. Killing it will also grant many more points than the usual enemies. There is no time limit for the wave phase, the only possible outcomes are: the player dies, ending the game, or the player successfully kills all the enemies and starts the placing phase.

Wave phase gameplay
Boss spawned

The arena is tracked with an image target, so the player can position the webcam in different places and can choose his preferred perspective. The game is developed in such a way that the direction of movement of the character is decided based on the position of the camera. This means that the "go north" button will always move the player to the current north, depending on where the webcam is placed. In any moment, during the game, losing track of the arena target pauses the game. This is really useful to avoid situations where the target is lost but the game is still running, resulting in an eventual death of the player or at least a loss of gameplay time, which in turn would annoy the user.

Pause menu

The placing phase uses the AR capabilities more extensively than the wave phase. Each object is associated to an image target. The player will be able to place the objects on the arena thanks to these targets and the press a button to confirm the placement. The user can place more than one object at the time, but he needs to care about the price of such objects. Each of them needs to be bought using the points accumulated in the past wave phases. Spending points doesn't decrement the score, which is separated by the currency model.
If the player makes a mistake or is unsatisfied about a placement he can press a button to undo the last purchase. All of the placements of the current phase can be undone and the points used to buy such objects are returned.

Placed object

Here's a list of the five different objects:

  1. Mud zone: a small zone that slows all the enemies that enter it.
  2. Lava zone: a small zone that damages all the enemies that enter it.
  3. Invulnerability buff: a cube that, if picked up during the wave phase, makes the player invulnerable to damage. Only lasts for a couple of seconds.
  4. Damage buff: a cube that, if picked up during the wave phase, doubles the player's damage. Only lasts for a couple of seconds. Different damage bonuses can be stacked and the duration is refreshed with each pick up.
  5. Healthpack: a cube that, if picked up during the wave phase, heals the player.

Placing objects 3 and 5
Placing objects 2 and 4
Placing object 1

The arena has four different spawn points. There are three types of enemies, all of which have slightly different movement speeds and deal different amounts of damage to the player. Each of them has one attack that is triggered when the player is close enough to them. Also, each kind of enemy gives a different amount of points and has a different number of hit points.
This is the list:

It's possible to pause the game whenever you want. There are no particular options in the pause menu, but it's useful to take a break. Also, as I already wrote, the game will be paused automatically if the game loses track of the arena. It's only possible to unpause if the arena is tracked.

The UI is rather simple. These are the components:

  1. Healthbar: a bar that shows the player's remaining hit points.
  2. Score counter: current score achieved so far.
  3. Point counter: number of points available for object purchase during the placing phase.
  4. Phase indicator: shows which is the current phase.
  5. Timer: shows either the total time spent playing during the wave phases or the countdown timer of the placing phase.

The game keeps track of the top score in a file located in the Resources folder. When the player dies, the current score is compared with the top one and the top score is updated and saved if the player surpassed it. When the player dies he can press a button to restart the game.

Dead menu

Assets and Credits

This is a list of all the assets that have been used for the project, including the credits for each of them. Click on the images to go to the website.

These are the audio files used in the game:

Development challenges and choices

I've been able to implement everything I planned to have in my game. During the development I've encountered some problems and difficulties, here are some of them:

How to run and download links

You can download the unity project folder from the following link. All you have to do is load it in Unity and run the scene, make sure to install the Vuforia extension in case something doesn't work. I used Unity 2018.2.13 to develop and run the project. The images used as targets are also listed here for printing.
Download link

In order to play you need to cut the magazine targets in the following way: (4 pieces of magazine 2 and top-left piece of magazine 1)

Astronaut target
Magazine pieces

Youtube video

Powered by w3.css