Skip to main content

Create, configure, and edit session templates

Last updated on October 24, 2024

Overview

AccelByte Gaming Services (AGS) Session allows you to implement sessions into your game. A session is a critical component for many games, particularly those with online multiplayer, as it allows players to connect with each other.

Session templates in AGS enable game developers to configure a session's joinability, allowed players, leader elections, and other options. This article covers creating and configuring session templates in the AGS Admin Portal.

Prerequisites

Create and configure a session template

  1. In the Admin Portal, go to your desired namespace.

  2. On the sidebar, go to Multiplayer > Matchmaking > Session Configuration. Under the Session Template tab, click + Add Session Template.

  3. In the General section of the Create Session Template page, fill in the required information as desired using the following guide:

    • Session Template Name: type in a name for the session template.
    • Min Players: set the minimum number of players allowed in the session.
    • Max Players: set the maximum number of players allowed in the session.
    • Player Active Session Limit: set the maximum number of concurrent sessions are allowed per player (use -1 for unlimited).
    • Joinability: select the joinability setting.
    • Invite Timeout: set the time limit (in seconds) before a session invite times out. For example, if this is set to 60, the session will drop a player that was in the session but is disconnected from AGS Lobby for more than 60 seconds.
    • Inactive Timeout: set the time limit (in seconds) for how long the session will wait before timing a player out that has been disconnected from AGS Lobby and hasn't reconnected.
    • Leader Election Grace Period: set the duration (in seconds) for selecting a new leader when the current leader is disconnected. This applies to party sessions only.
    • Server: select the session type based on the connection used. If you set this to NONE and Joinability to INVITE ONLY, the session would behave like a party session and a new player can only join if they are invited.
    • Requested Regions: only appears when DS - AMS is selected as the Server. Select the regions this session can be used in.
  4. Click Next. In the Additional section of the Create Session Template page, configure the options as desired using the following guide:

    • Auto-accept Session: If enabled, players will auto-accept the session invitation and join the session directly once the match is formed.
    • Enable Chat Room: If enabled, a chat room for players in the session will be provided for them to chat with each other.
    • Enable Secret Validation: If enabled, the session will generate a secret key for player validation during connection.
    • Generate Code: If enabled, the session will generate a session code.
    • Immutable Session Storage: If enabled, players in the session will be prevented from modifying the session storage.
    • Manual Set Ready for Dedicated Server (DS): If enabled, the dedicated server will be required to call a specific endpoint, signaling that the dedicated server will be ready to accept client connection for the game session.
    • Tied Teams Session Lifetime: If enabled, the lifetime of any party session within the teams will be linked to the game session.
    • Auto-leave Game Session: If enabled, the player will leave the current game session when joining a new one. This will limit the player's active game session to always one. The Player Active Session Limit will be ignored when this config is enabled.
  5. Click Next. In the 3rd Party Sync section of the Create Session Template page, enable or disable the Enable session Sync as desired. Enabling this option will prompt the session to synchronize with a third-party platform.

  6. Click Next to be taken to a page where you will have the option to apply Custom Attributes. Do so as desired, or leave it blank.

  7. Click Next and review the Summary of your session template. If you're satisfied with its configuration, click Create and then OK on the pop-up to confirm. Your new session template will be listed on the Multiplayer > Matchmaking > Session Configuration page under the Session Template List.

Edit a session template

You can make changes to session templates you created by doing the following:

  1. In the Admin Portal, go to your desired namespace.

  2. On the sidebar, go to Multiplayer > Matchmaking > Session Configuration. Under the Session Template tab, find the template you'd like to change and click its name.

  3. Make any adjustments to the session template. Once you're done, click Save and then OK on the pop-up to confirm. Your adjustments will be saved.