Skip to main content

Introduction to Session

Last updated on April 23, 2024

Overview

AccelByte Gaming Services (AGS) Session provides developers with the ability to set up and organize multiplayer experiences so players can connect and engage with each other. It acts as the core of AGS multiplayer functionality, managing requests for dedicated servers, party management, and enabling chat rooms.

The main component of AGS Session is a session, which defines the properties of a game for a group of players. A typical example is a game session, where players are connected to a host machine to participate in a multiplayer match.

AGS Session is designed to support a wide variety of sessions through the use of templates, enabling you to define additional player experiences, such as player waiting rooms, raid teams, and other features.

Key concepts

It is important to understand the key concepts used in the design of AGS Session.

Session templates

AGS Session uses templates to define default properties. This is intended to make it easy for you to conceptualize the different player experiences you want to enable in your game. The configurable properties for a template are as follows:

  • Session Template Name: the human-readable name of the session, such as “Party”, “5 vs 5 Deathmatch”, or “Raid Team”.

  • Session Capabilities: settings that define how the session will interact with other features of AGS. Settings include AGS Chat configuration (for player chat support), the type of game host it can connect to, and which server deployment it will use.

  • Player Counts: settings that specify the minimum and maximum number of players that can be connected to the session.

  • Timeouts: settings that control how long inactive session members or member invites can exist before they are removed.

  • Joinability: a setting that defines how players are allowed to join the session.

  • Persistence: a setting that controls if a session will be automatically deleted if there are no players connected to it. By default, sessions will be deleted; however, if your game design requires a session persist even with no connections, this can be enabled. This is currently only configurable through the API.

tip

Parties are managed as part of AGS Session and will need to have their own session template configured with the session type set to None.

Session joinability

Session joinability defines how players are allowed to join a session based on the configuration set in the session template. The configurable options are:

  • Open: allows any player to connect to the session through either matchmaking or a session browser.

  • Invite Only: allows only players who have received an invitation to join the session through either matchmaking, a player in the session requesting to add another player, or a join code that is automatically generated for the session.

  • Closed: prevents any player from being able to join the session unless they were purposefully added there as part of matchmaking, or by the game client that requested the creation of the session.

Session capabilities

Multiplayer functionalities are managed by multiple services within AGS with Session acting as the coordinator between them. In order to specify how a session will interact with other services, you can configure these parameters as part of the session template:

  • Session Type: a setting that determines if the session will connect to a host machine and the type of host it will be. The options you can choose from are:

    • Dedicated Server (DS): indicates that the session and its players will connect to a dedicated server to play the game. The session will request a dedicated server from the Dedicated Server Manager once the minimum number of players have connected to the session.
    • Peer-to-Peer (P2P): indicates that the session and its players will connect to one of the player's computers, which will act as the host during gameplay.
    • None: indicates that the session is not intended to connect to a host machine. This setting is meant to be used by sessions such as parties, raid teams, or regional chat rooms.
  • Deployment: a setting that informs which game server image should be deployed to the dedicated server once it is requested. This setting is only available if the Session Type is set to Dedicated Server.

  • Enable Chat: this allows you to enable or disable a chat room for the session. If enabled, players will be able to message each other through the session chat room while they are connected to the session.

  • Requested Regions: defines which data center a dedicated server should be requested from by the Dedicated Server Manager once a session is ready to connect.

Session timeouts

To prevent sessions from becoming stale or incomplete due to unaccepted invites, the service provides the ability to configure timeouts. The parameters are configured as part of the session template and include:

  • Invite Timeout: defines how long an invitation to join a session will exist before it is either accepted or removed.

  • Inactive Timeout: defines how long a member of a session can remain in an inactive state before they are removed from the session.

In the case that a player becomes inactive or an invite times out for a session that is participating in matchmaking, a backfill ticket can be generated (automatically or manually through the SDK), letting AGS Matchmaking know to find additional players to fill the empty session spots.

Session browser

Using our session query APIs, you can build a session browser for players to view and filter the list of game sessions available to join. The APIs will only return the list of both dedicated server- and peer-to-peer- hosted sessions that have a joinability setting of Open. The APIs can also be used by developers to access the session history, including participating party information, membership changes, and matchmaking updates.

Examples of supported sessions

Because Session allows for multiple session templates to be defined, it is possible for you to create many different types of sessions. This enables you to provide a wide variety of player experiences. Here are some examples:

  • Game Sessions: enables one or more players to connect together to play a game on a dedicated server- or peer-to-peer-hosted match.

  • Parties: enables players to form a group and chat and coordinate their game sessions.

  • Waiting Rooms: enables one or more players to interact with each other prior to a game session starting.

  • Regional Chat Sessions: enables players in a specific region of the world to be connected with each other to chat.

  • Raid Teams: enables multiple parties to band together temporarily to take on a raid boss.

Next steps

A session is configurable both through the Admin Portal, and the Game SDK.