Team Project Development Log 3: Game Beta and Feedback
I was given feedback on some aspects of the game alpha from my team as well as external testers that I used as a basis for changes in the beta. I also aimed to fix issues encountered in the alpha.
The video of the Beta above shows the game almost feature complete however there are some bugs visible in this video.
The score system has now been implemented which is the new win condition for the game with the aim being for one of the player to reach a score of 5. There is a bug with the score system as the score sometimes gains 2 instead of 1 when the player falls or is thrown down.
The windows can now be destroyed which allows both players to fall or get thrown down outside of the building which is how the players get score when the other player falls or is thrown from the building. To implement the window destruction I had to create a simple model in Blender and then apply an addon known as cell fracture that I then used on the model. I then exported both versions of the model that I needed for the destruction script that will be shown later in the development log.
A respawn system has been added for the players since the win condition now includes them being defeated multiple times rather than once. The respawn system uses a dummy version of the player that is either created when the player’s health reaches 0 or when the player walks or is thrown off the level.
The movement for the players has also been redone. This is because originally I had to make the players kinematic for them to be able to move around correctly but this stopped the objects from interacting with the player model so I redid the player movement script with more physics-based code.
I revised the control scheme of the game by making E and Right Control the keys to both pick up and throw the objects due to some feedback. This meant the control scheme was simpler and the unnecessary feature of dropping objects was removed.
I fixed the objects being lost by adding invisible colliders in the out of bounds areas around the level so the objects would bounce back in as well as implementing a respawn system for objects since the windows can also break now. There is a bug with the objects where sometimes they don’t trigger damage on the players.
The bugs mentioned are aimed to be fixed in the final build.

The above image shows the script that controls the Player 1 score UI element. It is very short as all it does is link the score variable to the UI text. The image below shows the script for the Player 2 score UI.


This new script is used to contain some old variables and some new variables to make them easier to access. This means that I don’t have to link to objects for each time a script is used and instead only have to link once from the object the variable script is linked to. The player respawn and player transform variables are used to set the respawn points of the players and the direction that the object should be thrown. The void Update section of this script is used to determine when one of the players has reached the win condition by using the two new floats that contain the player scores. It then disables both of the players and enables the UI for whichever player won. The UI code was moved from the damage script to here as this script is where the new win condition is determined.

This script is the one that has the functionality for the glass being destroyed. It is connected to the glass object and has a game object variable that links to the broken glass object. When any object enters the trigger for the glass the broken glass object replaces the glass object by being created as the glass is removed from the level.

This script removes all of the broken glass from the level after 5 seconds of it being active. This is because the broken glass object consist of many different smaller objects so for performance reasons this isn’t kept for long.

The above script is the script that handles the respawn of the player. It does so by destroying the dummy version of the the player and then moving the actual player to the respawn location and reactivating them. The player object is never actually destroyed as it causes some script errors so it is just deactivated in the level and replaced when the player loses health or is falling off the map. Below is the Player 2 version of this script.


This image shows some changes made to the player health scripts. A new function has been added that is used to reset the player health of both players when they respawn. The void Update section has been changed to no longer contain the win condition of the game and instead now creates the dummy version of the player when the health of the player runs out. The playerisDummy bool is used in this code because without it the player dummies are spawned infinitely which is not intended at all.


The image above shows the new version of the player movement script. It has the exact same functionality as the original script but it is done in a different way that works with using the rigidbody of the player for movement rather then the character controller as this allows the objects to affect the player correctly. The character controllers were removed from the players as they were no longer needed. Below is the script for the second player.


The above code is the changes I made to the item pickup script for the control scheme. I had to edit the parameters for the if statements to make sure this fully functioned like it did before but with the same key being used for both picking up and throwing an object.

This script is the one that respawns the throwable objects. When the objects are thrown off the map they are respawn in the level at the point set in the variable. Constraints are set and removed on the rigidbodies of the objects so that the force applied to the object isn’t carried over when they respawn.