Integrating Master Server Kit

From CCG Kit
Jump to: navigation, search

CCG Kit leverages the player-hosted games enabled by Unity Services by default for convenience but there is a complete separation between server code and client code, meaning it will also work on a dedicated server setup. If you are interested in such a setup, you can write your own matchmaking system or, alternatively, use the official integration with Master Server Kit.

Master Server Kit setup

  • Import the Master Server Kit Unity package into your CCG Kit project. Select only the Core folder.

master_server_kit_import.png

  • After the kit has been successfully imported into your project, make sure the Run In Background option in Build Settings/Player Settings/Resolution and Presentation is enabled. Also, change the Api Compatibility Level option in Build Settings/Player Settings from .NET 2.0 Subset to .NET 2.0. This is explained in more detail in the official setup documentation of Master Server Kit.
  • Add the ENABLE_MASTER_SERVER_KIT scripting define symbol to your player settings:

master_server_kit_configuration.png

  • Open the MSK_ZoneServer scene and select the ZoneServer object. Make sure the Path to binary field points to the path of the game server binary on your system.
  • Select the Build All option located in the Window/Master Server Kit menu. This will generate all the Master Server Kit binaries automatically. By default, these binaries will be located at the root of your Unity project in a folder named Builds.

master_server_kit_build.png


  • You should now be able to play with CCG Kit using the Master Server Kit locally on your development machine. For more detailed information on how to deploy to a production server, please refer to the official documentation of Master Server Kit.