I'm trying to implement my custom matchmaking/lobbying with Cloud Script.
The reason why I'm not using to available matchmaking is because I want that the first player who wants to play already starts a new match (with RequestMultiplayerServer) and enters the level until enough players are in the lobby. Than the actual match starts. If I use matchmaking, I can only start the game when 2 players have matched.
If there is another way to make this work with the inbuilt matchmaking, please let me know.
If not, I want to save a list containing every active match/server (and some corresponding data, like the game mode (FFA, CTF), which map, max. allowed players etc.
My question is, where can I save this list? In Title data? I read that updating this shouldn't happen too often.
I think this is not possible with the ListMultiplayerServers function, or can I store custom data through the RequestMultiplayerServer function
Thanks for your help
Answer by Citrus Yan · Feb 16 at 09:27 AM
Correct, you cannot store some custom data that is available for ListMultiplayerServers , or even GetMultiplayerServerDetails, via the RequestMultiplayerServer API. For your case, you’d need an external data table, such as Redis, to manage the status of all running matches(servers).
Would it be bad practice to just create a custom player and save the data in the player data and access it through CloudScript?
Too bad that such a basic feature isn't available.
That's definitely not recommended. Here is a workaround: since you can get ConnectedPlayers in MultiplayerServerSummary from ListMultiplayerServers, just save the data in those connected players (in player data, or entity objects) and access it later.
Would this work even if two players start the game (almost) at the same time? Or does it take some time after ReqiestMultiplayerServer until ListMultiplayerServers returns the newly requested server?
How to get Catalog item custom data when login ? 1 Answer
There is a way to save data per demand as global variable that all players can access? 1 Answer
We need to store data for a turn based game, that data is about like 5kb because are long turns. 1 Answer
Creating a Territory War game like like Lord's Mobile or Pokemon Go 1 Answer