Overview
The PlayFab Game Server SDK (GSDK) is provided in C++, C#, and Java versions. The GSDK connects your game server to the PlayFab agent installed on the VM. This agent facilitates key server interactions with the PlayFab Multiplayer platform.Basic integration
For your game server to be able to communicate with the PlayFab multiplayer platform, you need to integrate with the GSDK. At a minimum, you must implement theStart and ReadyForPlayers methods in your game server.
Logging with the GSDK
When your game server ends, the PlayFab VM agent will zip any log files, and make them available to you. <!—via the GetMultiplayerServerLogs API.—> There are two ways to add log files from your game:- Use the GSDK’s
Logmethod - It will add your own log lines to the GSDK log file. - Write your own log file in the appropriate log directory that the PlayFab VM agent will zip up and upload.
Gracefully shutting down your game server
There are three scenarios in which your game server will end:- Your game server application exits.
- PlayFab terminates your game server because there are more game servers available than is necessary for the current player load.
PlayFab will only terminate game servers that are not currently active.
- Azure will perform required maintenance on the virtual machine that is hosting your game server.
Giving PlayFab information about your game server
Currently there are two things you can communicate to PlayFab using the GSDK:- Your game server’s current health status.
- A list of players that are currently connected to your game server.
Getting configuration settings within your game server
There are several PlayFab settings related to your game server that you can retrieve using the GSDK.Two of these settings are actually passed in to PlayFab by your clients, as part of the call to request a multiplayer server. So those settings will not be available to your game server until it is allocated.
