Asynchronous multiplayer: Lobby
Creating queues
Log in to your Elympics account at console.elympics.ai, choose your game and create 3 new solo queues: telegram, eth, and training.
Preparing the Unity project
In Unity, go to “Elympics>Select or create config” and turn on the “Use HTTPS/WebRTC” check.
There is a bug, that when building to WebGL this checkbox is set automatically, but it doesn’t really work. In such case you have to check it when using another build target, be sure to save, upload new server build and only then you can proceed with building on WebGL. You will see in a version control tool if the change occured properly.
In our GameManager script, in the Elympics.EndGame() method, pass in the player's final score.
private void EndGame()
{
if (Elympics.IsServer)
Elympics.EndGame(new ResultMatchPlayerDatas(new List<ResultMatchPlayerData> { new ResultMatchPlayerData { MatchmakerData = new float[1] { score.Value } } }));
displayManager.ShowGameOver(score.Value);
}
In Unity go to Window > Package Manager and add 2 new packages by clicking the plus icon in the upper left corner and choosing the Add package from git URL option.
First add the Newtonsoft Json package from com.unity.nuget.newtonsoft-json
Then add the PlayPad SDK package from https://github.com/Elympics/playpad-sdk.git
Creating the menu scene
Go to the PlayPad page to learn more about it, then follow the setup guideline to get already working lobby scene, waiting for your beautiful art.