Auto-Backfill Ticket Behavoir

A question since I’m getting confused about when auto-backfill tickets will get issued, and how they fill empty slots in a game.

Say we have client/server game using a FlexMatch matchmaking rule with min player count of 1, a max player count of 6, and with automatic backfilling enabled. And say the following events occur:

  1. Player A issues a matchmaking request.
  2. A server is activated, matched to player A. At this point I assume an auto-backfill ticket is also issued to try to fill the next 5 empty slots on the new server.
  3. Player A joins the server, and the player session is accepted.
  4. Player B issues a matchmaking request
  5. Player C issues a matchmaking request
  6. The auto-backfill ticket matches up Player B and Player C with Player A.
  7. Player B joins the server, and the player session is accepted.
  8. Player C joins the server, and the player session is accepted.

At this point, we have 3 players in the server, but we still need 6. I’m assuming another auto-backfilling ticket gets issued to try to fill the next 3 slots. Now say the following happens afterwards:

  1. Player A gets bored and leaves the game. Player A’s session is removed.
  2. Player D issues a matchmaking request.

The behavoir I’m seeing is that an auto-backfilling ticket gets issued at some point, and player D is matched to it, but the ticket still references Player A. The side-effect is that the server will never fill with 6 players.

How should I be handing this case? When Player A leaves the match I need to do something to purge the player from any matchmaking decisions.

Thanks,
Philip

Hi @Philipbeyond ,

The example/events in your post look correct to me.

Once a match is formed with auto-backfill enabled, an auto-backfill ticket is automatically submitted for that match. Then once that auto-backfill ticket is matched with another set of tickets, another autobackfill ticket is submitted. This continues until the session is completely filled.

Unfortunately, as you’ve noted, there is currently a limitation in auto-backfill when it comes to player-session removal. When a player is removed GameLift does not currently correct/re-submit the backfill ticket on your behalf.

The way to deal with this is on player removal:

  1. Call StopMatchmaking on the auto-backfill ticket to cancel the current auto-backfill ticket that has incorrect player information.
  2. Call StartMatchBackfill to submit a manual backfill ticket (with the updated player information)

After the manual backfill ticket is matched, GameLift will continue to submit auto-backfill tickets on your behalf (now with updated player information).

Thanks - that’s helps a lot.

I guess the’re still one edge case - a Player A leaves, but in the meantime GameLift has already matched Player D (with, again, a reference to Player A) before we get a chance to send out the correct StopMatchmaking call on the auto-backfill ticket.

As long as I send out that manual backfill ticket with the correct player information, GameLift will stop refering to Player A?

It’s unfortunate that the server-side RemovePlayerSession call doesn’t do this stuff under the hood.

Hey @Philipbeyond, yes thats correct.

As long as a manual backfill ticket is eventually submitted, Matchmaking will have an updated view of the Game’s state (the players currently in the session).

I’ve submitted a feature request to the GameLift team to improve this feature and update auto-backfill requests on player-session removal (GLIFT-16257)