Set up game sessions - Quick match with peer-to-peer - (Unreal Engine module)
About
To implement matchmaking, you need to set up the matchmaking configurations in the AccelByte Gaming Services (AGS) Admin Portal. This tutorial will guide you through all configurations needed to make matchmaking for the Byte Wars supported game modes: Elimination and Team Deathmatch.
Create Session Template
A Session Template is a configuration template that defines your game session. In this section, you will learn how to create a Session Template.
Log in to the AGS Admin Portal and go to your Byte Wars Unreal game namespace dashboard.
Go to Multiplayer > Matchmaking > Session Configuration. On the Session Template tab, click the Add Session Template button.
Fill in your Session Template configuration on the form that appears. The information below is for the Elimination game mode.
- Session Template Name: the unique name to identify your Session Template. Set it to unreal-elimination-p2p.
- Min Players: the minimum number of players required in the session. Set it to 1.
- Max Players: the maximum number of players in the session. Set it to 4.
- Joinability: the joinability of the session. Set it to Open.
- Server: the session connection type. Set it to Peer to Peer (P2P).
Click Next and you should see a list of features with a toggle switch next to it. For this tutorial, leave it as is, but if you want to enable the auto join feature that was mentioned before, enable the Auto-accept Session feature. With this, players that got invited to a session with this template will be added to that session immediately.
Click Next until you arrive at the Summary. Ensure your configuration is correct and click Create.
Repeat these steps to create a new Session Template for Team Deathmatch using the configuration below.
- Session Template Name: set it to unreal-teamdeathmatch-p2p.
- Min Players: set it to 1.
- Max Players: set it to 8.
- Joinability: set it to Open.
- Server: set it to Peer to Peer (P2P).
Create a Match Ruleset
A Match Ruleset is a configuration that defines how your players will be matched. It is a set of rules for how your matchmaking should work. This section will guide you through creating a Match Ruleset for the Elimination and Team Deathmatch game modes.
Log in to the AGS Admin Portal and go to your game namespace dashboard.
Go to Multiplayer > Matchmaking > Matchmaking Configurations. On the Match Rulesets tab, click Create Ruleset.
On the Create Match Ruleset screen, replace the preexisting JSON with the configurations below and name the new Match Ruleset as
elimination
. Once finished, click Create.{
"alliance": {
"max_number": 4,
"min_number": 1,
"player_max_number": 1,
"player_min_number": 1
},
"auto_backfill": true
}infoalliance is the attribute to define your match members, such as how many teams and players are in a match. This attribute should contain the following fields:
max_number
is the maximum number of teams. Set it to4
.min_number
is the minimum number of teams. Set it to1
.player_max_number
is the maximum number of players in a team. Set it to1
.player_min_number
is the minimum number of players in a team. Set it to1
.
auto_backfill
is a flag for whether the game's server should use backfill or not. You will learn more about it later. For now, set it totrue
.
Repeat the steps mentioned above to create a new Match Ruleset named teamdeathmatch using the configurations below.
{
"alliance": {
"max_number": 2,
"min_number": 2,
"player_max_number": 1,
"player_min_number": 4
},
"auto_backfill": true
}
Create a Match Pool
A Match Pool is a configuration that connects your Match Ruleset to your Session Template. It will perform matchmaking based on your Match Ruleset and create a game session based on your Session Template. This section will guide you through setting up a Match Pool for Elimination and Team Deathmatch.
Log in to the AGS Admin Portal and go to your game namespace dashboard.
Go to Multiplayer > Matchmaking > Matchmaking Configurations. On the Match Pools tab, click Create Match Pool.
On the new window, use the configurations below to configure a Match Pool for the Elimination game mode. Once done, click Add.
- Match Pool Name: the name of the Match Pool. Set it to
unreal-elimination-p2p
. - Match Ruleset: the Match Rule to use. Set it to
elimination
. - Session Template: the Session Template to use. Set it to
unreal-elimination-p2p
.
- Match Pool Name: the name of the Match Pool. Set it to
Repeat the steps mentioned above to create a new Match Pool for Team Deathmatch using the configuration below.
- Match Pool Name: set it to
unreal-teamdeathmatch-p2p
. - Match Ruleset: set it to the
teamdeathmatch
. - Session Template: set it to the
unreal-teamdeathmatch-p2p
.
- Match Pool Name: set it to