メインコンテンツまでスキップ

概要 - ピアツーピアでのクイックマッチ - (Unreal Engine モジュール)

Last updated on June 12, 2024

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 need:

  • To have completed the following module:

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

  • To force enable this module by adding the following code to the Config/DefaultEngine.ini file:

    [AccelByteTutorialModules]
    +ForcedEnabledModules=TutorialModule:MATCHMAKINGP2PESSENTIALS
    ...

Learning objectives

At the end of this module, you will know how to set up P2P Session Templates and match configurations. You will also learn how to implement game client match hosting and matchmaking using P2P.

Preview

At the end of this module, your project will look like the images below:

Start matchmaking demo

LogMatchmakingP2P: UMatchmakingP2POnlineSession_Starter::OnStartMatchmakingComplete succeeded: TRUE
LogMatchmakingP2P: UMatchmakingP2POnlineSession_Starter::OnMatchmakingComplete succeeded: TRUE

Cancel matchmaking demo

LogMatchmakingP2P: UMatchmakingP2POnlineSession_Starter::OnCancelMatchmakingComplete succeeded: TRUE