Problem with room list

edited July 2013 in Native
Hello!

I am using Photon Cloud with Load Balancing and I am trying to implement this scenario:

we start the game, join the lobby and create unique room, so other players can see us. while in our unique room, we also list other rooms.
now, if I want to play John, I send him an invitation (is it possible without joining his room?), if he accepts, I leave my room, enter his room and change it to invisible.

what I am doing right now is:
mLoadBalancingClient.connect();
mLoadBalancingClient.opJoinLobby(); (from connectReturn)
mLoadBalancingClient.opCreateRoom(roomName); (from joinLobbyReturn)
and when we join the room: mLoadBalancingClient.getRoomNameList(); (from logic code)

problem is that if I start 3 clients in the order:
CLIENT A
CLIENT B
CLIENT C

they dont see each other as I would expect:
A doesnt see anybody
B sees A
C sees A and B

it's like first clients dont update their room list (no onEvent triggered). any ideas?
Thank you!

Comments

  • hmm...
    it seems that if I am in the room, I dont see updates of others rooms being created / destroyed

    What if I create room MY_GAME_LOBBY, make all players join it initially and do some matchmaking there? So I can see all the players in that room listed, I click on someone and it takes us to another room where we play game... Is it the correct way?
    Thing that worries us a bit is "500 Msg/s per Room" limit - what happens if there's 700 players in the fake lobby room and someone joins? will all players get notified? will server send only 500 msg/s and queue the rest or will it discard them ? is there any workaround for this problem?
    Regards
  • Hi Siegfried.

    The room list gets only updated, while the client is inside the lobby. A peer can't be in multiple rooms at the same time. Therefor creating or joining a game room will mean leaving the lobby.

    By the way: There is no need, to call opJoinLobby(), if you don't have called setAutoJoinLobby(false), as it is joined automatically after the connection has been established, on default (auto joining of the lobby can be disabled, in case you don't need room list updates or you only need them under rare conditions, so that you can save the traffic)

    However you can just use 2 LoadBalancing::Client-instances and let one join the game room, while the other one stays in the lobby and receives the room list updates.

    Friend lists or invitations are not supported out of the box by Photon. You would have to add this feature yourself on the server side.
    Alternatively you could use some social gaming engine like or example open feint or game center for invitations (you could even use push notification for invitations then, so that you can even invite players, that have not started the app or have not even installed it yet) and pass the game id of the Photon room there, that you have created as invisible prior to sending the invite, so that it can only be joined by clients, that know the id.

    If you want to start a game, then set the room closed, not to just to invisible. There are 2 flags. isOpen and isVisible. The room will only be listed in the lobby, if both flags are true.Setting the first one to false also means, that no one can join the room anymore, while setting the latter one to false means, that the room can still be joined by players, that know the id.
    So, if you invite a player named A and he does not read to you invitation and after 10 minutes you decide to invite someone else, named B, start the game with B and you two are already playing an hour, when A finally shows up, A could still join the invisible room, while he will get an error for a closed room. For most games it does not make sense, that anyone can join a room, after the match has started.
  • Siegfried wrote:
    hmm...
    it seems that if I am in the room, I dont see updates of others rooms being created / destroyed

    What if I create room MY_GAME_LOBBY, make all players join it initially and do some matchmaking there? So I can see all the players in that room listed, I click on someone and it takes us to another room where we play game... Is it the correct way?
    Thing that worries us a bit is "500 Msg/s per Room" limit - what happens if there's 700 players in the fake lobby room and someone joins? will all players get notified? will server send only 500 msg/s and queue the rest or will it discard them ? is there any workaround for this problem?
    Regards
    Yes, all players in the fake lobby will get the join notification and if you exceed the msg/room limit a bit sometimes, thats no problem. We don't enforce the limit yet. Currently we only monitor the limit and if an app is getting beyond that limit by far and quite regularly (and only then) we may contact you to find a solution.
  • Great! Thanks for the info!
  • edited July 2013
    Edit: Please answer this question here: viewtopic.php?f=5&t=2914

    Hey !maybe it is a so easy question for you ,
    but it drives me crazy. I use the LiteLobby demo ,we know we can input the roomname and just opjoin(roomname) it will put us into the correct room ,so I have a question ,when we send the opjoin(roomname) operation ,on the server side ,where is the roomname save ,the operation is receive in the litepeer.cs ,how does the LiteLobby knows ,and I have foreach the roomlist and the changelist in the litelobbyroom.cs ,but the nothing is in it??what dose the roomlist save ?the roomlist is a hashtable like this (roomname,playercounts)?? but I got nothing in it ,but when someone join the lobby, it can receive the roomlist , so I make a test: I just creat a new room named "yourchatroom" when I creat the new room ,I think this room has been saved in the roomlist ,but when I foreach the roomlist ,nothing in it ,when I can find the room,I want to find the room and change the roomname ,and then pubish to others,how can I achive it? :?
Sign In or Register to comment.