Turning off automatic backfill near end of game session (FlexMatch matchmaking)

0

Hi, I have enabled "automatic backfill" in my matchmaking configuration per the instructions in the docs: "Turn on automatic backfill" section of https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-backfill.html. The backfilling itself works well. Calls from my client service to "StartMatchmaking" will, when expected, return a match to an existing game session. The problem I'm trying to solve now is that I don't want players to be backfilled into a game that's almost over. Item #4--"Turn off automatic backfill for a game session"--doesn't seem to work when I try to implement it on my game server:

4. Turn off automatic backfill for a game session. You can opt to stop automatic backfill at any point during an individual game session. To stop automatic backfill, add code to your game client or game server to make the GameLift API call StopMatchmaking. This call requires a ticket ID. Use the backfill ticket ID from the latest backfill request. You can get this information from the game session matchmaking data, which is updated as described in the previous step.

What confuses me here is that I want to stop backfilling near the end of the game regardless of whether the game session has backfilled any players yet. The line "Use the backfill ticket ID from the latest backfill request" doesn't make sense if no backfill tickets have been received in the game session.

Intuitively, it feels like there should just be some API I can call that opts a particular game session out of future backfill requests but I'm not seeing it.

Any help would be greatly appreciated.

asked 2 years ago429 views
6 Answers
0
Accepted Answer

So for automatic backfill, unless things have changed since I last experimented with it, when a match is made, if there is still player capacity, one backfill ticket will be created automatically that lasts either until the end of the game session or until the backfill request gets fulfilled/expires. But afaik, your server won't get the backfill ticket id directly. Technically, whatever's subscribed to the SNS topic that receives FlexMatch event notifications will get information about the backfill ticket but since you want to stop backfill conditionally, it would probably be easier to do manual backfill in order to call StopMatchBackfill with a matchmaking request ticket id. In this case, that ticket id would be returned from a call to StartMatchBackfill. Hopefully, someone from AWS can shed some more light on this topic but what I remember is that automatic backfill is somewhat limited.

answered 2 years ago
profile picture
EXPERT
reviewed a month ago
0

Hey, so for stopping backfill in this situation, I believe that it would be better handled by the server through the server SDK, not the client service. Yes, you can call StopMatchmaking from the client/client service while passing the backfill ticket id but since you want the server logic controlling when backfill stops (in this case when the game is almost over), I would recommend taking a look at either calling StopMatchBackfill in the gamelift server SDK or calling StopMatchmaking in the AWS SDK from the server.

answered 2 years ago
0

@REDACTEDUSER

answered 2 years ago
0

@REDACTEDUSER

answered 2 years ago
0

Backfill requests are basically like regular matchmaking requests. In the case you specified, you would have to make a new backfill request (after canceling the current backfill request) to account for that player leaving because the existing backfill request won't automatically adjust to that since the matchmaking is independent of the game server/player logic. If you don't make a new backfill request, then the old one is going to continue to be processed by flexmatch and gamelift will keep trying to backfill the original 6 players.

answered 2 years ago
0

@REDACTEDUSER

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions