question

george@thenuum.com avatar image
george@thenuum.com asked

Social Server for Players with max room count

Our game is a VR game that involves a social room of 8 players then a lobby with games to play. The games/lobbies are 6 players max.

The game is live now and it is using photon fusion. The problem is we want more control of the servers. So now we want to replicate some things and improve on others. We are thinking we need two servers. The social server and the lobby/game server. We can handle the max room size using our network solution. The problem we don't understand is, how do we tell playfab to start a new server when we reach max room size? Or can we host multiple rooms in one server? We are new to playfab servers and there is not much on how to implement costume set ups. We have seen the wrapper examples and videos. Any help would be appreciated.

Custom Game Servers
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Xiao Zha avatar image
Xiao Zha answered

If by “We are thinking we need two servers. The social server and the lobby/game server.” you mean clients need to connect to social server first, then they can choose to start a game with game server. In this case, if you want the social server to become a long-running server, since the PlayFab Multiplayer Server service is designed for session-based game, which is not recommended to use for long-running server. And you will also need to consider the connection between two PlayFab servers, you can refer to Is it possible to connect two PlayFab servers? - Playfab Community. In addition, if one server instance reaches the max player limit you set, you can request a new server instance by calling RequestMultiplayerServer API.

7 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

george@thenuum.com avatar image george@thenuum.com commented ·

How would we check if a server is available then? Trying to understand the difference between finding an open server and creating a new one. How do we manage that?

0 Likes 0 ·
Xiao Zha avatar image Xiao Zha george@thenuum.com commented ·

You can call List Multiplayer Servers with Title Entity Token to get all server instance within a server build, then if by “check if a server is available” you mean check the number of connected players to see if it reaches the max room size, you can check the connected player list in the API result, if the number of connected players reaches the limit in all server instances, you can request a new server, otherwise, you can connect to the unfilled server instance directly.

0 Likes 0 ·
jordan-3 avatar image jordan-3 Xiao Zha commented ·

ListMultiplayer Servers doesn't appear to give any IP addresses, how do we connect without knowing the ip?

0 Likes 0 ·
Show more comments
george@thenuum.com avatar image george@thenuum.com commented ·

Ok thank you. Azure function is another feature with pricing. Seems a bit weird to not have that included with multiplayer api. Get room list, get player count. We will look into azure functions. We had problems with players calling Cloudscript calls from Europe. Seems like a long time to wait back and forth for Cloudscripts just to check the server. A lot of issues can arise from the set up.

0 Likes 0 ·
Xiao Zha avatar image Xiao Zha george@thenuum.com commented ·

Since the features you want to achieve are “Get room list” and “get player count” which are the features that PlayFab multiplayer API doesn’t provide, you may need to implement it by yourself or post a feature request for it.

If you don’t want use Azure Function to call ListMultiplayerServers API, you can use PlayFab Lobby Service to create a Lobby when request a server instance and store the player account and server info into the LobbyData, then Players can call FindLobbies API to get and join lobbies (which is the get room list function). For more information about Lobby, you can refer to Azure PlayFab Lobby overview - PlayFab | Microsoft Learn.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.