top of page
Writer's pictureDaniel Henshaw

[03/05/2022] Scoreboard System


I created a scoreboard canvas which can be opened when the player holds the 'tab' key.

Scoreboard Script:

This scoreboard script managers everything to do with the scoreboard. When players join it instantiates a scoreboard item prefab into the 'Scoreboard' game object. It saves this player and its item in an array which allows me to easily delete it when players leave.


The script also receives event data on kills and deaths. When an event is received it compares the username with the item prefab and adds kills or deaths to the correct item depending on the name sent across the network.

Scoreboard Item Script:

This script is a component of the item prefab. Its functions are called from the Scoreboard Script. It allows me to add kills and deaths as well as setting a username.

Evaluation:

This scoreboard system works very well however, there are two small details that I wish I had time to fix. Firstly, when a new player joins the game, their scoreboard says that everybody still has 0 kills and 0 deaths. This could've been fixed if I used Photons built in player data system to save the kills and deaths. I didn't know of this feature at the time but if I could go back and remake this system or make a new game using a similar system I would definitely use this built in player data system.


Another detail I would've liked to include was re-ordering of the scoreboard depending on the players kills. I decided to not pursue this feature as I didn't feel I had enough time due to the deadline.

Comments


bottom of page