I'm using LocalMultiplayerAgent for Windows to test my game server before pushing builds into PlayFab production environment and I've found that the gsdkConfig.json isn't produced as I expect.
My MultiplayerSettings.json contains the following at the top level:
"PortMappingsList": [
[
{
"NodePort": 56100,
"GamePort": {
"Name": "game_port",
"Number": 7777,
"Protocol": "UDP"
}
}
]
],
When "RunContainer": false,
LMA writes out a configuration similar to:
{
"heartbeatEndpoint": "127.0.0.1:56001",
"sessionHostId": "xxx",
"vmId": "xxx",
"logFolder": "C:\\GameLogs",
"certificateFolder": "C:\\GameCertificates",
"sharedContentFolder": "C:\\GameSharedContent",
"gamePorts": {
"game_port": "56100"
},
"publicIpV4Address": "127.0.0.1",
"gameServerConnectionInfo": {
"publicIpV4Adress": "127.0.0.1",
"gamePortsConfiguration": [
{
"name": "game_port",
"serverListeningPort": 56100
}
]
},
"fullyQualifiedDomainName": "localhost"
}
Here its using the public ports in the serverListeningPort
field and clientConnectionPort
is missing from the configuration completely. This causes GSDK from C++ to report 0 for the client port.
But when "RunContainer": true,
LMA writes out a configuration similar to:
{
"heartbeatEndpoint": "1.1.1.1:56001",
"sessionHostId": "xxx",
"vmId": "xxx",
"logFolder": "C:\\GameLogs\\",
"certificateFolder": "C:\\GameCertificates",
"sharedContentFolder": "C:\\GameSharedContent",
"gamePorts": {
"game_port": "7777"
},
"publicIpV4Address": "127.0.0.1",
"gameServerConnectionInfo": {
"publicIpV4Adress": "127.0.0.1",
"gamePortsConfiguration": [
{
"name": "game_port",
"serverListeningPort": 7777
}
]
},
"fullyQualifiedDomainName": "localhost"
}
The serverListeningPort
is as I expect here but clientConnectionPort
and still missing.
I'm getting configuration that I expect in production that looks something like:
{
"heartbeatEndpoint": "1.1.1.1:56001",
"sessionHostId": "xxx",
"vmId": "xxx",
"logFolder": "C:\\GameLogs\\",
"certificateFolder": "C:\\GameCertificates",
"sharedContentFolder": "C:\\GameSharedContent",
"buildMetadata": {},
"gamePorts": {
"game_port": "7777"
},
"publicIpV4Address": "2.2.2.2",
"gameServerConnectionInfo": {
"publicIpV4Adress": "2.2.2.2",
"gamePortsConfiguration": [
{
"name": "game_port",
"serverListeningPort": 7777,
"clientConnectionPort": 30000
}
]
},
"fullyQualifiedDomainName": "xxx-azurebatch-cloudservice.westus.cloudapp.azure.com"
}