Identify new matches from FlexMatch in standalone mode

0

Hi, I am trying to figure out how to make use of the match info returned by FlexMatch in standalone mode via the AWS SDK for each connected player.

MatchmakingTicket {
    ticket_id: Some(
        "00000000-0000-0000-00000000",
    ),
    configuration_name: Some(
        "default",
    ),
    configuration_arn: Some(
        "arn:aws:gamelift:eu-central-1:1234567890:matchmakingconfiguration/default",
    ),
    status: Some(
        Completed,
    ),
    status_reason: None,
    status_message: None,
    start_time: Some(
        DateTime {
            seconds: 1712061703,
            subsecond_nanos: 645999908,
        },
    ),
    end_time: Some(
        DateTime {
            seconds: 1712061704,
            subsecond_nanos: 49000024,
        },
    ),
    players: Some(
        [
            Player {
                player_id: "*** Sensitive Data Redacted ***",
                player_attributes: Some(
                    {},
                ),
                team: Some(
                    "default",
                ),
                latency_in_ms: None,
            },
        ],
    ),
    game_session_connection_info: None,
    estimated_wait_time: None,
}

How can I tell which match this refers to? E.g. I would expect a "match_id" to be returned to understand which players have been matched together and direct them to the same server.

Or, is this only possible processing events published to SNS instead of relying on the GameLift SDK?

zhed
asked a month ago57 views
2 Answers
1

How can I tell which match this refers to?

E.g. I would expect a "match_id" to be returned to understand which players have been matched together and direct them to the same server.

In Amazon GameLift's FlexMatch matchmaking system, the MatchmakingTicket you've shown does not directly contain a match_id as you might expect. Instead, when a match is successfully made, the ticket's status will change to COMPLETED, and you should find the connection information for the game session in the game_session_connection_info field. This field will contain the details necessary for players to connect to the game session, including the IP address and port, as well as a collection of player session IDs that are used to uniquely identify each player in the game session.


Or, is this only possible processing events published to SNS instead of relying on the GameLift SDK?

You can indeed use Amazon SNS to receive notifications about matchmaking events, including the completion of matchmaking tickets. This can be a convenient way to handle matchmaking events asynchronously. However, you can also use the GameLift SDK to poll for the status of matchmaking tickets and retrieve the game session connection information once the match is made.


You can use the game_session_arn and the player_session_id values to identify the match and the players in it.

profile picture
EXPERT
answered a month ago
  • Hi Osvaldo, thanks for the answer.

    when a match is successfully made, the ticket's status will change to COMPLETED, and you should find the connection information for the game session in the game_session_connection_info field

    Is this true for FlexMatch in standalone mode too? From what I understand (and observe), FlexMatch in standalone mode creates matches and offloads session assignment to the customer.

  • Yes, you are correct. In the standalone mode of AWS GameLift's FlexMatch, FlexMatch handles creating the matches and grouping players, but it does not perform the actual game session assignment itself. Instead, FlexMatch offloads the responsibility of provisioning game sessions and placing the matched players into those sessions to the customer's game server.

0

Thanks for confirming.

I believe then the answer for FlexMatch in standalone mode is to use match events posted to SNS (https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-events.html) as the describe_matchmaking API is unsuitable for identifying a match.

zhed
answered a month 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