Some observations about matchmaker and questionable behaviour that leads to very odd situations.
User is not required to keep their matchmaking ticket “alive”.
If a user queues for a particular mode, say a 1v1 and then immediately (before the matchmaker has assigned them to anything) quits their game or pulls the plug on the internet, there is no built in handling to invalidate their ticket (such as an inactivity timeout). This is bad for a few reasons:
- If the player loses connection or their game terminates for any reason, (unless specifically handled) their matchmaking ticket will sit in the queue until another player matches with them. At which point the player they matched with will enter an empty match.
- If the player loses connection or their game terminates for any reason, then they reconnect and queue again, they now have 2 tickets in the MM queue for the same mode. There is no deduplication happening on the matchmaker side. A single player could fill up the 1v1 queue with dead tickets and cause a poor MM experience for basically every other player queueing.
- Simply, it gives malicious users a very low effort avenue of attack against any games using the matchmaker in a client authoritive fashion.
- Using non-inactivity timeouts on tickets isn’t really an acceptable solution for this, since you don’t want to kick active players out of the queue just because they might be disconnected or malicious.
- Using cloud code and a “database” has been suggested as a way to get around this, but in my opinion, this should just be something that works in the matchmaker without creating another potential point of failure by the user (user being the game developers)
Suggestions:
- Force players to keep their MM tickets alive, at least by pinging their MM ticket every 15 seconds or so. If they have a connection outage and can’t make a single request in 15 seconds, it is fair they should be kicked out of the queue.
- Deduplicate tickets by user ID for the same mode to [help] avoid malicious behaviour.
Backfill tickets do not allow the same userId to enter an allocation they are already on the backfill ticket for
To me this behaviour is quite counter-intuitive. If a player already exists on the backfill ticket for a particular allocation, the player can not be backfilled into that allocation. This becomes problematic in cases of:
- The server does not properly handle the player disconnecting/leaving the game and the player remains on the backfill ticket.
- The player never joins the match after they are allocated to it (but are on the backfill ticket). I’d like to point out that the matchmaker sample code does not handle this situation at all, and instead that player will never be able to make it into their original match via the matchmaker.
- Lastly, it simply doesn’t offer the flexibility of allowing players to rejoin matches the relevant server thinks they should still be a part of (eg: a player disconnects, but the server still wants that player to rejoin the game, so they are left on the backfill ticket). The player existing on the backfill ticket should tell the matchmaker: “Hey, player xyz is on team red for this capture the flag match! If they queue CTF, please put them in this match!”, but instead it does the exact opposite and rejects that player from rejoining.
So, what’s actually happening in this situation? From the perspective of the matchmaker, when a player queues in this state, the matchmaker sees “the player is already in game x” and for some reason decides “I need to put them in a different game, or create a new one”. I can’t imagine it’s the intended behaviour of many multiplayer game devs that a single player be allocated into multiple matches in the same queue (or multiple matches at all).
Suggestion:
- The matchmaker backfills a queueing player into the same allocation they are already on a backfill ticket for (or at least give the option for this behaviour).
OR, perhaps optionally
- If the matchmaker finds that a player is already on a backfill ticket, the matchmaker scrubs the player off the existing matchmaking ticket they are a part of.
There is an odd bug with queueing for a pool with a minimum player count of 1
Not much to say about this one, this seems like a straight up bug. Steps to replicate:
-
Have a queue pool where only 1 player is required to start an allocation (should be a backfill ticket to fully replicate the conditions I’m seeing it occur under)
-
Servers should be unavailable (ie: new build that is not installed yet with forced update to new version)
-
Create a matchmaking ticket to enter that matchmaking queue, and wait.
-
If you wait for a decent period of time before the allocation is ready, you’ll instead see that the ticket got assigned to multiple allocations. I’ve seen this spin up up to 5 server allocations in response to a single matchmaking ticket.
-
[maybe relevant]: The allocated server should immediately create and add the player ID to the backfill ticket (this is what the sample code does, and may be a cause of general backfill bugs).
-
Here is an example:
-
Matchmaking ticket d2c33b27-1db0-4b7f-bae4-98158e2bf923
-
Resulted 2 match IDs being created in pool 8cb650c0-132f-4616-ba5a-ca7cb0978ed7
-
9e2f6a4a-12f8-4689-86a0-71debebb3a6f, 94cdf5a4-7272-4c2f-807f-c8b78f3f2ca8