Can we join a game removed from Photon Cloud ?

Hello,
i'm posting here just to get a little confirmation before going any further in my project with Photon. Is this scenario possible with Photon + Playfab, in turned based game:
- PlayerA starts a game
- He plays his turn and can't do anything more as it's the turn of the future opponent
- He disconnects to do something else (without leaving the game), so the room is out of the Photon Cloud but stored in PlayFab
- PlayerB wants to play too, he doesn't create a room as a place is available in the PlayerA's room, he joins it
(- The max players is reached, the room isn't available anymore for other players)

I think about the RoomCreate with type="Load" but i don't know if the fact that "we can join a room removed from photon cloud" is true only if the PlayerB has already previously been in this room. (That he was registred in the player list of the room because he joined when the room was on Photon Cloud)

I hope you got the point ! :neutral:

Thanks

Comments

  • Hi @antigode,

    Thank you for choosing Photon!

    I'm back from vacation.

    The answer to your question is yes: it's possible to save and load Photon room state in PlayFab using Photon Realtime Webhooks and PlayFab's CloudScript.

    What you are looking for exactly is what we call "AsyncJoin" and is enabled by default.
  • Thank you for your confirmation , Hope ur vacation went well !
  • Sorry but I was thinking about your response and I don't know if we ve understood each other well. What I meant is : I want to find a random game but this one might not be on server photon anymore. Here in the link it's more about responding to an invitation so there is still a link. The fact is that if there isnt any players, I don't want to make wait the player 2h looking for a game. Instead he would create a game if no room are available, he plays his turn and wait for an other player joining him by the "randomJoin", till that moment come, he could have disconnected from the game. (to come back later).
  • I want to find a random game but this one might not be on server photon anymore
    Use AsyncRandomLobby along with EmptyRoomTTL = 300000 you can keep a room available for matchmaking for up to 65 minutes.
  • antigodeantigode
    edited April 18
    Ok so it's impossible to have like days ? I mean i know for the TTL limit but no way to bypass this with other method?
  • JohnTubeJohnTube mod
    edited April 18
    No. It's not possible to have days.
    Both limits of max values of EmptyRoomTTL and AsyncRandomLobby game retention are server settings that you can change for your self-hosted Photon Server.
    For private Enterprise Cloud we can also tweak those but not for days.

    But you think you need days while if you are optimistic for your game this is not needed really if you have enough players playing your game. It may be useful at launch or during the development phase where few players are creating few games.

    What you can do is, (I tried this and it's available for other live games using Photon and PlayFab like RollForIt! or Tsuro):

    extend matchmaking using an external rooms list:
    • when a room is created or is available for matchmaking again add its GameId/RoomName to a list, you can use Photon Webhook for this
    • when a room is no longer available for matchmaking, remove its GameId/RoomName from that list, you can use Photon Webhook for this
    • when JoinRandomRoom fails with NoMatchFound error, call your external service (e.g. WebRPC to PlayFab or ExecuteCloudScript) to find a match from that list
    you need to be careful of concurrency issues while accessing that list.
  • Thank you for your response, the "extend matchmaking" was what I was thinking about but i wasn't sure as I'm new to it ! I will try this, thanks ! The scenario I gave you don't come from me but the boss, I can't contest it ! Topic solved !
Sign In or Register to comment.