Matchmaking Logic
Hi, i'm creating a ccg game but right now I need a little help about the matchmaking logic: I want to create a mm that is skill based and yes i've already read the documentation.
The problem is what to do when a player press the button "SEARCH FOR A MATCH". Assuming i've only one lobby for everyone:
I start searching in the room list then if I find a room with an ELO difference of 300 i join that room. If not i create a new room with a custom field with my ELO (to calculate the diff) but i want to search again in the room list after like 3 seconds increasing the Elo diff to 500, then again and again until i find a room or until someone joins mine.
Is this the right way to do it? Can i search and join a room if i'm already inside another?
Thanks in advance and sorry for my eng.
The problem is what to do when a player press the button "SEARCH FOR A MATCH". Assuming i've only one lobby for everyone:
I start searching in the room list then if I find a room with an ELO difference of 300 i join that room. If not i create a new room with a custom field with my ELO (to calculate the diff) but i want to search again in the room list after like 3 seconds increasing the Elo diff to 500, then again and again until i find a room or until someone joins mine.
Is this the right way to do it? Can i search and join a room if i'm already inside another?
Thanks in advance and sorry for my eng.
0
Comments

Hi @Shark812,
You have to make a choice when you can't find a suitable room the first time ("ELO difference of 300"):
1. Create a room and wait.
2. Change filter ("ELO difference") and repeat.
If you go with option 2, you have to set maximum number of trials, how far you should go. According to this nice answer of my colleague Tobias, the maximum number of relaxed filters should be proportional to the total number of games in the Lobby.
Anyway, the appropriate Lobby type is SQL here. For the ELO level of the room, you should make a custom room property visible to the lobby with one of the 10 reservered keys ("C0" .. "C9") and use SQL filter(s).Is this the right way to do it?
This is a difficult question to answer.Can i search and join a room if i'm already inside another?
The short answer is no. You will need two clients to be able to do that. Outofthe box when joined to a room the client is connected to GameServer and can't interact with MasterServer (LobbyLevel).0 
Ok so I will have only one SqL Lobby, but how to decide to pick the first or the second option? Because if a lot of client do the second option there will not be rooms to find.JohnTube said:You have to make a choice when you can't find a suitable room the first time ("ELO difference of 300"):
1. Create a room and wait.
2. Change filter ("ELO difference") and repeat.
I didn't understand thatJohnTube said:the maximum number of relaxed filters should be proportional to the total number of games in the Lobby
Thanks for the support!0 
Ok so I will have only one SqL Lobby, but how to decide to pick the first or the second option? Because if a lot of client do the second option there will not be rooms to find.
This is because you misunderstood the part where I explain when to stop changing filter and repeating the matchmaking.
So let's say you decide to have 3 "static" filters: 300, 500 and X.
If you find a game with ELO diff <= 300, join it
else if you find a game with ELO diff <= 500, join it
else if you find a game with ELO diff <= X, join it
else create a new game.
The number of maximum trials can be fixed or dynamic but you have to limit it somehow. It is also related to the nature of the filter, if you have constant values or if the filter value can be incremented using a known or calculated step.
Static/Constant: e.g. 1, 3, 5, 7.
Dynamic/Variable: e.g. f(0) = 1, f(i + 1) = f(i) + x, i <= N.Lets say there are 5 games total, you don't want to go through a max of 10 filters but if there are 100 rooms, you might search for a very specific skill value.
This is an example of heuristic on how to stop the matchmaking loop.1 
Thanks for the help, i will try with some fixed limit / filter quantity first. i hope this thread should help others!0