Hello, I don’t usually post stuff but I really liked what I’ve done so I wanted to showcase the Lobby of the game I am in process of making.
The first Lobby consisted of only using Unities Lobby Services to create, join, leave, refresh and update existing Lobbies. I really didn’t like the limitations of the Lobby where there is a limit on how many times it can be updated (host/player can’t mash settings that update the map constantly) or the pooling where each player had to download the Lobby they are in and “clean” the UI and apply the values.
The first Lobby implementation looked like this:
The big downsides included:
-
Slow to update (once every second is the minimum rate).
-
Limited amount of updates before Unities Lobby System gives you notifications for too many clicks.
-
Too much data usage. Getting custom Lobby Data (packed to Binary) on every frame for every player really adds up quite fast.
So, I wanted to think of a solution on how to improve of all of those things. I came up with a solution where I would integrate Lobbies and NGO together, and so I did. The data usage decreased by quite a lot as shown in the image below (sorry for drawing on it):
As seen on the image, the amount of data usage dropped significantly. I was testing it at about the same rate as before so I was happy with my results.
The new, improved Lobby can be seen below and it shows imrovements all around. The responsivnes increased by quite a large margin (almost instantenious) and data usage decreased a lot.
The way it works is that Unities Lobby Services are only used for Lobby creation, joining and leaving of the Lobby and everything else is done using NGO. When host creates a Lobby he starts a Host and everyone joining him joins as a Client and the whole Lobby is managed through RPC’s. It only impacts people in the Lobby itself.
It increased:
-
Responsivnes - changing values, updating map, kicking players, etc, is done almost instanteniously.
-
Reduced Data Usage - since players are not “Getting” Lobby data every second the
LobbyService.Instance.GetLobbyAsync() is barely used.
I don’t know a lot about multiplayer or Lobbies, this is my first time doing it but I am quite pleased with the results.
My UI is terrible because I am terrible at designing and drawing. There are also some bugs that need fixing , like map settings reseting each time a player joins. Thank you for your time, have a great day everyone.
