Active turn-based multiplayer
Engine : unity
I will explain what I want to do and what is my problem.
I want to make the player able to resume the game in case they closed it accidentally or battery died . I did it! by saving the match_id in player metadata so when all player join the game and its started their metadata will be updated with match_id, when game is ended the match_id is metadata will be erased
when a player want to resume after the game is reopened
(Message will pop up asking if he want to resume)
if no match_id in the metadata it means the match is finished (No resume message)
Now if he clicked no resume while the match is running how to mark him as left the match in the match handler and decrease his cups for example and erase match_id from metadata.
Note : I don’t want to allow the a player to start another match while he is still stated as playing on another matche. I am avoiding this currently by checking match_id in metadata MatchmakerAdd hook before adding his request for matchmaking