Quickstart for multiplayer servers (Game Manager)
This tutorial shows you how to upload a sample multiplayer server and configure a server build.
Enable Multiplayer Servers 2.0
Multiplayer Servers 2.0 is available to PlayFab indie, pro, and enterprise-tier customers. If your title does not have access but you are interested in evaluating the service, please email sales@PlayFab.com.
Enable the feature by selecting the Multiplayer tab in Game Manager:
Download and build the GDSK sample
Multiplayer servers work through a special state machine, by integrating with the PlayFab Game Server SDK (GSDK) (see Basics of a PlayFab game server).
GSDK samples show this integration through a very simple HTTP server sample app.
You can download a compiled version of the sample app directly from github.
If you want to build the app yourself, download the GSDK samples from github, using standard git methods or downloading as a zip file.
Opening the Visual Studio project should automatically trigger dependencies like the Game Server SDK nuget package to be downloaded.
Build the project in an x64 RELEASE flavor, as shown below.
ZIP up the produced x64 release binaries. There should be no internal folder structure, the zip file should be a simple flat collection of files, as shown in the following example.
You can compare your build output with the compiled release on github.
Upload assets and create a multiplayer server build
On the Multiplayer Servers 2.0 page, select New Build at the top right. Configure a new build as found in the example shown below.
- Build Name. This is a string used to refer to the build.
- Virtual machine selection. The Azure virtual machine type used to host this multiplayer server build. Standards D1_v2 is a suggested choice, and available to customers by default. Learn about other virtual machine selections at Multiplayer Servers detailed price sheet.
- Servers per machine. How many multiplayer servers will be hosted on each virtual machine. For testing, start with a value of one.
- Network. The GSDK sample operates a simple web server on Port 3600. It is important we specify this port name as game_port, because the game server inspects the port name through the GSDK API. See Connecting clients to game servers for more networking information.
- Assets. Upload the GSDK sample zip file. PlayFab will unzip this folder and mount it in the container file-system as a folder you specify in the C drive.
C:\Assetsis a good example, and that would result in a start game command of
After selecting the Next button at the bottom of your screen, you will need to configure standing-by levels and regional maximums. For testing purposes, let's configure a single standing-by server in East US.
Wait for the build to initialize
After selecting the Deploy button, you will be taken to the build home page. You can monitor the deployment of your build from here. In 10 to 20 minutes your build should be in the Deployed state.