Team Project Development Log 2: Game Alpha

After the prototype, I received a unity project file from the team leader who was also the level designer that contained a work in progress version of the levels that are going to be in the game as well as assets from the 2D artists and 3D modellers. This allowed me to start working on the alpha of the game which would contain most of the functionality of the game as well as having a way to ‘finish’ the game even if is wasn’t necessarily the way that it would when it was finished. I moved all of my assets that I needed from my unity project into the new one so that all of my progress from the prototype would be in the new project for the alpha.

Game Alpha Screenshot

The above image shows the alpha of the game that I created. It has some assets implemented such as the chair, desk and health bar. It also has more functionality then the prototype as the damage system is working which affects the health bar and allows one of the players to win.

User Interface

This image shows the UI which is functional as the health bars move when the players are damaged. However, the player score for both players is missing as this has not yet been implemented. Below is an example of the health bar when one of the players is damaged.

Health Bar with Damage
Winning UI

The image above displays the UI that appears when one of the players wins the match. It allows the players to restart the game by pressing the rematch button which reloads the scene. In the future, more buttons will be added to allow the player to switch the level when more levels are added and to be able to quit the game.

Object out of Bounds
Object Lost

The above images show a bug in the alpha that allows the player to throw or drop objects out of bounds which means the object will no longer be useable. This means that there is potential for the players to lose all the objects meaning the level can’t be completed as neither player can damage the other. This will be fixed in the next build of the game.

Player Health Script

This image shows the script that has the functionality of the first player’s health. The Player GameObject variable links to the player while the winUI2 links to the UI that is displayed when Player 1 dies. The two integers are variables that contain the max health of the player and the current health of the player. The healthBar variable links to the script that controls the health bar of the player so that it has the correct values to display on the bar. The void Start section of the code is used to set the player’s current health to the full health of the player as well as setting the health bar value to the max health. The next part of the code is a function called TakeDamage that is created to allow the player to take damage. It takes the damage integer away from the current health and sets the health bar value to the current health so that it goes down. The last section of this script is used to detect when the player’s health is 0 so that the UI to show that Player 2 has won can be shown as well as disabling Player 1 so that they can no longer move since they lost. The below image shows the script for Player 2 which is very similar with minor differences linking to the Player 2 related values and UI.

2nd Player Health Script
Damage Script

This script is the one that handles the functionality for the damage of the objects when they hit the players. It has the same functionality as the script from the prototype as well as actually having the damage system implemented. The damage lines of code link to the respective player health scripts for each player to remove the damage integer in the brackets from the health of the respective player.

Health Bar Script

The above script is a very simple script that connects the health bars in the UI to the health values of the players. This is so when the player is damaged the bar will visibly go down.