Using activities
When a player starts or joins a multiplayer experience, a title should advertise this in Multiplayer Activity (MPA) by creating an activity. Unlike a session-based model, activities are per player. Each player should create their own activity, even if they’re playing together. A title should create this activity as soon as a player is in a multiplayer experience. During the experience, a title should modify the activity if the player count increases or decreases. A title should delete the activity if the player ends or leaves the multiplayer experience. If a title crashes or otherwise fails to remove an activity, MPA attempts to remove the activity if it detects that the player has stopped playing the title. Activities are automatically removed after 24 hours if they haven’t had an update.Activity contents
Activities contain the information that’s shown in the following table.Privacy
A title might want to allow only a subset of the players on its social graph to join the player. ThejoinRestriction field determines whether other players receive
the connection string when they’re viewing this activity. Values and their meanings are shown in the following table.
Supporting crossplay activities
When creating an activity in the Microsoft Game Development Kit (GDK), titles can specify anallowCrossplay flag.
If false, the Microsoft Game Development Kit (GDK) automatically fills the platform field of an invite with the
current platform. If true, the Microsoft Game Development Kit (GDK) leaves the platform field null, indicating that
the invite is cross platform. The list of platforms allowed via crossplay is defined by title
configuration. Console generations are considered crossplay in this scenario.
Retrieving activities
When retrieving activities for other players, sometimes the connection string is hidden. This indicates that the player isn’t allowed to join this activity. For example, the connection string might be hidden because of the activity’sjoinRestriction - the activity is full.