[Design] LobbyType.AsyncRandomRoom inquiry

Options
JohnTube
JohnTube ✭✭✭✭✭
I switched from LobbyType.Default to LobbyType.AsyncRandomRoom after I've found out about it here in the forum and I thought it was more suitable for my game requirements however I faced new issues using it and I wanted to know if this is the normal behavior with this lobby or not :
- Since Rooms stay in Photon Cloud "cache" for 1h after all players become inactive, if I want to Join a new random Room I've found myself in a same Room I was in a while ago, which didn't seem so random to me ! I didn't close the Room or make it invisible to the lobby because I left before the 2nd player could join.
- I'm making an optimistic approach in matchmaking : I look for random rooms, if none was found I create one and I can make my first move before the arrival of the opponent (cache event). When the 2nd player joins the room, he closes it and make it invisible to the lobby.

Is this feasible with Photon TurnBased or should I wait for the 2nd player to be able to play ?

My game is also special in the way that it's not 100% TurnBased but we can say it's "RoundBased" : meaning there is no particular order or turn constraint between new rounds. In each round both players are free to play, but in order to go to the next round both of them need to play their move, so the first one to play has to wait for the other's move. There's also a possibility of 2 moves in a row : I play last (in this round) then I play first (in the next round). Is this also feasible with Photon TurnBased ? Will there be a contention/concurrency problem if both players play at the same time ?

Should I stick with the AsyncRandomRoom lobby or switch back to the default one ?

Comments

  • Tobias
    Options
    Sorry for the late reply. Good questions.

    I will have to check with my colleagues if we can avoid re-joining a room randomly in the async lobby. Obviously we don't skip rooms accordingly right now. This would make a lot of sense but I guess it needs a bit to get done.
    If you keep using this type and have more rooms available, I guess players will also end up in other rooms more frequently but that's no guarantee.
    I would stick to this type of lobby for your gameplay.

    The round based gameplay should be totally fine with Photon Turnbased and it makes a lot of sense to allow players to make more than one move if they can.
    If both play at the same time that's not a problem for Photon. Your logic must be prepared that a new "move" can come anytime and end the turn accordingly but that's more a game workflow question. I'm sure you can cover that.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    @Tobias : Did you discuss this issue with your colleagues ?
  • Philip
    Options
    Yes we did - we are going to suppress finding rooms where the user is already in the game (active or inactive).
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    @Philip : Happy to hear that !