Sample executable that integrates with PlayFab's Multiplayer Gameserver SDK (GSDK).
- PlayFab's Multiplayer Gameserver SDK (GSDK) - included.
- .Net Core 3.1
- Understanding of C#.
- Get PlayFab's local debugging toolset.
WindowsRunnserCSharp is a sample executable that integrates with PlayFab's Gameserver SDK (GSDK). It starts an http server that will respond to GET requests with a json file containing whatever configuration values it read from the GSDK.
WindowsRunnerCSharpClient is a sample client that integrates with PlayFab's SDK. It logs in a player, measures ping times to all Azure regions using the MPS QoS servers, allocates a server and "connects" to the server by issuing an http GET.
- Setup PlayFab's local debugging toolset, following the Verifying GSDK integration section.
- Once the local agent is running, open any browser, and navigate to
http://localhost:<port>
, where<port>
is the NodePort set in your MultiplayerSettings.json (default 56100). You should see a json body with details about the game server. - The local deployment does not include the PlayFab service so the client will not be able to run locally
- Build WindowsRunnerCSharp as Release|x64 and place all generated binaries in a zipped folder. Make sure the files are all at the root of the zipped folder (not in a subfolder).
- Follow the quickstart guide, but instead of using the provided test server as an asset, use the zipped folder you created in step 1. Required Settings:
- Virtual Machine OS
- Platform: Windows
- Container Image: Windows Server Core
- Assets
- Upload the asset package created above
- Mount path: C:\Assets
- Start Command: C:\Assets\WindowsRunnerCSharp.exe
- Port configuration
- Name: gameport
- Number: <any valid port>
- Regions: Any region, but make sure standby servers is > 0
Once the server is deployed and has reached standby. To run the sample client...
- Follow the steps above to get the WindowsRunnerCSharp server deployed to Azure. Wait for the server to reach standing by
- Record the title id and build id of your build
- Build WindowsRunnerCSharpClient and navigate to the output folder
- Run the WindowsRunnerCSharpClient with the command line
dotnet WindowsRunnerCSharpClient.dll --titleId <TitleId> --buildId <BuildId>
Usage:
WindowsRunnerCSharpClient [options]
Options:
--titleId <titleid> Your PlayFab titleId (Hex)
--playerId <playerid> Optional player id, if not specified a GUID will be used
--buildId <buildid> Build id, if not specified a GUID will be used
--verbose When passed, print verbose results
--version Display version information