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

オーバーライド可能なマッチメイキング V2 メソッドのライフサイクル

Last updated on October 23, 2024

The overridable AccelByte Gaming Services (AGS) Matchmaking methods lifecycle tracks the default flow of a player or a party after a request to start matchmaking has been submitted and when the overridable matchmaking methods are called. To learn more about Matchmaking, see Getting started with MatchmakingV2.

Matchmaking lifecycle

Matchmaking is a process from when a player requests to find a match until either the match is found or the ticket has reached timeout duration. The process is divided into two parts:

  1. The match ticket lifecycle starts when a player finds a match by submitting a match ticket, which will be hydrated, enriched, and validated by the service until a new refined match ticket is created and enqueued to the matchmaking.

    Image shows the lifecycle for matchTicket

    For more information, see Understanding the match ticket lifecycle.

  2. The matchmaking lifecycle is periodically updated and started by the service when it gets the refined match ticket. It then pairs the match ticket with the other matching match tickets resulting in a match found.

    Image shows matchmaking process lifecycle

Overridable Matchmaking method

During the matchmaking process, there are five methods that can be overridden:

  1. RPC GetStatCodes(GetStatCodesRequest) returns (StatCodesResponse): overrides or extends the list of codes and values added to player attributes in the match ticket. This method is called when the match ticket is hydrated.

  2. RPC EnrichTicket(EnrichTicketRequest) returns (EnrichTicketResponse): adds additional values to ticket attributes, e.g., insert values from external sources. This method is called after the ticket is hydrated.

  3. RPC ValidateTicket(ValidateTicketRequest) returns (ValidateTicketResponse): overrides or extends the logic for validating a ticket, e.g., checking if the ruleset is valid or not. This method is called after the ticket is hydrated and enriched.

  4. RPC MakeMatches(stream MakeMatchesRequest) returns (stream MatchResponse): overrides implementation of matching tickets from the queue for new tickets. This method is called periodically and takes tickets in a queue as an input. The interval can be configurable with the default time: minimum of 10 seconds and maximum of 30 seconds.

  5. RPC BackfillMatches(stream BackfillMakeMatchesRequest) returns (stream BackfillResponse): overrides implementation of matching tickets from queue that handles backfill tickets. This is called before MakeMatches is called.