A distributed match-making service – part 1

One feature that I’ve been always fascinated about MOBAs and online games in general, is how I could simply tap a button on my game, and after some (usually short) time of a “Searching…” on my screen, I would be paired with people with skill similar as mine and wanting to play the same game mode as me. These are the match-making services doing their work.

DotA2 match-making

What magic happens on the back end to make this possible? I decided to try to discover and make my own match-making service.

Is there any match-making service already?

Whenever I consider making something from scratch, I try to measure the pros and cons of existing solutions:

  • Hydra from Agora(Warner Bros) – Hydra looks very promising by the description, but has no download or buy option. It might be limited to partners only.
  • Google Game Services – GGS is extremely reliable, as it’s hosted by the tech giant. But players need to be playing with a Google account (might be completely OK on a phone, but not over desktop or web), it also don’t have a much flexible match making system (you can only provide a exclusion bitmap for a player).
  • Unity Multiplayer – your game must be made in Unity. That’s a deal breaker for a lot of people that use other platforms to develop their games. It’s hosted on Unity back end and you can’t host your own server, just like Google Game Services, but you pay per bandwidth, and it’s said that that makes it more expensive than Google Game Services.
  • Steamworks – definitive winner. You probably already played tons of game that use it (L4D, CSGO, TF). It simply works, it is flexible. But you need to work with steam. That might be OK for most, but if you still haven’t been greenlit, or you plan to have your game on the web/phones, it suddenly not for you anymore.

Simple state: I want a service that I send a request saying who am I, and what modes I want to play. Some time later that request must be answered with who I have paired which, and with which server should I continue the conversation to start my game.

What do I need in a match-making service, that the others don’t offer?

  • Simplicity and not platform dependency: Make a request from whatever system or platform you are, whatever engine or language you’re making your game on, and the answer should come.
  • No previous assumptions: does it even need to be a game? I should be able to even match chat users, in a “chatroulette-like” fashion, using their preferences (language, location) and make rooms for them.
  • No bundled services: Single sign on with Google or Steam, achievements, having to use a peer to peer server, online quests and hooks… What if I don’t want none of that, but match my players and then let another server (which you probably already have) take care of the rest?

That was enough to make my mind set that maybe this is a good idea, and over the next post we’ll start laying out what should a match-making request look like. This will give us a heading to the answers on how to implement this system.

You can find part 2 here: http://blog.tavomaciel.com/2017/01/distributed-match-making-2/