All posts
Under the hood

Closest, not random: how matchmaking actually works.

Tap “Play a random opponent” and it feels like the game pulls a name from a hat. There's no hat. Behind that one button is a small, deliberate system whose only job is to hand you the closest fair fight available right now — and never leave you on a spinner.

Two arcade cats face off as evenly-matched opponents, with a magnifying glass picking one player from a row of waiting tokens and a balanced scale below.

When you tap Play a random opponent, it feels like the game reaches into a hat and pulls out a name. It doesn't. There's no hat, there's no bot pretending to be a person, and the opponent you get is rarely random at all. Behind that one button is a system whose whole job is to find you the closest fair fight available right now. Here's what's really happening.

01You're matched on a rating you never see

Every player carries a hidden internal rating — a standard ELO number. It's the same number from the rating post: it climbs when you win, drops when you lose, and it's the honest record of how strong you actually are. Your trophy count is just the friendly, floored-at-zero version of it.

Matchmaking ignores trophies and XP entirely. It pairs on the raw internal rating, because that's the number that hasn't been rounded up to make anyone feel good. The first thing the matcher knows about you isn't your name or your level — it's your ELO.

02The ±100 bracket — a preference, not a wall

When you start a search, the backend looks at everyone else currently waiting and sorts them with two rules, in order:

// the entire ranking 1. within 100 rating points of you? → jump to the front 2. among those, who has waited longest? → oldest search wins

That's the whole thing. Closeness first, then patience. The subtle part is what ±100 is not: it isn't a hard wall. If the only other person searching is 400 points stronger, you'll still be matched with them. The bracket decides priority, not eligibility.

Given a choice, the game gives you a near-mirror opponent. Given no choice, it gives you a game anyway.

This is why “random matchmaking” is a slightly misleading name. On a busy night the system is almost surgical — there are plenty of tight matches to choose from. It only loosens up when it has to, and only as much as it has to.

03Step inside the room

Here's the waiting room as the matcher sees it. Set your rating, language and match length, and watch which waiting player it hands you — and why. Players who can't be paired with you grey out; near-mirror opponents inside ±100 get a green tag.

Try itThe matchmaking room
Your language
Questions

04Three things have to line up exactly

Rating decides who you'd prefer to play — but a few things have to match exactly before two people can share a game:

Everything else — your trophy count, your level, your win streak, your achievements — is irrelevant to who you're matched with.

05When nobody's there yet: the waiting room

A lot of the time you tap Play and you're matched instantly, because someone compatible was already waiting. But if the room is empty, the game doesn't spin in place hoping. It creates a lightweight search — not a match, just a little “this player is looking” record — and drops you into the waiting room.

Your search sits there until someone compatible shows up and pairs with it, at which point the backend builds the real match and slides you into the first question. Searches don't expire and they don't quietly time out. If you cancel, the record is simply deleted. There's no fake opponent spun up after thirty seconds to keep you company — the person on the other side is always a person.

06The unglamorous part: nobody gets double-matched

Here's a problem that sounds trivial and isn't. Two players, A and B, are waiting. At nearly the same millisecond, C and D both tap Play. Without care, C and D could both grab player A — and now A is matched into two games at once, or the database tears itself in half trying to resolve it.

Two taps, one millisecond
1

When a search picks an opponent, it locks that candidate and tells any other search running at the same instant to skip locked rows and move on.

2

So if C grabs A first, D doesn't fight over A — D simply looks past to the next-best waiting player and pairs with them. Two searches, two clean matches, zero collisions.

There's also a guard allowing only one active search per player per configuration, so you can't accidentally flood the room with duplicate copies of yourself. It's the kind of thing you never notice when it works — which is the point.

07Why “closest” matters more than “random”

The honest reason matchmaking pairs this tightly is the same reason trophies are floored at zero but the internal rating isn't: the system is built so the rating stays truthful. A close match is a meaningful match. When you beat someone within 100 points of you, that result actually says something about your skill, and your rating moves the right amount.

Hand people random opponents and the ladder turns to noise — you'd win a pile of blowouts, lose a few, and none of it would mean anything. So the next time a worthy opponent appears a second after you tap the button, know that it wasn't luck. The game looked at everyone in the room, found the person closest to your level who speaks your language and wanted the same length of game, made sure neither of you had blocked the other, and quietly handed you the fairest fight it could find.

The one-paragraph version

“Random” matchmaking pairs you on your hidden internal ELO, never trophies or XP. Among everyone currently waiting, the matcher prefers anyone within ±100 rating points of you, breaking ties by who's waited longest — but ±100 is a priority, not a wall, so a quiet room still gets you a game. Three things must match exactly: app language, match length, and no block between you. If nobody's compatible yet, you wait in a real search that never fakes an opponent, and a row-locking trick stops two players from ever grabbing the same opponent at once. The goal throughout is a close, meaningful match — because that's what keeps the rating honest. Not random. Closest.