在本地测试Gamelift,只能创建1个游戏会话?
我正在本地测试我们的应用程序,似乎我只能使用 Gamelift local 创建 1 个游戏会话。
所以我所做的就是在本地运行 gamelift,
java -jar GameLiftLocal.jar -p 9080
运行我用 C# 和 Unity 编写的自定义 gamelift 服务器 并使用 CLI 创建游戏会话
AWS gamelift create-game-session --endpoint-url http://localhost:9080 --maximum-player-session-count 2 --fleet-id fleet-123d
并首次运行,它成功并创建游戏会话。 当我通过发出上面相同的命令来创建另一个游戏会话时,它会导致
HTTP-Dispatcher - No available process.
为什么这是这样?我们可以在本地只创建一个游戏会话吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您尝试进行另一个游戏会话,则需要运行多个游戏服务器进程。
GameLift 可以通过从游戏服务器进程接收服务器端 API 调用来捕获游戏会话的状态。
我认为此图可以帮助您。:)
https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api-interaction-vsd.html
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
根据文档:
听起来您需要运行
GameLiftLocal
的多个实例。来源:https://docs.aws.amazon。 com/gamelift/latest/developerguide/integration-testing-local.html
According to the docs:
Sounds like you need to run multiple instances of
GameLiftLocal
.Source: https://docs.aws.amazon.com/gamelift/latest/developerguide/integration-testing-local.html