メインコンテンツまでスキップ

Get Started with AMS

Overview

This document describes a simple approach to getting your game up and running using AccelByte Multiplayer Servers (AMS) as the dedicated server (DS) provider.

To use AMS as a DS provider, you need to sign up for AccelByte Shared Cloud to manage your fleets and authorize your matchmaking or session service to claim dedicated servers. For your Unity or Unreal-based game, you also need to integrate the AccelByte Game Software Development Kit (SDK) into your DS so it can interact with AMS to signal when it's ready to use and respond to drain signals when your fleet needs to scale in. If your game uses a different engine it will need to implement the AMS watchdog protocol over a local websocket. The rest of this guide assumes your game engine is supported by the AccelByte Game SDK.

AccelByte Shared Cloud and DS setup

Here are the steps to follow to get set up:

  1. Register an account on AccelByte Shared Cloud.
  2. Once your account is created and you have logged in click "Set up My Game".
  3. After creating the namespace, follow the AMS documentation to:
    1. Create an AMS account.
    2. Download AMS Command Line Interface (CLI) tools from the Admin Portal.
    3. Integrate your dedicated server with AMS using the AccelByte Game SDK.
    4. Upload a dedicated server build using the AMS CLI

After following the above steps, the game server is ready to run in AMS.

Claiming Dedicated Servers

To claim a dedicated server for a game session, the session management service for your game needs to call the AMS Server Claim Endpoint. If you are using AGS as your backend, it will take care of this for you, see Configure sessions to claim dedicated servers from AMS.

Claiming dedicated servers without AGS

If your game does not use AGS and instead uses a different matchmaking or session management solution, you can integrate one of the available AGS Extend SDKs into your session management solution to facilitate claiming dedicated servers from AMS.

When using one of the SDKs, or when making a REST call directly to the claim API, an authorization token is needed. The authorization token is obtained using an OAuth client ID and secret.

To set up the IAM client which the service will use follow these steps:

  1. On the AccelByte Admin Portal sidebar, go to Game Setup > IAM Clients.
  2. Click Create IAM Clients, choose Create from Template, and select the Custom Backend Tooling template.
  3. Fill in the secret you want to use.
  4. In the Permission section, find the Dedicated Server Claim option in the AMS group and tick the update permission checkbox.
  5. Click Create.

The session management service for your game can use this client ID and secret to get a token which can be used to claim dedicated servers from AMS. You can find an example which uses the Accelbyte Python SDK to build a simple matchmaker which claims a DS when a match is formed in the matchmaking-server AMS samples repository.

ヒント

Your matchmaker or session management service should prevent bad actors from triggering excessive claim requests, for example, by requiring player login and restricting any logged in player to a single active matchmaking request at a time.

Make the DS session aware

Your DS needs to know if it is serving an active game session (as opposed to being idle, ready to serve one) so that it can behave appropriately if it gets a drain signal. The expected behavior is described in Listening to the drain signal. Depending on your game service setup, and what your game logic needs, your DS can be made aware of the session information in one of the following way:

  • If your game uses AGS as a backend, the DS should subscribe to the notification from the AGS session service.
  • If there are players connected, assume there is an active session.
  • After successfully claiming a DS, your session management service can use the DS IP and port information to send a message to the DS letting it know it was claimed and sharing session details.
  • The DS could subscribe to a notification system by which your session management service can send the notification with session details.