Question of group matchmaking in an example of "players vs monster" again

HI everyone

(I posted this question a couple of days ago but the post had incorrect text and I couldn’t fix it.)

I’m currently testing group matchmaking in the example of “players vs monster” below.
Actually the example, “players vs monster”, has 5 players and 1 monster but I changed the number of players into 4.

5 users in a group, where one of the users is a “monster”, which causes group-matchmaking to fail.

The matchmaking rule set below, is shown.

Code below, is in Lambda to request matchmaking. “Eedro” is monster and the rest of users are players. (I put users’ names in this Lambda code for an example)
Group member are using the same matchmaking ticket id.

playerAttr = { “WantsToBeMonster” : { “N” : int( 1 ) } }
playerAttrEedro = { “WantsToBeMonster” : { “N” : int( 2 ) } } =====> Eedro is “monster”

playersInformation = [
{ “PlayerId” : “Aedro”, “PlayerAttributes” : playerAttr },
{ “PlayerId” : “Bedro”, “PlayerAttributes” : playerAttr },
{ “PlayerId” : “Cedro”, “PlayerAttributes” : playerAttr },
{ “PlayerId” : “Dedro”, “PlayerAttributes” : playerAttr },
{ “PlayerId” : “Eedro”, “PlayerAttributes” : playerAttrEedro } ] =====> Eedro is “monster”

match_response = gl_client.start_matchmaking(
ConfigurationName = globalConstants.GetConfigurationName(),
Players = playersInformation,
TicketId = matchmakingTicketId )

The code is called 5 times with the same matchmaking ticket id because the group has 5 members.

Besides, I removed monster team in the matchmaking rule set like another rule below and changed the number of “maxPlayers” and “minPlayers” to 5

image

In this rule set, group matchmaking works.

So what is a problem with the group-matchmaking including monster?

Any help is appreciated.
Thanks

  1. Not that it should impact your example, but if you are using 1=not monster 2=monster, then the default attribute value for wantsToBeMonster should be 1

  2. Your player attribute is wantsToBeMonster, but you are sending WantsToBeMonster. I would assume FlexMatch is case sensitive and needs them to match exactly.

  3. Unfortunately, I don’t have any FlexMatch examples to hand, and it looks like you’re using the boto3 client. Its documentation shows numbers being passed as quoted strings ie “wantsToBeMonster”: {“N”: “2”}. Not sure it should make any difference but it may be worth eliminating as a reason (I would assume that FlexMatch should handle ints and strings representing ints identically)
    https://botocore.amazonaws.com/v1/documentation/api/latest/reference/services/gamelift.html#GameLift.Client.start_matchmaking

Thank you very much.

I fixed everything that you mentioned but in terms of “wantsToBeMonster”: {“N”: “2”}, CloudWatch reported “<class ‘botocore.exceptions.ParamValidationError’>”. So I used integer. Unfortunately, the matchmaking didn’t work. I’m using “import boto3” in Lambda function.

Could you investigate what was wrong with the matchmaking? After the matchmaking didn’t work, I have not touched anything in the fleet.

FleetId: fleet-225aebc0-bd5a-45ff-a1dc-fe2f2c60f647
Matchmaking Queue ARN : arn:aws:gamelift:us-west-2:349311851841:gamesessionqueue/THEEND-Guaranteed-mskiller-Dev-TEST

In addition, a matchmaking rule that I mentioned in this post is a little bit different than an actual matchmaking rule in Matchmaking Rule Set.

I appreciate your help.

Hi-

I can take a look at this for you. Can you get me a little info that would help me investigate this more efficiently?

  1. The exact rule set you are using right now
  2. The ticket ids that you expected to match together
  3. The approximate time (hour at least) when you made these tickets (UTC timezone)

Should only take a few mins with that info.

-Brian

  1. The exact rule set you are using right now
    This below, is my matchmaking rule set in GameLift. I uploaded the matchmaking rule set through AWS CLI. So the matchmaking rule set doesn’t have any Carriage Return(\r), Line Feed because the AWS CLI reported errors related to them.

{“ruleLanguageVersion”:“1.0”,“playerAttributes”:[{“name”:“score”,“type”:“number”,“default”:1000},{“name”:“WantsToBe”,“type”:“number”,“default”:1}],“teams”:[{“name”:“Human”,“maxPlayers”:4,“minPlayers”:4},{“name”:“Monster”,“maxPlayers”:1,“minPlayers”:1},{“name”:“Spectators”,“maxPlayers”:5,“minPlayers”:0}],“rules”:[{“name”:“HumanSelection”,“description”:“Onlyusersthatrequestplayingasmonsterareassignedtothemonsterteam”,“type”:“comparison”,“measurements”:[“teams[Human].players.attributes[WantsToBe]”],“referenceValue”:1,“operation”:"="},{“name”:“MonsterSelection”,“description”:“Onlyusersthatrequestplayingasmonsterareassignedtothemonsterteam”,“type”:“comparison”,“measurements”:[“teams[Monster].players.attributes[WantsToBe]”],“referenceValue”:2,“operation”:"="},{“name”:“SpectatorsSelection”,“description”:“Onlyusersthatrequestplayingasmonsterareassignedtothemonsterteam”,“type”:“comparison”,“measurements”:[“teams[Spectators].players.attributes[WantsToBe]”],“referenceValue”:3,“operation”:"="}]}

This below, is readable.

{
    "ruleLanguageVersion":"1.0",
    "playerAttributes":
    [
            {
                    "name":"score",
                    "type":"number",
                    "default":1000
            },
            {
                    "name":"WantsToBe",
                    "type":"number",
                    "default":1
            }
    ],
    "teams":
    [
            {
                    "name":"Human", =====> I changed an original name to "Human" for security of our game.
                    "maxPlayers":4,
                    "minPlayers":4
            },
            {
                    "name":"Monster", =====> I changed an original name to "Monster" for security of our game.
                    "maxPlayers":1,
                    "minPlayers":1
            },
            {
                    "name":"Spectators", =====> I changed an original name to "Spectators" for security of our game
                    "maxPlayers":5,
                    "minPlayers":0
            }
    ],
    "rules":
    [
            {
                    "name":"HumanSelection", =====> I changed an original name to "HumanSelection" for security of our game
                    "description":"",
                    "type":"comparison",
                    "measurements":["teams[Human].players.attributes[WantsToBe]"], =====> I changed an original name to "Human" for security of our game
                    "referenceValue":1,
                    "operation":"="
            },
            {
                    "name":"MonsterSelection", =====> I changed an original name to "MonsterSelection" for security of our game
                    "description":"",
                    "type":"comparison",
                    "measurements":["teams[Monster].players.attributes[WantsToBe]"], =====> I changed an original name to "Monster" for security of our game
                    "referenceValue":2,
                    "operation":"="
            },
            {
                    "name":"SpectatorsSelection", =====> I changed an original name to "SpectatorsSelection" for security of our game
                    "description":"",
                    "type":"comparison",
                    "measurements":["teams[Spectators].players.attributes[WantsToBe]"], =====> I changed an original name to "Spectators" for security of our game
                    "referenceValue":3,
                    "operation":"="
            }
     ]

}

  1. The ticket ids that you expected to match together
    MatchmakingTicketId : 5dbcb6198fd41947b8002f725dcb1e7890eab (Five users who named ‘Aedro_5’, ‘Bedro_2’, ‘Cedro’, ‘Dedro_3’, ‘Eedro_4’ in the same group were using this TicketId.)

These information below, is for Players parameter in start_matchmaking function in Lambda.

  • Aedro_5 : [{‘PlayerId’: ‘Aedro_5’, ‘PlayerAttributes’: {‘score’: {‘N’: 1000}, ‘WantsToBe’: {‘N’: 1}}}, {‘PlayerId’: ‘Bedro_2’, ‘PlayerAttributes’: {‘score’: {‘N’: 1000}, ‘WantsToBe’: {‘N’: 1}}}, {‘PlayerId’: ‘Cedro’, ‘PlayerAttributes’: {‘score’: {‘N’: 1000}, ‘WantsToBe’: {‘N’: 1}}}, {‘PlayerId’: ‘Dedro_3’, ‘PlayerAttributes’: {‘score’: {‘N’: 1000}, ‘WantsToBe’: {‘N’: 1}}}, {‘PlayerId’: ‘Eedro_4’, ‘PlayerAttributes’: {‘score’: {‘N’: 1000}, ‘WantsToBe’: {‘N’: 2}}}]
  • Bedro_2 : [{‘PlayerId’: ‘Bedro_2’, ‘PlayerAttributes’: {‘score’: {‘N’: 1000}, ‘WantsToBe’: {‘N’: 1}}}]
  • Cedro : [{‘PlayerId’: ‘Cedro’, ‘PlayerAttributes’: {‘score’: {‘N’: 1000}, ‘WantsToBe’: {‘N’: 1}}}]
  • Dedro_3 : [{‘PlayerId’: ‘Dedro_3’, ‘PlayerAttributes’: {‘score’: {‘N’: 1000}, ‘WantsToBe’: {‘N’: 1}}}]
  • Eedro_4 : [{‘PlayerId’: ‘Eedro_4’, ‘PlayerAttributes’: {‘score’: {‘N’: 1000}, ‘WantsToBe’: {‘N’: 2}}}]
  1. The approximate time (hour at least) when you made these tickets (UTC timezone)
    => 2019-11-12 13:04 UTC-8, I grabbed this time in CloudWatchEvent after talking to FlexMatch about my matchmaking.

Thank you very much for helping me

Hi-

One thing I see is that you mention all of the players were submitted in the same ticket id. If that’s true, this ticket will never find a match. This is because the rules force that players on the same team have the same WantsToBe value, and everyone submitted on the same ticket (“party”) will be placed on the same team.

I am not sure that we have this super-clearly spelled out, but here’s the relevant part of the documentation:

https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-match.html

Support player parties. Generate matches for a group of players who want to play together on the same team. Find additional players to fill out the match as needed.

Does this explain things?

ps, I will followup and see if we can get this clarified in the documentation a bit better!

Thank you very much and I’m reading the document that you mentioned.

I’m sorry that I didn’t mention “WantsToBe”. One of members requested group matchmaking with different value of “WantsToBe” (Monster is number 2) below. Other users requested the group matchmaking with number 1 as “WantsToBe” (Human is number 1).

Could you explain what was wrong with this case?

It’s fine for those players to have different WantsToBe attributes, but the important thing to understand is that all players submitted in the same StartMatchmaking request will be placed on the same team. However, your rule set says that everyone on the same team must have the same WantsToBe value. This conflicts with submitting players with different WantsToBe values on the same ticket, so you will never find a match (the players on that ticket have to be put on the same team, but your rules don’t allow that). If you submit all players on 5 separate StartMatchmaking requests you should have better luck.

Thank you very very much. I totally understood what was meaning of “teams” in matchmaking rule set and what was wrong with my matchmaking rule set.