Does FlexMatch support StartMatchmaking where the team is already big enough to satisfy the rule used?

0

The game we are working on uses game servers for matches that may be 1-4 players (depending on the level in question.)

I would like to keep the client logic simple and always use matchmaking, even if it's a 1 player game, or a multiplayer game where we already have a full team ready.

When I attempt to StartMatchmaking with a number of players that matches the min/max settings of the rules, the ticket is stuck in SEARCHING state until timeout. Do I have to detect that I already have enough players and manually create the game session and player sessions in this case?

Thank you in advance for the help!

asked 6 years ago444 views
18 Answers
0
Accepted Answer

Hey @REDACTEDUSER

Thanks for trying out FlexMatch.

We are adding support for 1 player matches today as we have had a number of developers request the ability to quickly integrate FlexMatch into their clients via 1 player matches. Those changes are currently flowing out to all regions and should be available in all regions by the end-of-day tomorrow. Until then, you will see tickets stuck in searching until timeout.

FlexMatch will take all players on a matchmaking request and place them onto the same team. As such, you can submit a matchmaking request with each player you want on the team, and FlexMatch will find players to match against.

Let us know if you have any other questions!

answered 6 years ago
profile picture
EXPERT
reviewed 11 days ago
0

Hey @REDACTEDUSER

Please let us know if you have any more questions as you continue integrating GameLift and FlexMatch into your games.

answered 6 years ago
0

Sorry -- I was more optimistic about our rollout times than I should have been. I anticipate this being in all regions by end-of-day tomorrow.

answered 6 years ago
0

Ah, so the confusion here is that you think there are multiple teams. The game only has 1 team per instance.

When I do the matchmaking, I am passing in 1..X players for that 1 team. In some cases, the team is already full of enough players before I start matchmaking (maybe I've invited enough friends to fill up the team). In such a case, I still want to use FlexMatch because then I deal with one flow (StartMatchmaking, DescribeMatchmaking, etc.) instead of having a separate flow where I CreateGameSession, CreatePlayerSessions, and so forth.

When I call StartMatchmaking with 1 team of X players, where X == the Min/MaxPlayers in my RuleSet, I am stuck in SEARCHING.

As an example, here is the ruleset I am using for a 2 player match. If I call StartMatchmaking from 1 client with 2 players, it gets stuck in SEARCHING. If I call StartMatchmaking from 2 clients with 1 player each, it moves on to PLACING.

    {
"name": "match-by-questId-2",
"ruleLanguageVersion": "1.0",
"playerAttributes": [{
"name": "questId",
"type": "string"
}],
"teams": [{
"name": "players",
"maxPlayers": 2,
"minPlayers": 2
}],
"rules": [{
"name": "SameQuestId",
"description": "Only match players when they're trying to play the same quest/game type.",
"type": "comparison",
"operation": "=",
"measurements": ["flatten(teams[*].players.attributes[questId])"]
}]
}

answered 6 years ago
0

That all makes sense. The case I'm having trouble with is 1 team, and I know all the players. (See below for my ruleset)

Also, thank you so much for all the help.

answered 6 years ago
0

Awesome, it's good to know that it's not a known limitation (aside from the case of N=1, which sounds like is going to change soon!) Very promising. :) Thanks again for the help.

answered 6 years ago
0

Re: 1 player matches, that sounds great, thanks.

For the second part - it sounds like you are saying I can't use matchmaker to start a match if my team is already the correct size? But that I could use matchmaking by splitting the start call call into multiple calls (one per team member)? I suppose I would then match them back together via some player attribute (team id)?

answered 6 years ago
0

NB: My confusion is that if I have a 2 player game, and call StartMatchmaking with 2 players listed, it also gets stuck in SEARCHING.

answered 6 years ago
0

I am saying the opposite -- if you know all the players that you want to be together on a team, you submit all of them on a single ticket, and then the matchmaker will find players for the other team (assuming you have a match with 2 teams).

If you have all of the players you want for both teams, FlexMatch won't be able to put the teams together in the same match -- you would need to just start your game session by creating it and the player sessions directly.

Does that help?

answered 6 years ago
0

How many teams do you have in your ruleset? Two teams with 1 player each? If that is the case, then submitting a single ticket with 2 players will not match (and should return an error). If you send me your matchmaker name and rule set name, I can better help you out.

answered 6 years ago
0

Ok, got it -- thanks for bearing with me here!

You should still be able to have just the one flow because all of the players passed in on that ticket will all be placed into the same match. If you start the match with maxPlayers, it should start immediately.

My thought here is that you might be hitting the 'nth' case of the min=max=1 case that we addressed today that I mentioned earlier. I will investigate and see what's going on here.

answered 6 years ago
0

We investigated, and it turns out that it is actually due to a confluence of three things:

  1. You are making party requests (multiple players on a ticket)
  2. questId is a string
  3. You are using a comparison rule The issue is itself is that to compare tickets to each other via the comparison rule during matchmaking, we have to reduce each ticket's playerAttributes to one value per attribute. If there are multiple people in a ticket (a party) then we have to know how to combine them which is controlled via the "partyAggregation" field for the comparison rule type. The default for partyaggregation is average.

Right now, you when you send in two players on the same ticket, we try to take the average of your two questId strings and do not handle that well.

While we fix that, you could override the default averaging for partyAggregation to do a min or a max operation instead, since those operations are valid for string comparisons.

See "Comparison rule (comparison)" in our documentation.

We will update the documentation when we decide how we want to handle taking the average of strings, but in the meantime, can you work around the issue by doing a min/max operation for partyAggregation instead?

Sorry for the inconvenience here!

answered 6 years ago
0

@REDACTEDUSER

My ruleset there looks like this:

    {
"name": "match-by-questId-1",
"ruleLanguageVersion": "1.0",
"playerAttributes": [{
"name": "questId",
"type": "string"
}],
"teams": [{
"name": "players",
"maxPlayers": 1,
"minPlayers": 1
}]
}

answered 6 years ago
0

Ok great, no worries, I know how that goes. :)

answered 6 years ago
0

Just wanted to follow up and say that 1 player matches are now working for me as well. Very happy that I can use one approach on all of the match types. :) Thanks again!

answered 6 years ago
0
		"teams": [{
"name": "guardians",
"maxPlayers": 3,
"minPlayers": 3
}],
"expansions":[{
"target":"teams[guardians].minPlayers",
"steps":[{
"waitTimeSeconds":10,
"value": 2
},{
"waitTimeSeconds":20,
"value": 1
}]
}]
if its not a joke, then just read very attentive to rule set expansions and make something like that
answered 6 years ago
0

Glad to hear we were able to get you unblocked! Let us know if you have any more questions.

answered 6 years ago
0

Hey @Matchmaker, I think we reached max reply depth. :)

I tried your advice to use playerAggregation="max/min" and am now getting into PLACING for games where I'm submitting a team of players equal to the min/max of the ruleset. So thank you! :) Once the N=1 case works in my region (I'm in US-EAST-1 fwiw), and I solve some issues with my game server startup process, I'll be good to go.

Thank you again for your help!

answered 6 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions