GameLift C++ Server SDK question

On GameLift Server API reference for C++: Actions ( GameLift Server API reference for C++: Actions - Amazon GameLift ) I can’t find the answer to a couple of questions.

  1. when a game is ended what should the server call? Should it call a RemovePlayerSession() for each connected player and system realizes the game is ended or is there a specific API call for this event?

  2. In the documentation ( How Players Connect to Games - Amazon GameLift ) I read that a GameSession could be customized with custom data. From the doc (" Add custom game and player data" paragraph): “Alternatively, you might use game properties to pass information that a game server needs when setting up a new game session, such as a game mode or map.” . How could I retrieve that custom data from my C++ server?

Thank you

  1. When your server detects the session is over, you call ProcessEnding ( if you are using a GameLift SDK prior to 4.0.1 you could call TerminateGameSession here). This is the signal to GameLift to terminate the GameSession which will also, I believe, terminate any active PlayerSessions.

  2. When GameLift places the game session, the properties are passed to you as part of the GameSession object in onStartGameSession callback. From that object you can get the GameProperties or GameSession data, depending on how you are modelling data.

This object is also available via the onUpdateGameSession call if you are using FlexMatch.

Thank you,

about 1, with your answer ( GameLift C++ Server SDK multiple games - #2 by Pip ) now I understand better how GameLift works.

about 2, thank you very much, I taken a quick look in the .h files of SDK and it seems I was able to find what I was looking for.

Thank you again.