Testing Gamelift in local, can only create 1 game session?

838 views Asked by At

I am testing our application in local, and it seems like i can only create 1 game session using Gamelift local.

so what i did is I run gamelift local

java -jar GameLiftLocal.jar -p 9080

run the custom gamelift server i wrote in C# and Unity and use CLI to create game session

AWS gamelift create-game-session --endpoint-url http://localhost:9080 --maximum-player-session-count 2 --fleet-id fleet-123d

and first run, it succeed and creates the game session. when I create another gamesession by issuing the same command above it results to

HTTP-Dispatcher - No available process.

Why is this? can we only create one Game Session in local?

2

There are 2 answers

0
jinsengparkk On

If you are trying to make another game session, you need to run multiple game server processes.

GameLift can catch the game session's status by receiving Server-side API call from game server process.

I think this diagram can help you.:)

https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api-interaction-vsd.html

0
BatteryAcid On

According to the docs:

Each server process should only host a single game session.
...
When testing locally with GameLift Local, you can start multiple server processes. Each process will connect to GameLift Local.

Sounds like you need to run multiple instances of GameLiftLocal.
Source: https://docs.aws.amazon.com/gamelift/latest/developerguide/integration-testing-local.html