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.

질문됨 2년 전439회 조회
6개 답변
0
수락된 답변

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.

답변함 2년 전
profile picture
전문가
검토됨 한 달 전
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.

답변함 2년 전
0

@REDACTEDUSER

답변함 2년 전
0

@REDACTEDUSER

답변함 2년 전
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.

답변함 2년 전
0

@REDACTEDUSER

답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠