Multiplayer scorekeeping

One of my tasks this week involved me using an online score system that I have created to create an end screen and a score screen. It’s pretty simple, we have an array of a variable called “PlayerScore” which only exists on the server and contains data such as the player’s name, score, number of eliminations, an ID, and so on.

The data is processed in the game mode which exists only on the server so in order to get the data to the players we have a ScoreManager game object that is spawned in on every player and contains among other things a PlayerScore array replicated to all players, it is filled by the server in the game mode whenever the score is updated and so is a relatively safe way to get data to all the players.

Leave a Reply

Your email address will not be published. Required fields are marked *