MatchmakingV2, quickplay 1v1

I want to create simplest 1v1 matchmaking but docs are a bit incomplete especially Match Rulset json. Error I get is:

unable to create match ticket: invalid request: a match ticket could not be created: rule should have minimum 1 alliance

My ruleset:

{
    "alliance": {
        "minNumber": "2",
        "maxNumber": "2",
        "playerMinNumber": "1",
        "playerMaxNumber": "1"
    }
}

I’m also a bit confused about Sessions. Is it a session as a single party joining a match or definition for whole match?

Hi @kamyker ,
Can you share the game log so we can help troubleshoot further?

I’m also a bit confused about Sessions. Is it a session as a single party joining a match or definition for whole match?

It’s a game session, meaning the whole match.

Hi @kamyker
For the ruleset, the fields should be in camel_case. Please try to update your configuration to be something like this:

{
    "alliance": {
        "min_number": 2,
        "max_number": 2,
        "player_min_number": 1,
        "player_max_number": 1
    }
}

We are sorry that there’s confusion because the example in the documentation and in the admin portal use camelCase. If this is the case, we will improve the example.

Thanks @thoriq , that seems to finally create a matchmaking ticket but players seem to never match. Code that I used:

		string matchPoolName = "quickplay_1v1";

		MatchmakingV2CreateTicketRequestOptionalParams Optionals = new();
		ticketResponse = null;
		AccelBytePlugin.GetMatchmaking().CreateMatchmakingTicket(matchPoolName, Optionals, result => ticketResponse = result);
		while(ticketResponse == null)
			await UniTask.Delay(100);

		if(ticketResponse.IsError)
			Debug.LogError(ticketResponse.Error.Message);

		Debug.Log("ticketId: " + ticketResponse.Value.matchTicketId);
		bool matchFound = false;
		string sessionId = null;
		while(matchFound == false)
		{
			await UniTask.Delay(3000);
			AccelBytePlugin.GetMatchmaking().GetMatchmakingTicket(ticketResponse.Value.matchTicketId, result =>
			{
				if(result.IsError)
					Debug.LogError(result.Error.Message);
				
				matchFound = result.Value.matchFound;
				if(matchFound)
					sessionId = result.Value.sessionId;
			});
			Debug.Log("matchFound: " + matchFound);
		}

matchFound stays always false. My session template is max/min players = 2.

Found a fix, had to connect to the lobby service before matchmaking.

var lobby = AccelBytePlugin.GetLobby();
lobby.Connect();

No idea if that’s a bug or important detail missing in docs.

Great to hear that you found the fix!

Yes, this is expected behavior.
In order to start matchmaking, user doesn’t need to be connected to lobby. But, user needs to be connected to lobby to get OnMatchFound notification.

We will discuss internally on whether we will add more detail in the docs related to this. Thanks