Is there a way to get room list from every region?
The whole answer can be found below.
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).
Is there a way to get room list from every region?
Lost008
2022-05-25 05:20:40
Our game has a small player base who are connected across different regions. We want to show room listing from all regions together so that players can connect with each other. Is there a way to achieve this??
Comments
Not directly.
The topology of Photon's cluster doesn't easily allow this. Room list is contained within each MasterServer (region node) but it also requires you to have a valid Photon token to access it. Generally I see most developers making their client iterate through the regions one by one and retrieve game list from SQL lobbies. This works but it's very jank and doesn't remove the possibility of there being rooms with duplicate names unless you prefix each one with a special character based on the MasterServer they're connected to.
You can use webhooks and offload the room to an external web server which is accessed by clients. This is simple and effective. Playfab has utilities for this I believe. You will want to set up webhooks eventually anyway to keep logs.
An alternative option is Photon server plugins, these are accessible by using the self-hosted SDK or having an enterprise plan. But you would only be doing the same thing as webhooks if you decided to go this route.
Back to top