The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

Try Our
Documentation

Please check if you can find an answer in our extensive documentation on PUN.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Read More on
Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

Server list with ping and list of servers on all the regions

Tommaso
2017-06-15 06:48:25

So... can you help me to create a ping that a user can visualize to choose the right server? Beacuse I also need your help to create a list of servers of all the regions to choose the server you want (bith best ping). Thank you guys <3

Comments

JohnTube
2017-06-16 14:11:57

Hi @Tommaso,

Thank you for choosing Photon!

It is not clear what you mean by server as you can't have all these info on a single list/screen:
I think it should be 3:

1- Master Server or Photon Cloud region that you can connect to: Please take at the "App and Lobby Stats" docs page for the players count and you can use PhotonNetwork.networkingPeer.AvailableRegions list for the ping.
2- List of lobbies you can join: lobbies listing is not possible.
3- List of rooms per lobby: you can have this when you are joined to a lobby. More info here. "Server Name" = Room Name (or GameId), "Space" or "map name" should be a lobby property. See RoomInfo class for. It's very tricky and maybe useless to show ping here.

Also:
PUN client can be:

  • connected to a single Master Server / Region at the same time
  • joined to a single lobby at the same time
  • joined to a single room at the same time
  • either on Name Server (for auth) or Master Server or on Game Server (joined to a room)
  • either joined or not to a lobby on Master Server

see picture here.

Tommaso
2017-06-18 16:47:57

@JohnTube said:
Hi @Tommaso,

Thank you for choosing Photon!

It is not clear what you mean by server as you can't have all these info on a single list/screen:
I think it should be 3:

1- Master Server or Photon Cloud region that you can connect to: Please take at the "App and Lobby Stats" docs page for the players count and you can use PhotonNetwork.networkingPeer.AvailableRegions list for the ping.
2- List of lobbies you can join: lobbies listing is not possible.
3- List of rooms per lobby: you can have this when you are joined to a lobby. More info here. "Server Name" = Room Name (or GameId), "Space" or "map name" should be a lobby property. See RoomInfo class for. It's very tricky and maybe useless to show ping here.

Also:
PUN client can be:

  • connected to a single Master Server / Region at the same time
  • joined to a single lobby at the same time
  • joined to a single room at the same time
  • either on Name Server (for auth) or Master Server or on Game Server (joined to a room)
  • either joined or not to a lobby on Master Server

see picture here.

Thank you! The image I use is the current server list of my game, I only need to know how to add also the ping of a current match if you want to join in.

JohnTube
2017-06-19 11:39:54

So you confirm it's option 3: you are listing rooms (not servers) in default lobby of a single region.
You can't have the ping as it does not make sense.
When you list those rooms you are on Master Server of a single region.
Each one of the listed rooms could be a on a separate Game Server of that region.
You can't tell which Game Server unless you try to join it.
Also for a same region Master Server and Game Server(s) should have approximately same ping as "they are physically and logically located in the same place".

Tommaso
2017-06-19 11:49:13

Okay thank you

fd3ous
2021-01-07 09:54:31

@JohnTube wrote: »

So you confirm it's option 3: you are listing rooms (not servers) in default lobby of a single region.
You can't have the ping as it does not make sense.
When you list those rooms you are on Master Server of a single region.
Each one of the listed rooms could be a on a separate Game Server of that region.
You can't tell which Game Server unless you try to join it.
Also for a same region Master Server and Game Server(s) should have approximately same ping as "they are physically and logically located in the same place".

hello and thank you, your answer is helpful but not helpful enough..
I want to know if there's a way to know the ping to master servers

Tobias
2021-01-07 14:34:10

In PUN 2 / Realtime, implement the IConnectionCallbacks. The callback OnRegionListReceived(RegionHandler regionHandler) provides a regionHandler and that has the list of ping values, after they were pinged.

PUN (over-)simplifies the workflow by then connecting to the best region. It also stores the best region and skips pinging other regions in subsequent connects (unless the ping is much worse than when you tested first).

Back to top