- Le plus récent
- Le plus de votes
- La plupart des commentaires
You can check out GameLift Realtime Server, which supports managed game hosting using NodeJS.
You'd essentially provide GameLift with 1 or more javascript files, with hook definitions on what happens when player connects, when player sends a message, how to handle each message type, etc., and gamelift will take care of setting up the server process for you. See a sample code: https://docs.aws.amazon.com/gamelift/latest/developerguide/realtime-script.html
Then, you'll need to setup game clients using a C# client SDK to connect to the server using IP Address/DNS Name and port. See: https://docs.aws.amazon.com/gamelift/latest/developerguide/realtime-client.html. You can also write your client in other languages like JavaScript, others on the forum have done this before, see: https://forums.awsgametech.com/t/gamelift-realtime-server-rangeerror-max-payload-size-exceeded/11071/4
There is no officially supported NodeJS server SDK yet, (it's a popularly requested feature and is in our backlog), but you could SSH into a Realtime Server fleet instance and find the source code to see how Realtime server uses NodeJS to communicate with GameLift's onbox service.
Hi @REDACTEDUSER
These docs should answer your question directly:
- https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server.html
- https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-client.html
These docs may also be helpful:
- https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-interactions.html
- https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api-interaction-vsd.html
- https://docs.aws.amazon.com/gamelift/latest/developerguide/integration-testing-local.html
If you are using Lumberyard, Unity or Unreal, there are specific docs for those:
- https://docs.aws.amazon.com/gamelift/latest/developerguide/integration-engines-unity-using.html
- https://docs.aws.amazon.com/gamelift/latest/developerguide/integration-engines-setup-unreal.html
- https://docs.aws.amazon.com/gamelift/latest/developerguide/game-client-intro.html
There are also some good GitHub examples with step-by-step guide for you to follow to create an end-to-end game on GameLift:
- https://gamelift-persistent-workshop.workshop.aws/en/
- https://aws-samples.github.io/aws-gamelift-sample/en/intro/
- https://github.com/aws-samples/aws-gamelift-and-serverless-backend-sample
Let me know if you see any gaps in the documentations or if any parts are confusing to you, and we will fix them. If you have any other questions after going through these, feel free to ask!
To answer your question more directly... you'll probably need to do the following main things:
- Download and build the GameLift server SDK: https://aws.amazon.com/gamelift/getting-started/
- Include the Server SDK binaries into your game server, and setup calls such as
initSDK()
,processReady()
,processEnding()
etc. As well as defining the behaviors for when state changes, e.g.onStartGameSession
,AcceptPlayerSession()
etc. See: https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api-interaction-vsd.html - Setup your game backend to call GameLift AWS SDK APIs such as
StartGameSessionPlacement
,StartMatchmaking
,DescribeGameSession
,DescribePlayerSession
etc. DO NOT let your client assume your developer credentials and call GameLift directly for security purposes. - You need to setup a CloudFormation stack containing GameLift builds, fleets, queues, etc.: https://github.com/aws-samples/aws-gamelift-and-serverless-backend-sample
- Since you already have your own Matchmaking, you'll need to use queue placement to find the right server for your player. To do that, you need to setup a SNS notification to receive events when game session is placed for your players: https://docs.aws.amazon.com/gamelift/latest/developerguide/queue-notification.html
- You need to configure your client to call your game backend to call GameLift to get the game session connection information, e.g.
DescribeGameSessionPlacement
returns the IP/port for your client to connect to the server process
There are other minor things that I've omitted/missed, but these should be bulk of the work.
I have my backend (GameServer) in Nodejs and the Server SDK is supported only for C and C#, so I think I won't be able to take the advantage of GameLift hosting. :slight_smile:
Contenus pertinents
- demandé il y a 2 ans
- demandé il y a 4 mois
- demandé il y a 8 mois
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a 2 ans