Skip to main content

Overview - Quick match with peer-to-peer - (Unity module)

Last updated on November 25, 2024
info

Browsing P2P sessions is not supported in WebGL builds due to the AccelByte Gaming Services (AGS) SDK for Unity lacking the P2P functionality for WebGL.

Introduction

Matchmaking with other players using peer-to-peer (P2P) is one way to reduce the operation costs associated with using dedicated servers. This module shows you how matchmaking with P2P can be set up.

Prerequisites

In order to complete this module, you will need:

  • To have completed the following module:

  • The Byte Wars tutorialmodules branch checked out in your local Byte Wars Unity project repository.

  • To have force enabled this module. You can do this by adding the following code to the Assets/Resources/Modules/TutorialModuleConfig.json file:

    {
    "enableModulesOverride": true,
    "forceEnabledModules": ["MatchmakingWithP2P"],
    "forceDisabledOtherModules" : true,
    }

Learning objectives

At the end of this module, you will know how to implement:

  • Using matchmaking to connect using peer-to-peer network.
  • Game clients joining and leaving game sessions.

Preview

At the end of this module, your project will look like the image below.

Unity Byte Wars: P2P Quick Match Demo