GameLift Hosting for existing game

0

How can I migrate my existing game to Amazon GameLift completely? To put it in an example, let's have a Ludo Game, now if I want to use FleetIQ I know I have to make few changes to my code and call 3-5 API RegisterGameServer, UpdateGameServer, DeRegisterGameServer, etc to use the Fleet IQ feature.

Now if I want to use full-fledge GameLift as my hosting solution, how many changes I will have to make at the code or API level in my existing code/game assuming I have a matchmaking process in place in my code itself and it does not have any AWS or GameLift related logic/code/process inside.

질문됨 3년 전474회 조회
5개 답변
1

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.

답변함 3년 전
0

To answer your question more directly... you'll probably need to do the following main things:

  1. Download and build the GameLift server SDK: https://aws.amazon.com/gamelift/getting-started/
  2. 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
  3. 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.
  4. You need to setup a CloudFormation stack containing GameLift builds, fleets, queues, etc.: https://github.com/aws-samples/aws-gamelift-and-serverless-backend-sample
  5. 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
  6. 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.

답변함 3년 전
0

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:

답변함 3년 전
0

Thank you James for your Prompt response.

답변함 3년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠