How update room list (GetRoomList), if I Create a Room?

Options
DziD
DziD
Hello!

I need help! My question about GetRoomList!

After a room created, I can't receive actual rooms info at all!
But in lobby all works fine.
BUT if player stay in a lobby, this player stay not visible for other players, who are asking a room list (because he don't create a room, right?) How can solve it?

P.S.: Caching not solve for me, I need actual list of rooms always

Thanks for answer!

Comments

  • vadim
    Options
    While PUN client joined to the room, it can't get actual rooms list.
    BUT if player stay in a lobby, this player stay not visible for other players
    Which visibility do you mean? PUN does not have player visibility concept.
    What are you trying to implement?
    In theory, you can establish 2nd connection to master server with LoadBalancing client. But in most cases single PUN client and moving between lobby and rooms should be enough.
  • DziD
    DziD
    edited November 2015
    Options
    Hi @vadim, thanks for your answer!

    Yes, I mean visibility! I try to implement multiplayer dashboard, where all players can have a opportubity to choise a opponent for game!

    How I can establish 2nd connection in unity? And next question, if I create a 2nd connection, how I receive events from this connection?
  • vadim
    Options
    I guess you want use a room as lobby where players can see each other.

    You can establish 2nd connection with LoadBalancingClient from Photon Unity 3D SDK (https://www.photonengine.com/Download/Photon-Unity3D-Sdk_v4-0-0-12.zip)
    Copy PhotonLoadbalancingApi folder from sdk package to Assets folder of your projects.
    Then use standard Photon LoadBalancing connection workflow to join the room (see demos bundled with sdk).
    Now you have 2 clients running in parallel: 1st is PUN in lobby and 2nd is LoadBalancingClient in room.
  • DziD
    Options
    Hi @vadim sorry for long silence from my side!

    I tried to use LoadBalancingClient (as you advised earlier), but as a result LoadBalancingClient
    Still can’t see rooms, that were created PUN
    Here is a step-by-step list of my actions:
    1. Creating LoadBalancingClient and connecting to Lobby (let’s name it Lobby1)
    2. Creating PUN and connecting to Lobby1, then creating room “Room1”!
    3. I expect that I’ll see Room1 in LoadBalancingClient, but there is nothing there.

    P.S. Do you have some kind of Premium Support? As we need to solve this problem very quickly. Or maybe you can advise someone who can help with this issue.
  • vadim
    Options
    Hi,

    PUN client and LoadBalancingClient should connect same region and share same app version (and same app id of course). PUN adds PUN version to app version when connects. You need to update LoadBalancingClient's app version to appVeriosn_PUNVersion to make versions the same.
    See mAppVersionPun property in NetworkingPeer.cs
  • DziD
    Options
    Hi @vadim

    Thank you for fast response! ;)

    I create a LoadBalancingClient connection after PUN connection established, and for LoadbalancingClient use parameters from PhotonNetwork

    This is how I initialize loadBalancinClient
    loadBalancinClient.MasterServerAddress = PhotonNetwork.ServerAddress;
    			loadBalancinClient.AppId = PhotonNetwork.PhotonServerSettings.AppID;
    			loadBalancinClient.AppVersion = PhotonNetwork.gameVersion;
    			loadBalancinClient.NickName = PhotonNetwork.player.name;
    
    			loadBalancinClient.Connect();
    How I understand initializing loadBalancinClient.AppVersion must look loadBalancinClient.AppVersion = string.Format("{0}_{1}", PhotonNetwork.gameVersion, PhotonNetwork.versionPUN); right?

    I'll try it, and got you know about result

    Thanks!