By using AWS re:Post, you agree to the AWS re:Post Terms of Use

Matchmake based on Game Session Properties

0

Hi, Is it possible to set up the GameLift FlexMatch ruleset to match players based on a game session's properties? For example, if I create a game session as follows:

create_response = gamelift.create_game_session(
    FleetId='fleet-id',
    MaximumPlayerSessionCount=10,
    GameProperties=[
        {'Key': 'mode', 'Value': 'tournament'},
        {'Key': 'tournament_id', 'Value': tournament_id}
    ]
)

Can I put a ruleset in the matchmaking configuration like this:

"rule": {
  "attribute": "gameSessionProperties.mode",
  "comparisonOperator": "EQUALS",
  "value": "free"
}

So that GameLift does NOT place players in the game session with the game property mode field set to "tournament". I know that this is not the correct coding syntax for setting the rule. But just wondering if this is possible.

Thanks!

asked a month ago19 views
1 Answer
0
Accepted Answer

Unfortunately, it is not possible to set up a FlexMatch ruleset to match players based on a game session's properties in the way you've described. FlexMatch is designed to match players based on player attributes and team compositions, not on game session properties.

FlexMatch works by evaluating player attributes and forming matches before a game session is created or selected. The matchmaking process occurs independently of game session creation and properties.

When you create a game session with specific properties (like 'mode' and 'tournament_id' in your example), these properties are used to configure the game session itself, but they are not directly accessible to the FlexMatch matchmaking rules.

Instead of trying to match based on game session properties, you could consider the following approach:

  1. Use player attributes to represent the game mode or tournament preferences.
  2. Set up your matchmaking rules to group players based on these attributes.
  3. After a match is formed, use the matched players' attributes to determine the appropriate game session properties when creating or selecting a game session.

For example, you could include a player attribute like "preferredMode" in your matchmaking request, and then use that in your ruleset:

"rules": [{
  "name": "mode-matching",
  "type": "comparison",
  "attribute": "preferredMode",
  "operation": "=",
  "value": "tournament"
}]

This would ensure that players are matched based on their preferred mode. Then, when creating the game session for the matched players, you can set the game session properties based on the matched players' attributes.

Remember, FlexMatch is primarily focused on grouping players together based on their attributes and your defined rules. The actual placement into a game session happens after the match is formed.
Sources
Buiding a Amazon GameLift FlexMatch matchmaker - Amazon GameLift
Adding FlexMatch matchmaking - Amazon GameLift
MatchmakingRuleSet - Amazon GameLift

profile picture
answered a month ago
profile picture
EXPERT
reviewed 21 days 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