Javascript as a Game client for a Gamelift Server

Hi, Does anyone have experience in making a game in Javascript with Amazon gamelift as the Gameserver?

If yes, i am not able to find the correct API documentation for Browser javascript which I can use to make calls(of some sort) to Gamelift gameserver to create new session or join a session?


GameLift offers its ‘Realtime’ product which is a packaged node server with all the configuration points ready for your scripts

This is probably the easiest place to start unless you want to write your own javascript server SDK and keep it up to date.

There are also some open source projects like which also could be useful

Thanks for the Reply. Let me rephrase slightly: My scenario is, If i have a gamelift server as a game server, what API or services it offers so a javascript client can connect to it. So the whole point is does Gamelift offer any Javascript APIs for Client to consume and do the casual Match Making, Session, Presence, broadcasting information to all clients etc.

Your Javascript clients should consume either the general AWS Javascript SDK parts required ( or call through a ‘client service’

Your clients should use the Javascript SDK as with any GameLift integrated client to trigger calls to

  • StartMatchmaking and handle getting the results to get game session details to join
  • Join the game session directly or call CreatePlayerSession etc.


For reference an overview of whats required is here:

As opposed to bringing up a new thread, is there anyone that can shed more light on this? Neither of the answers above appear to have addressed the question - or I’m totally missing something.

There appears no code in the AWS SDK linked above ( that is for the client - only code for the client service.

a) We can already create the GameServer code in NodeJS
b) We have already created the client service using the provided SDKs
c) We can test this by creating a CLIENT in Unity using the " GameLift Realtime Client SDK"
c) But can we create the CLIENT in JavaScript? Is there an SDK or other solution that will do that? Or are the only solutions c# based?


@Robbie - It sounds like you are trying to use GameLift realtime with a Javascript client and need a GameLift realtime client in javascript?

Unfortunately there is no official GameLift Realtime client in Javascript as you’ve noticed here:

I will let the GameLift service team know of your interest in one.

The current SDK is dotnet core only, so you could:

  • Wrap it or your application to consume it (which may not be possible for browser based games etc) but depending how you distribute your client it may be possible.
  • Rebuild it for javascript (obviously would be unsupported) but its a simple message parsing system that should be fairly straightforward to use. Would require:
  1. A websocket in javascript
  2. The ability to send messages over those websockets based on the protobuf definition in the C# SDK
  3. A generated set of javascript wrappers based on that protobuf definition
  4. Some specialty message handling (ie Login/connection logic) ported from the C# SDK; Co

Complexity is reduced if you don’t use udp here but again that depends on your use case.

Obviously some caveats here:

  • There would be no official support for your client and help may be limited.
  • The protobuf file could change but it should generally be backwards compatible
  • Realtime is not built for very high speed / large data synchronization between client and servers, I would definitely experiment quickly wrt to your network transfer rate/load to see if Realtime is the right solution for your needs.

Someone recently took this on in this thread for C++ here: Connecting to the RealtimeScript-based server after reserving a game session successfully

Neither are great answers so I am sorry about that.


Thanks for reconfirming. So same as a year ago :frowning:

I was hoping someone had a prototype project already in place to piggyback off / contribute to. I already have a one-way mock using HTML into a node script on the server - but that’s push only. The socket solution in JS would be so perfect (not least for local testing as well).

Thanks for confirming