在不同遊戲的類型可以用不同的條件配對成團,以下為常見配對後可以接受補位的情境:
Player 1 creates a Ticket (
T1).Director calls
Backend.FetchMatcheswith a MatchProfile.MMF runs
QueryBackfillsandQueryTicketsusing the MatchProfile. It returnsT1.MMF constructs a new Backfill (
B1) and returns aMatchcontaining ticketT1and BackfillB1. The Backfill should be created with fieldAllocateGameServerset totrue, so the game server orchestrator (e.g.: Agones) knows it has to create a new Game Server. The Director handles making calls to create the Game Server.Director starts allocating a Game Server with Backfill
B1information.Player 2 creates a Ticket (
T2).Director calls
Backend.FetchMatches.MMF runs
QueryBackfillsandQueryTicketsusing the MatchProfile. They returnB1andT2accordingly.MMF determines
B1could be used based on data set onB1by the last run of the MMF (e.g. a number of open slots).T2andB1form a new Match.When the Game Server has started, it begins polling Open Match to acknowledge the backfill with
Frontend.AcknowledgeBackfillusing the backfill’s ID (B1.ID) and supplies connection information for the server, to be returned as theAssignmentdata of the ticketsT1andT2. The Game Server also receives the ticket data of the tickets that were assigned so that any data supplied on the ticket (e.g. player IDs) may be used by the game server.
由上述流程可以看到一個重點,MMF 是讓我們可以使用 backfill 機制的主要角色,想要使用 backfill,我們勢必要在我們的 MMF 上,實作出符合補位機制的邏輯。而另一個需要注意的重點是,遊戲伺服器必須持續的向 Frontend,確認是否有需要補位的情況,透過使用 Frontend.AcknowledgeBackfill 接口,達成 Open-Match 與 Game Server 之間的資訊同步。