Accept/Validate player using playerSessionId and PlayerId - Accept Match?

0

Hey. Could do with assistance on something we're stuck on please folks.

We are using Unity and AWS GameLift. The process flow from Login to getting PlayerId, Making a match request and have the game session connection details returned to Unity (upon MatchmakingSucceeded status) is working OK - all using Lambda functions and AWS Gateway API endpoints. However, when a player uses those returned game connection details to connect to the game, only one player can join the game. I think it may be due to us not accepting/validating the player using the playerSessionId. I can't find the C# code to do this from Unity or Python code to create a lambda function which is called via an API endpoint. We are using FlexMatch so as far as I know, we have add code to Accept the Match?

ND Bhav
asked 10 months ago225 views
1 Answer
0

Hello, Remeber you can generate a Flex Match either for one player o for multiple players, when each player has a standalone client and they are looking for a match individually you will be using the single player flexmatch. After a match is found your game receives match results in a successful matchmaking event. Result data includes a list of all matched players and their team assignments Please Reference this documentation as a step by step guide on matchmaking workflow

AWS
answered 10 months ago
  • Thank you. It is the section of the docs that my question is related to: https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-client.html

    "Add code to your client service to handle a successfully formed match (status COMPLETED or event MatchmakingSucceeded). This includes notifying the match's players and handing off connection information to their game clients.

    For games that use Amazon GameLift managed hosting, when a matchmaking request is successfully fulfilled, the game session connection information is added to the matchmaking ticket. Retrieve a completed matchmaking ticket by calling DescribeMatchmaking. Connection information includes the game session's IP address and port, as well as a player session ID for each player ID. Learn more in GameSessionConnectionInfo. Your game client can use this information to connect directly to the game session for the match. The connection request should include a player session ID and a player ID. This data associates the connected player to the game session's match data, which includes team assignments (see GameSession)."

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