GameLift local is a local simulation of GameLift that enables you to test most parts of GameLift outside of FlexMatch and process termination (both are highly requested features that hopefully will get added some day).
You should be able to easily test:
- Server initialization
- Game session creation
- Player connecting with that game session.
For example I do the following all the time (all cribbed from here: https://docs.aws.amazon.com/gamelift/latest/developerguide/integration-testing-local.html)
Start GameLift local (note am using port 9080, defaults to 8080 if -p is not provided)
cd C:\Amazon\GameLift_04_16_2020\GameLiftLocal-1.0.5 java -jar GameLiftLocal.jar -p 9080
Start my server (in this case I'm using Lumberyard so I tell it the port to use; ignore the rest of the params as they aren't important. Note: If your server needs to call GameLift then it needs to override the client config to be the local endpoint
MultiplayerSampleLauncher_Server.exe +sv_port 33435 +gamelift_start_server +map MultiplayerSample
Now in Lumberyard local I should see my server connect, call InitSDK and ProcessReady and my server is now ready to host a game session.
Now am going to place a session on gamelift local; not fleet id is immaterial here can be anything
aws gamelift describe-game-sessions --endpoint-url --endpoint-url http://localhost:9080 --fleet-****** aws gamelift create-game-session --endpoint-url http://localhost:9080 --maximum-player-session-count 2 --fleet-******
Should see GameLift local calling OnGameSession hooks in my local server and server than calling ActiveGameSession when ready. Returns the game session id
Create a player session if required (using game session id from create game session call)
aws gamelift create-player-session --game-session-id "arn:******
How you test client/server connection is then up to you've wired getting game session/player session ids to your client.
If you client needs to call GameLift to get this information (ie describe game session/player id) then you'll need to overide its client config to talk to GameLift etc
Your client at this point should get the ip address of the session and its port and connect via its normal route. If your client is failing at this point, check all the normal client/server connection troubleshooting spots:
- Your server is listening on the port that it reported in ProcessParameters
- Your game session is reported to be on that port
- The client is using the right port
- If you are using TLS/OpenSSL you have your certs correctly installed for communication
- Your server is accepting connections etc.
Information about GameLift localasked 2 years ago
Gamelift DescribePlayerSessions and synchronizationAccepted Answerasked 8 months ago
Gamelift and game state management?Accepted Answerasked 2 years ago
Rust and AWS GameLift Server SDKasked 2 years ago
A process unrecognized by GameLift is attempting to make GameLift Server SDK API calls. Are you using a process launcher?Accepted Answerasked a year ago
Does Amazon GameLift have peer-to-peer services?asked a year ago
Logging and Monitoring with GameLiftasked a year ago
Amazon GameLift now supports AWS Local Zonesasked 3 months ago
What exactly is the difference between Custom vs Realtime servers in gamelift?asked 9 months ago