Multiplayer session
A multiplayer session represents a group of XBOX services players and the properties that are associated with them. The session is created and maintained by titles. It’s represented as a secure JSON document that resides in the XBOX services cloud. The session document itself contains information about the XBOX services players who are connected to the session, how many spots are available, custom metadata (for the session as well as for each session member), and other information that’s related to the game session. Each session is based on a session template. It’s defined by the game developer and is configured in the XBOX services configuration for a title instance. A title can create and update a session, but it can’t directly delete a session. Instead, after all players are removed from a session, the XBOX services Multiplayer service automatically deletes the session after a specified time-out. Titles can choose to use multiple sessions, but a typical multiplayer implementation uses the following two sessions.- Lobby session: Represents a group of friends who want to remain together across a game; for example, multiple rounds, levels, and maps.
- Game session: Represents the people who are playing in a specific session instance of a game, such as a round, match, and level. This session can include members from multiple lobby sessions who have joined the session instance together, typically through a matchmaking service.
Example scenario
In this example scenario, Tereza wants to play a multiplayer game with her friends, Sergio and Alejandra.- Tereza starts up a game, and then invites Sergio and Alejandra into her game.
- After they join, Tereza, Sergio, and Alejandra are all in a lobby session.
- In this session, they decide to play in an online match with other people.
- The game creates a game session. It uses the XBOX services matchmaking service to fill the remaining player slots with other XBOX services players.
- Suppose that Ermal and Miguel are matched up with them, and the five of them play the round together.
- After the round ends, Tereza, Sergio, and Alejandra leave the game session but are still together in the lobby session (without Ermal and Miguel). The three friends can choose to play another round or switch to different game mode.
Session member
A session member is an XBOX services player that’s part of a session.Arbiter
An arbiter is a console or device that manages the state of the session for a game. For example, the arbiter would be responsible for advertising a game session to matchmaking to find more players. The arbiter is set by the title. The arbiter and the host of the game can be the same, but it’s not essential.Session host
The session host is the console or device that runs the game play simulation for titles that are built on a host-based, peer-to-peer network architecture. This console or device is typically the same as the arbiter, but it’s not essential.Multiplayer Session Directory (MPSD)
The XBOX services Multiplayer service operates in the XBOX services cloud. The service centralizes a game’s multiplayer system metadata across multiple clients. The system that tracks this metadata is known as the Multiplayer Session Directory (MPSD). You can think of MPSD as a library of active game sessions. Your game can add, search, modify, or remove active sessions that relate to your title. MPSD also manages session state and updates sessions when necessary. MPSD allows titles to share the basic information that’s needed to connect a group of players. It ensures that session functionality is synchronized and consistent. MPSD coordinates with the shell and the XBOX One (or later) console OS in sending/accepting invites and in being joined via the gamercard.Session handles
A session is uniquely identified in MPSD by combining pieces of data. They are as follows.- The service configuration identifier (SCID) of the title
- The name of the session template that was used to create the session
- The name of the session
