Terminology
The following four terms are frequently used in the context of MPA.- Connection string: A string that’s created and understood only by the title, which contains information that’s required for one player to connect to another. This often contains a server IP address but is left freeform to allow titles flexibility. This string is opaque to MPA - it simply passes this string from one player to another to enable players to join each other.
- Activity: Represents an advertisement that the player is in a multiplayer experience. This contains a connection string and a small set of properties to restrict who can join the experience. Activities enable the shell to display this information, including its joinability. An activity should always be present when a player is in a multiplayer experience.
- Invite: Represents a request for a player to join a multiplayer experience. This also contains a connection string. In general, a player should have created an activity before sending invites to other players.
- Recent player: Someone who has had a meaningful interaction with a player. Recent players are stored by MPA in a list. A player can use them to form friend relationships, send messages and invites, or report feedback after a game is played.
Using MPA
Client flow
A title should have the following flow for handling multiplayer experiences.- When player A starts or joins a multiplayer experience, the title should set an
activity to represent
this.
- Other players in the title and XBOX services can retrieve this activity. Depending on their relationship to player A, the activity they receive can also include a connection string. They can use it to join the game in progress.
- Player A can send Invites to other players, actively requesting that they join the game.
- As players join and leave, the title should update the number of players in the activity by setting it again with updated information.
- The title should update the player’s recent players list with any players with whom they’ve had meaningful interactions.
- When player A ends or leaves the multiplayer experience, the title should delete the activity.
External server flow
A server can act on behalf of clients for any of the previously mentioned items. In addition, a server can:- Record bidirectional lists of recent players.
- Send an invite on behalf of a player.
- Retrieve activities for multiple players at the same time, as opposed to one at a time.
