How could the server retrieve matchmaking data about specific players?

0

Hello everyone, I am at a point where I can get players to connect to a game session that is created via FlexMatch. However, I am wondering how I can get the server to find out the assigned team from Flexmatch of a specific player when he/she connects to the server. I could modify my Lambda API to pass the team info in addition to the player session id back to the client and have the client pass the team info to the server when connecting, but I believe there is a security flaw in the sense that clients would then be able to pass whatever team info they want to the server. I have tried using the DescribePlayerSessions method in the GameLiftServerSDK, and then calling GetPlayerData on the Outcome object returned. The issue with this is that the player data string was empty. Is there a way to achieve what I am describing using built-in GameLift functions? Because I would prefer not to use another table in DynamoDb for this.

demandé il y a 4 ans240 vues
3 réponses
0
Réponse acceptée

The matchmaker data passed to your server contains the assigned teams: https://docs.aws.amazon.com/gamelift/latest/developerguide/match-server.html#match-server-data

You get this data via OnCreateGameSession/OnUpdateGameSession

When players arrive you can then match to their team via the player id.

Do you have a specific concerns or a workflow where you think this may not work for you? You can also get this data via DescribeGameSession.

répondu il y a 4 ans
profile picture
EXPERT
vérifié il y a un mois
0

Thank you Pip. At the moment I think the functions you listed out will work for me, I just did not know how to retrieve the matchmaker data until now.

répondu il y a 4 ans
0

[quote="chrisgong, post:1, topic:8192, full:true"] Hello everyone, I am at a point where I can get players to connect to a game session that is created via FlexMatch. However, I am wondering how I can get the server to find out the assigned team from Flexmatch of a specific player when he/she connects to the server. I could modify my Lambda API to pass the team info in addition to the player session id back to the client and have the client pass the team info to the server when connecting, but I believe there is a security flaw in the sense that clients would then be able to pass whatever team info they want to the server. I have tried using the DescribePlayerSessions method in the GameLiftServerSDK, and then calling GetPlayerData on the Outcome object returned. The issue with this is that the player data string was empty. Is there a way to achieve what I am describing using built-in GameLift functions? Because I would prefer not to use another table in DynamoDb for this. [/quote]

@REDACTEDUSER Link> https://docs.aws.amazon.com/gamelift/latest/developerguide/match-server.html I hope it helps.

répondu il y a 4 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions