Are playerSession mandatory?

Hi,

I am working on a collaborative realtime web platform,
and have a working prototype using AWS gamelift realtime server as a backend.

For the record, I basically reimplemented the realtime client SDK in JS, but that’s not the topic here.

My question is, from AWS gamelift point of view, do I need to create playerSessionId ?
I am for now correctly creating the gameSession and for each player a playerSession, but I don’t have any need related to matchmaking or to limit the number of players in my game, or even storing data along side the user. So I was thinking I could skip that part.

Am I safe by just not using playerSession, or should I except some side effects ?
For example, will a gameSession expires no playerSession is attached to it ?

Nope, they are not required for non-matchmaking game sessions.

For non-matchmaking game sessions, player sessions are there as a convenience for you to:

  1. Initialize/Store player data (backend service creates the player session with player data such as inventory array, currency values, etc.,)
  2. Autoscale fleets (CurrentPlayerSessions/AvailablePlayerSessions)
  3. Conduct analytics (How many concurrent players are online right now?)

Game sessions actually don’t expire very easily, unless you specifically terminate the game session (via ProcessEnding(). In RTS, terminating process is already handled for you so you don’t need to call System.exit(0) yourself.); of the top of my head, I can only think of these few ways for the game sessions to exit unexpectedly:

  1. Game server process crashed
  2. Game server is unresponsive to the GameLift process manager’s heartbeat, or returns false for heartbeats
  3. (Spot fleet only) Spot interruption

Also, if you could open source your JS client SDK that’ll be awesome for the community :slight_smile:

See other custom GameLift SDKs that the community contributed: GitHub - favoyang/awesome-gamelift: A curated list of awesome packages, articles, and other cool resources from the GameLift community.

Hi @JamesM_Aws , thanks for your answer.

I will try to spend some time trying to externalised it as a library.

Something that I am not sure, is regardling the licence.
In order to get it working, I am re-using the JavaScript protobuf file from the realtime web server (copied by sshed from the server).

I understand your concern, though I’m not an expert in this so I will refrain from giving any (il)legal advice. :stuck_out_tongue:

We do have plans to open-source the SDKs and protobuf models, so your concern should be addressed eventually. In the mean time, if you are really concerned about legal consequences, you could leave the file out of the repo, and provide instructions for folks on how to download the file (i.e. sshing to the script fleet).