What you need
- Developer account on PlayFab.com
- Enable PlayFab Multiplayer Servers feature
- Your server-client game source code
1. Author a game server build
A game server build typically contains game assets and an executable you want running on the servers/virtual machines (VMs). When using PlayFab Multiplayer Servers, you have to integrate the PlayFab Game Server SDK (GSDK) into your usual game server build. This integrated game server build is known as the PlayFab Multiplayer Game Server Build. For detailed integration steps, see Author a game server build. To learn more about the internal structure, see Server terminology and Game server basics.2. Deploy a build
Once you have a game server build that can run on PlayFab Multiplayer Game Servers as described in the step above, you can move into configuring how you want the servers/virtual machines (VMs) to be created for you. This step is known as creating or deploying builds. You can specify the type of servers you want, regions they are in, what is on the server, and how they scale. For details, see Deploy a build.3. Scale game servers
After creating builds, the service is able to dynamically spin up new virtual machines and recycle used ones. This would ensure that your title is able to fulfill player demand and maintain standby levels that you’ve specified. To learn more about configuring this scaling behavior, see Scaling Standby, Scheduled Standby, and Dynamic Standby. Now, you can also manage scaling using APIs. To learn more, see Scaling Programatically.4. Measure player latency to Azure regions
When players initiate a multiplayer experience, you should send User Datagram Protocol (UDP) messages to our Quality of Service (QoS) beacons. Based on the time between sending the UDP message and receiving a response, you can measure the network latency. The latency measurements can be used to determine the datacenters in which to request a game server for the best experience. To learn more and see sample code, see Using QoS beacons to measure Player latency to Azure.5. Request game servers
When a player needs multiplayer servers, it can be allocated from the build’s standby pool. This request can come from many sources, including PlayFab Matchmaking, a lobby or matchmaking service you operate, directly from a client calling PlayFab, and more. PlayFab Matchmaking service is a cross-platform matchmaking service that is able to automatically allocate PlayFab Multiplayer Servers. For more information how to activate server allocation, see Integrating matchmaking with PlayFab Multiplayer Servers.6. Connect and play
PlayFab will fulfill a server request within one second if standby servers are available. Once a server has been put into the active state, clients can connect to the server and play. Image below illustrates how PlayFab Multiplayer Servers hosting works, incorporating the steps above.
