Opt in/opt out of joining in-progress games
Overview
Navigating the choices between joining new sessions or ongoing multiplayer games is a critical aspect of designing a player-centric gaming experience. This guide walks you through how to opt-in and opt-out of mechanics and the considerations and strategies that game developers can apply to enhance player engagement and satisfaction.
Implement opt-in and opt-out options to join in-progress games
The following is a sample ruleset for implementing opt-in and opt-out options to join in-progress games.
{
"auto_backfill": false,
"alliance": {
"min_number": 1,
"max_number": 2,
"player_min_number": 1,
"player_max_number": 5
},
"flexing_rule": [
{
"duration": 15,
"attribute": "mmr",
"criteria": "distance",
"reference": 300
}
],
"match_options": {
"options": [
{
"name": "cross_platform",
"type": "disable"
}
]
},
"rebalance_enable": true,
"matching_rule": [
{
"attribute": "mmr",
"criteria": "distance",
"reference": 100
}
]
}
After a session is created, the DS should patch the game session attributes with “JOIN_IN_PROGRESS”: true
using the following API.
PATCH /session/v1/public/namespaces/{namespace}/gamesessions/{sessionId}
{
"attributes": {"JOIN_IN_PROGRESS": true},
"version": 3 // depends on the version
}
DS will manually create a backfill ticket after the “JOIN_IN_PROGRESS”: true
attribute is added to the game session.
POST /match2/v1/namespaces/{namespace}/backfill
{
"matchPool": "5v5",
"sessionId": "c47650607ead4f0d96e11b67269a0fba"
}
When the DS accepts the backfill proposal, you can do one of the following:
If you set the auto-accept backfill proposal as inactive (false), then you need to control when to stop the backfill using the following API.
PUT /match2/v1/namespaces/{namespace}/backfill/{backfillID}/proposal/accept
If you set the auto-accept backfill proposal as active (true), then the session will always accept players until the session is full.
{
"proposalId": "string",
"stop": true // or false
}
This image shows the logic that the DS follows.
Matchmaking process
The matchmaking process varies in the following scenarios:
If player has opted to join in-progress games, the matchmaking process starts with the
“JOIN_IN_PROGRESS”: true
attribute using the following API.POST
<baseURL>/match2/v1/namespaces/<namespace>/match-tickets
{
"matchPool": "5v5",
"sessionId": "",
"latencies":{"us-west-2":44,"eu-west-2":187,"ap-northeast-1":600},
"attributes": {
"JOIN_IN_PROGRESS":true
}
}The following image shows the matchmaking process for when a player has opted to join in-progress games.
If a player has opted out of joining in-progress games and instead wants to always start a new session, the matchmaking process starts without the
“JOIN_IN_PROGRESS”
attribute using the following API.POST
<baseURL>/match2/v1/namespaces/<namespace>/match-tickets
{
"matchPool": "5v5",
"sessionId": "",
"latencies":{"us-west-2":44,"eu-west-2":187,"ap-northeast-1":600}
}The following image shows the matchmaking process for when a player wants to start a new session.