lundi 23 mars 2015

What architecture is suitable for players matchmaking?


The system should match players to game rooms. When the room is ready it moves to a game server.



  1. Each game start request can have a list of prefered game servers and

  2. specifies exactly game mode (deathmatch, 5vs5, ...);

  3. a game mode can have min/max player count settings and timer (e.g. waits 30 sec for 10 players or for 5 players next 60 sec);

  4. there is a "friends deathmatch" mode - players get matched with their friends.


I think about different approaches.




  1. Have a list of all the matching requests and iterate it each time new item gets added or when any item signals timeout. But there could be too many waiting users (especially because of "friends deathmatch" mode) to iterate the whole list.




  2. Or have a list of rooms. New requests either get matched to any exisiting room or create a new one.


    a) the system can keep a user simultanously in multiple rooms (for features like prefered game servers and "friends deathmatch" mode) and remove him from all the rooms when any of his rooms starts;


    b) or is it better to determinate exactly one room for user preliminary?




I think I need to have each matching option as a seperate class and then combine them to avoid Dictionary<Dictionary<.., List<... nightmare but Im still not sure how to do it exactly.





Aucun commentaire:

Enregistrer un commentaire