Hi everyone,
There are a few more updates worth writing about that have been introduced to the multiplayer game Rift of the Realms.
Lobby Screen
We have updated the lobby screen that loads after the player logs into the game. It now contains a menu with options and the ability to access the shop and see what coins you have.
Players can navigate to the shop by pressing on the cart icon. Although the shop currently is just a placeholder, it will soon offer a range of items that can be purchased using gold coins including weapon and skin upgrades.
Gold coins
Now each player in the winning team receives a reward of 100 gold coins at the end of each round! The process behind this is managed by the GeneralUtils script:
The GeneralUtils
script calculates gold coins for players when their team wins in the game. Let's break down the process:
In the
Start()
method ofGeneralUtils
, it iterates through all players in the current room and checks if each player's realm (team) matches the winner (stored intheWinner
variable).If a player's realm matches the winner, it calculates the gold coins earned using the
GoldCoinCalculator.CalculateGoldCoinReturn()
method. In this case, it passesGoldEarners.teamWon
enum value, which returns 100 gold coins.After calculating the gold coins, it updates the player's information using a web request. This is done through
Main.instance.Web.UpdatePlayerInfo()
method,GenearlUtils
passing the updated player information.
So, whenever a player's team wins, each player on that team receives 100 gold coins, as defined in the GoldCoinCalculator
class. Here is the GoldCoinCalculator
class:
public class GoldCoinCalculator
{
public enum GoldEarners
{
teamWon
}
public static int CalculateGoldCoinReturn(GoldEarners earnMethod)
{
switch (earnMethod)
{
case GoldEarners.teamWon:
return 100;
default:
return 0;
}
}
}
The coins the player have earnt is first seen when the player clicks the back to lobby button on the top right of the lobby:
The gold coins displayed in the top right is unique to each player and comes from the database for the player.
Audio
We have been working super hard at finding the right audio for the game.
Lobby sounds:
A sound that plays when you click the logout button
A sound effect for exiting to desktop
Login screen background music
Background music
Game sounds:
Realm switching sound that plays when the player switches realms
Sound when collecting machine parts
A weapon shooting sound
A wepon reloading sound
Each realm now features unique background music
Gameover music that varies if you are on the winning or loosing team
Next we have also added an in game shop template. This is where the player will be able to purchase extra things like ammo and health when they are in the game by pressing the B key. If they press the B key again it will close the in game shop. For now the player can't purchase the health or ammo it is a placeholder:
Login Screen Error Messages
I mentioned in the previous blog that when a player enters incorrect credentials it would be nice to have an error message displayed for them. Now that has been added:
In the future it might be nice to offer players a chance to reset their password. That's all the updates added for now.
Acknowledgements
Special thanks to my colleague Shashank Kumar Sukumar Singh for designing the in game shop and lobby.
As we near the end of this journey, I want to express my gratitude to everyone who has been involved in this project. While this may be one of the final posts, I hope the game can continue to be worked on in the future and expanded upon.
Thanks for reading,
Molly