In this guide, we're going to walk you through the process of setting up a game server using our platform. After the game server is ready, we'll also show you how to implement our Dedicated Server Management (DSM), which can help and manage the servers used by our Matchmaking service.
Requirements
Have a server-build of your game ready.
Implementation
Create a Game Namespace
First, log in to our Admin Portal. (https://demo.accelbyte.io/admin). After logging in you'll be directed to Namespace list, or if you're already in the Admin Portal, go to the Namespace section on the left side of the dashboard menu bar and choose See all namespaces.
After creating your namespace, you need to create client credentials. To do this, go to the OAuthClients menu in the Platform Configurations menu in the upper-right corner of the dashboard and hit the Create New button.
Figure 4. Admin Portal - Clients
You can set the Client Type as either Public or Confidential. Set the Client Type to Confidential. Then fill in the form as instructed, and select the Namespace that you created earlier to generate the Client ID and Client Secret. Save these as we are going to use these in our next config step. When you're ready to continue, hit Create.
Figure 5. Admin Portal - Creating a New ClientFigure 6. Admin Portal - The Newly Created Client
Next we'll add permissions to our client credential. Click the client name and switch to the Permissions tab to set up the permission settings. Click the Add button and input NAMESPACE:{namespace}:DSM:SERVER into the Resource field. Then select the Update checkbox to update the permission and click Confirm.
Figure 7. Admin Portal - Permissions TabFigure 8. Admin Portal - Adding a New Permission
With the same way of adding DSM:SERVER Permission, then add these following permissions as well :
“NAMESPACE:{namespace}:MATCHRESULT” with action Create,
“NAMESPACE:{namespace}:SESSION“ with action Update,
Now we have a working client credential with proper permissions ready to use.
Figure 9. Admin Portal - The Newly Created Client Permission
Create a Matchmaking Channel / GameMode
To create a matchmaking channel, you can follow the instructions in our documentation.
After configuring your matchmaking rules (including the Flexing Rules), you can implement matchmaking in your game.
Setting Up the Game Config for the Game Server / Dedicated Server and Game Client
This setup is pretty straightforward. Set the AccelByte SDK config and make sure all of the config values are valid. Below are examples of configs for the game client and game server. Both of these examples are located in Assets/Resources/folder.
First, ensure that your linux server binary is tested and ready to be up and running. You can test it locally on your Windows PC by running it on Docker.
Download the DS Uploader
You can upload the game server with our DS Uploader, which you can download from our Nexus repository link.
Upload the Game Server with DS Uploader
To upload the game server binary, use the following command:
After the upload is complete, you can find the newly uploaded game server binary on your game’s namespace in the Admin Portal. On the dashboard, go to the Configuration menu located in the Dedicated Server Management section. Select the namespace configuration (View), then go to the Image Versions tab. You'll see the previously uploaded server binary is listed on the page. To make it the default preset, add a checkbox to the version.
Figure 11. Dedicated Server Image Versions
Create a New DSM Configuration in the Admin Portal
In order to configure AccelByte Dedicated Server Management (DSM), we use our AWS repository. The DSM Configuration settings can be found in our Admin Portal (https://demo.accelbyte.io/admin). Click on Dedicated Server Management from the menu and go to Configurations.
Figure 12. Dedicated Server Configurations
Click the Add Configuration button to create a new configuration for the newly created game server. Below we provide our configuration values for our sample game Light Fantastic.
Configure the values in the General section according to your game's needs.
Figure 13. Server Configuration Section: General
Port Port where your dedicated server is listening for a connection.
Creation Timeout The time limit for a dedicated server to be created after being requested.
Claim Timeout The time limit for the lobby service to claim a dedicated server after being requested.
Session Timeout The time limit for an active session to finish.
Heartbeat Timeout The time limit for a regitered dedicated server to call the heartbeat endpoint.
Unreachable Timeout The time limit for an unreachable dedicated server to call the heartbeat endpoint.
Define your game server providers from the Providers section shown below. For more information about setting up multiple server providers, go to our Armada Overview Page.
Figure 14. Server Configuration Section: Provider
You can modify your default pod configuration from the Pod Configurations tab. To edit the configuration, click the 3 dots button (...) and choose Edit. If you don't have a pod configuration yet, create anew by clicking the Add button.
Figure 15. Pod Configurations TabFigure 16. Editing a Pod Configuration
CPU Request Minimum number of cores needed by the dedicated server. (1000m means 1 CPU core)
CPU Limit Maximum number of cores that can be used by the dedicated server. (1000m means 1 CPU core)
Memory Request Minimum size of the memory needed by the dedicated server.
Memory Limit Maximum size of the memory that can be used by the dedicated server.
Params The DS parameter will be appended to the executable call (e.g. -log)
You can modify a deployment configuration from the Deployments tab.
Figure 17. Deployments Tab
To edit the configuration, click the 3 dots button (...) and choose Edit.
Figure 18. Editing a Deployment Configuration
Min. Count Minimum number of dedicated servers spawned regardless of the condition, whether they are idle or active.
Max. Count Maximum number of dedicated servers allowed to be spawned.
Buffer Count Default number of dedicated servers that should be ready.
After you configure your DSM, you can start matchmaking from your game client and get your game client connected to the game server with AccelByte services.
Monitor Your Game Server
After your game server is all set up, you can monitor its status along with all of your other servers across different regions and providers. For more info about this, visit our Armada Overview page.
If you have any questions or are interested in learning more about our server management solution, feel free to send us an email at hello@accelbyte.io.