Stormancer.Server.Plugins.GameSession
6.1.1.15
See the version list below for details.
dotnet add package Stormancer.Server.Plugins.GameSession --version 6.1.1.15
NuGet\Install-Package Stormancer.Server.Plugins.GameSession -Version 6.1.1.15
<PackageReference Include="Stormancer.Server.Plugins.GameSession" Version="6.1.1.15" />
paket add Stormancer.Server.Plugins.GameSession --version 6.1.1.15
#r "nuget: Stormancer.Server.Plugins.GameSession, 6.1.1.15"
// Install Stormancer.Server.Plugins.GameSession as a Cake Addin #addin nuget:?package=Stormancer.Server.Plugins.GameSession&version=6.1.1.15 // Install Stormancer.Server.Plugins.GameSession as a Cake Tool #tool nuget:?package=Stormancer.Server.Plugins.GameSession&version=6.1.1.15
This plugin adds support for P2P & client-server game sessions to a Stormancer application. It supports:
- P2P and Client/Server game sessions
- Electing an host in P2P game sessions
- Managing game servers (requires adding ServerPools.hpp to the game server)
- Game session startup/shutdown events
- Game session results aggregation and processing in P2P (allows comparing game results from all peers) and Client/server (only the server sends game results)
- Public or access restricted game sessions.
Setting up game servers
The gamesession system supports starting game servers to run the game session.
Development game servers
The development game server pool enables gamesessions to wait for the connection of a non authenticated gameserver to host the game session. This enables starting the game server manually from a developer computer, in the debugger or on the cmd prompt.The clients and game server uses the normal P2P connectivity system, supporting NAT traversal. This avoids the need of any configuration on the developer network.
ctx.HostStarting += (IHost host) =>
{
[...]
//Declares a development server pool named dev.
host.ConfigureServerPools(c => c.DevPool("dev"));
//Declares a gamesession type using the pool configured above.
host.ConfigureGameSession("gamesession-server", c => c
.UseGameServer(c => c
.PoolId("dev")
)
.CustomizeScene(scene=>scene.AddSocket())
);
[...]
}
Hosting game servers on local docker
The docker server pool enables game servers to be run as docker container on Stormancer cluster. Containers are automatically started on the node running the less game instances. Other policies could be put in place if necessary.
ctx.HostStarting += (IHost host) =>
{
[...]
//Declares a docker server pool named docker, that uses the image 'game-server-image:latest'
host.ConfigureServerPools(c => c.DockerPool("docker", b => b.Image("game-server-image:latest")));
//Declares a gamesession type using the pool configured above.
host.ConfigureGameSession("gamesession-server", c => c
.UseGameServer(c => c
.PoolId("docker")
)
.CustomizeScene(scene=>scene.AddSocket())
);
[...]
}
Other tasks are required to host game servers on docker:
Grid configuration
For the game servers to connect to the Stormancer cluster from inside docker containers, the grid nodes must not
be bound to localhost. They must publish public, or at least LAN IP addresses. To do that, in the node
configuration file, set both publicIp
and loadbalancedIp
to an interface accessible by docker containers,
for instance:
{
"constants": {
"host-ip" : "xxx.xxx.xxx.xxx"
"publicIp": "{host-ip}",
"loadBalancedIp": "{host-ip}",
[...]
Stormancer needs to associate local ports to the game server. To specify the range of ports to use, a delegated
transport entry must be added to the grid nodes configuration:
[...]
"endpoints": {
//udp transport
"udp1": {
"type": "raknet",
"port": "{udpPort}",
"maxConnections": 100,
"publicEndpoint": "{publicIp}:{udpPort}"
},
[...]
//delegated transport, allows specifying a pool of ports.
"public1": {
"type": "delegated",
"publicEndpoint": "{publicIp}",
"ports": {
"min": 42000,
"max": 44000
}
}
},
[...]
The node firewall must be opened for UDP in the range specified (42000-44000 in the example).
Secrets
Docker servers authentify with the grid using an encrypted token using the aes-gcm algorithm. The encryption key
is stored in a cluster secret store that must be created manually. The path to the key is specified in the
application' configuration in the gameServer
dataProtection policy:
{
[...]
"dataProtection":{
"gameServer":{
"provider":"aes-gcm",
"key":"my-account/my-secret-store/gameServer",
"createKeyIfNotExists":true
}
[...]
}
}
The secrets store must be created prior to application start. If the CLI plugin Stormancer.Management.CLI
is
installed, it can be created using the following command:
> dotnet tool run stormancer manage secrets-store create --cluster test --account my-account --id my-secret-store
Analytics
The plugin produces the following analytics:
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- Docker.DotNet (>= 3.125.12)
- MsgPack.Cli (>= 1.0.1)
- Stormancer.Abstractions.Server (>= 9.3.0)
- Stormancer.Server.Plugins.Api (>= 3.0.0.2)
- Stormancer.Server.Plugins.DataProtection (>= 2.0.1.4)
- Stormancer.Server.Plugins.Management (>= 3.0.2.5)
- Stormancer.Server.Plugins.Models (>= 3.0.3.8)
- Stormancer.Server.Plugins.Users (>= 8.0.0.2)
- System.Interactive.Async (>= 5.0.0)
- System.Linq.Async (>= 6.0.1)
NuGet packages (9)
Showing the top 5 NuGet packages that depend on Stormancer.Server.Plugins.GameSession:
Package | Downloads |
---|---|
Stormancer.Server.Plugins.GameFinder
Provides Gamefinder features to a Stormancer server application. |
|
Stormancer.Server.Plugins.Party
Provides Party related features to a Stormancer server application. |
|
Stormancer.Server.Plugins.GameHistory
Game history system for Stormancer server applications. |
|
Stormancer.Server.Plugins.Spectate
Provides game data streaming APIs for replay or realtime spectate. |
|
Stormancer.Server.Plugins.Replication
Provides server services required for object replication. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
6.2.1.76-pre | 59 | 8/9/2024 |
6.2.1.75-pre | 53 | 8/9/2024 |
6.2.1.74-pre | 53 | 8/9/2024 |
6.2.1.73-pre | 53 | 8/9/2024 |
6.2.1.72-pre | 61 | 8/2/2024 |
6.2.1.71-pre | 161 | 6/10/2024 |
6.2.1.70-pre | 125 | 4/17/2024 |
6.2.1.69-pre | 81 | 4/17/2024 |
6.2.1.65-pre | 93 | 4/16/2024 |
6.2.1.63-pre | 123 | 4/2/2024 |
6.2.1.61-pre | 102 | 3/11/2024 |
6.2.1.59-pre | 68 | 1/17/2024 |
6.2.1.58-pre | 94 | 1/12/2024 |
6.2.1.57-pre | 149 | 12/11/2023 |
6.2.1.56-pre | 105 | 12/7/2023 |
6.2.1.55-pre | 112 | 12/1/2023 |
6.2.1.53-pre | 119 | 11/22/2023 |
6.2.1.52-pre | 100 | 11/20/2023 |
6.2.1.51-pre | 55 | 11/15/2023 |
6.2.1.50-pre | 73 | 11/14/2023 |
6.2.1.49-pre | 68 | 11/14/2023 |
6.2.1.48-pre | 82 | 11/14/2023 |
6.2.1.47-pre | 76 | 11/14/2023 |
6.2.1.46-pre | 69 | 11/13/2023 |
6.2.1.45-pre | 68 | 11/13/2023 |
6.2.1.44-pre | 57 | 11/13/2023 |
6.2.1.43-pre | 71 | 11/12/2023 |
6.2.1.42-pre | 90 | 11/12/2023 |
6.2.1.41-pre | 73 | 11/12/2023 |
6.2.1.40-pre | 79 | 11/12/2023 |
6.2.1.39-pre | 75 | 11/12/2023 |
6.2.1.38-pre | 66 | 11/12/2023 |
6.2.1.37-pre | 76 | 11/12/2023 |
6.2.1.36-pre | 80 | 11/12/2023 |
6.2.1.35-pre | 77 | 11/11/2023 |
6.2.1.33-pre | 71 | 11/8/2023 |
6.2.1.31-pre | 59 | 11/7/2023 |
6.2.1.30-pre | 74 | 11/7/2023 |
6.2.1.28-pre | 123 | 10/27/2023 |
6.2.1.27-pre | 106 | 10/27/2023 |
6.2.1.26-pre | 92 | 10/27/2023 |
6.2.1.25-pre | 90 | 10/27/2023 |
6.2.1.24-pre | 123 | 10/27/2023 |
6.2.1.23-pre | 104 | 10/25/2023 |
6.2.1.22-pre | 93 | 10/23/2023 |
6.2.1.21-pre | 86 | 10/20/2023 |
6.2.1.20-pre | 84 | 10/20/2023 |
6.2.1.19-pre | 111 | 10/20/2023 |
6.2.1.18-pre | 73 | 10/20/2023 |
6.2.1.17-pre | 84 | 10/20/2023 |
6.2.1.15-pre | 80 | 10/19/2023 |
6.2.1.14-pre | 105 | 10/19/2023 |
6.2.1.13-pre | 117 | 10/13/2023 |
6.2.1.12-pre | 98 | 10/13/2023 |
6.2.1.10-pre | 96 | 10/12/2023 |
6.2.1.9-pre | 96 | 10/12/2023 |
6.2.1.7-pre | 96 | 10/11/2023 |
6.2.1.6-pre | 76 | 10/11/2023 |
6.2.1.4-pre | 102 | 10/11/2023 |
6.2.1.3-pre | 89 | 10/11/2023 |
6.2.1.2-pre | 117 | 10/10/2023 |
6.2.1.1-pre | 92 | 10/5/2023 |
6.2.1-pre | 134 | 10/4/2023 |
6.2.0.14-pre | 95 | 10/2/2023 |
6.2.0.13-pre | 94 | 9/29/2023 |
6.2.0.12-pre | 85 | 9/28/2023 |
6.2.0.11-pre | 157 | 9/12/2023 |
6.2.0.10-pre | 111 | 9/8/2023 |
6.2.0.9-pre | 108 | 9/7/2023 |
6.2.0.8-pre | 97 | 9/1/2023 |
6.2.0.7-pre | 71 | 8/31/2023 |
6.2.0.6-pre | 107 | 8/29/2023 |
6.2.0.5-pre | 193 | 8/18/2023 |
6.2.0.4-pre | 143 | 8/18/2023 |
6.2.0.3-pre | 129 | 8/17/2023 |
6.2.0.2-pre | 111 | 8/17/2023 |
6.2.0-pre | 126 | 8/9/2023 |
6.1.2.35-pre | 106 | 8/4/2023 |
6.1.2.34-pre | 136 | 8/3/2023 |
6.1.2.33-pre | 164 | 8/1/2023 |
6.1.2.32-pre | 119 | 8/1/2023 |
6.1.2.31-pre | 205 | 6/29/2023 |
6.1.2.30-pre | 139 | 6/29/2023 |
6.1.2.29-pre | 274 | 6/15/2023 |
6.1.2.28-pre | 113 | 6/15/2023 |
6.1.2.27-pre | 106 | 6/15/2023 |
6.1.2.26-pre | 106 | 6/15/2023 |
6.1.2.25-pre | 118 | 6/15/2023 |
6.1.2.24-pre | 127 | 6/15/2023 |
6.1.2.23-pre | 123 | 6/15/2023 |
6.1.2.22-pre | 111 | 6/15/2023 |
6.1.2.21-pre | 110 | 6/15/2023 |
6.1.2.20-pre | 104 | 6/15/2023 |
6.1.2.19-pre | 112 | 6/15/2023 |
6.1.2.18-pre | 154 | 6/6/2023 |
6.1.2.17-pre | 126 | 6/6/2023 |
6.1.2.15-pre | 159 | 5/30/2023 |
6.1.2.14-pre | 184 | 5/24/2023 |
6.1.2.13-pre | 150 | 5/18/2023 |
6.1.2.12-pre | 100 | 5/18/2023 |
6.1.2.11-pre | 97 | 5/18/2023 |
6.1.2.10-pre | 134 | 5/17/2023 |
6.1.2.8-pre | 109 | 5/15/2023 |
6.1.2.7-pre | 118 | 5/12/2023 |
6.1.2.6-pre | 107 | 5/11/2023 |
6.1.2.5-pre | 103 | 5/11/2023 |
6.1.2.4-pre | 125 | 5/11/2023 |
6.1.2.3-pre | 104 | 5/11/2023 |
6.1.2.2-pre | 108 | 5/11/2023 |
6.1.2.1-pre | 178 | 5/9/2023 |
6.1.2-pre | 109 | 5/9/2023 |
6.1.1.15 | 288 | 5/9/2023 |
6.1.1.15-pre | 105 | 5/5/2023 |
6.1.1.14-pre | 82 | 5/5/2023 |
6.1.1.13-pre | 99 | 4/30/2023 |
6.1.1.12-pre | 130 | 4/30/2023 |
6.1.1.11-pre | 98 | 4/27/2023 |
6.1.1.10-pre | 125 | 4/24/2023 |
6.1.1.9-pre | 135 | 4/21/2023 |
6.1.1.8-pre | 101 | 4/21/2023 |
6.1.1.7-pre | 134 | 4/21/2023 |
6.1.1.6-pre | 110 | 4/21/2023 |
6.1.1.3-pre | 133 | 4/13/2023 |
6.1.1.2-pre | 108 | 4/13/2023 |
6.1.1.1-pre | 120 | 4/13/2023 |
6.1.0.20-pre | 142 | 4/11/2023 |
6.1.0.19-pre | 115 | 4/7/2023 |
6.1.0.18-pre | 120 | 4/6/2023 |
6.1.0.17 | 406 | 4/4/2023 |
6.1.0.17-pre | 140 | 3/31/2023 |
6.1.0.16-pre | 108 | 3/31/2023 |
6.1.0.15-pre | 105 | 3/30/2023 |
6.1.0.13-pre | 111 | 3/30/2023 |
6.1.0.12-pre | 118 | 3/29/2023 |
6.1.0.11-pre | 112 | 3/29/2023 |
6.1.0.10-pre | 125 | 3/29/2023 |
6.1.0.9-pre | 124 | 3/29/2023 |
6.1.0.8-pre | 131 | 3/29/2023 |
6.1.0.7-pre | 127 | 3/29/2023 |
6.1.0.6-pre | 105 | 3/29/2023 |
6.1.0.5-pre | 107 | 3/28/2023 |
6.1.0.4-pre | 118 | 3/28/2023 |
6.1.0.3-pre | 142 | 3/21/2023 |
6.1.0.2-pre | 141 | 3/21/2023 |
6.1.0.1-pre | 145 | 3/19/2023 |
6.1.0-pre | 128 | 3/19/2023 |
6.0.3.6-pre | 276 | 12/8/2022 |
6.0.3.5-pre | 121 | 12/8/2022 |
6.0.3.4-pre | 111 | 12/7/2022 |
6.0.3.3-pre | 119 | 12/7/2022 |
6.0.3.2-pre | 132 | 12/7/2022 |
6.0.3.1-pre | 113 | 12/7/2022 |
6.0.3-pre | 119 | 12/6/2022 |
6.0.2 | 394 | 10/28/2022 |
6.0.1.1 | 891 | 10/26/2022 |
6.0.1.1-pre | 131 | 10/26/2022 |
6.0.0.3-pre | 130 | 10/3/2022 |
6.0.0.2 | 1,357 | 9/28/2022 |
6.0.0.2-pre | 279 | 9/12/2022 |
5.5.0.11-pre | 331 | 8/2/2022 |
5.5.0.10-pre | 150 | 7/27/2022 |
5.5.0.9-pre | 306 | 7/1/2022 |
5.5.0.8-pre | 199 | 6/9/2022 |
5.5.0.3-pre | 142 | 5/24/2022 |
5.4.0.60-pre | 358 | 4/12/2022 |
5.4.0.59-pre | 178 | 4/12/2022 |
5.4.0.58-pre | 186 | 3/31/2022 |
5.4.0.57-pre | 156 | 3/31/2022 |
5.4.0.56-pre | 153 | 3/24/2022 |
5.4.0.55-pre | 167 | 3/23/2022 |
5.4.0.53-pre | 169 | 3/22/2022 |
5.4.0.51-pre | 240 | 3/15/2022 |
5.4.0.26-pre | 155 | 3/14/2022 |
5.4.0.25-pre | 163 | 3/14/2022 |
5.4.0.23-pre | 174 | 3/8/2022 |
5.4.0.22-pre | 159 | 3/1/2022 |
5.4.0.7-pre | 218 | 2/28/2022 |
5.3.0.104-pre | 156 | 3/17/2022 |
5.3.0.103-pre | 146 | 3/17/2022 |
5.3.0 | 2,610 | 1/21/2022 |
5.3.0-pre | 318 | 1/14/2022 |
5.2.0 | 1,382 | 12/15/2021 |
5.2.0-pre | 271 | 10/26/2021 |
5.1.0.1 | 774 | 10/14/2021 |
5.0.1.2 | 1,178 | 5/23/2021 |
5.0.1.2-pre | 594 | 5/12/2021 |
5.0.1-pre | 270 | 5/3/2021 |
4.0.7 | 979 | 4/29/2021 |
4.0.6 | 441 | 4/19/2021 |
4.0.5 | 483 | 3/22/2021 |
4.0.4.1 | 699 | 3/20/2021 |
4.0.4 | 1,053 | 3/1/2021 |
4.0.3.2 | 453 | 12/18/2020 |
4.0.3.2-pre | 337 | 12/17/2020 |
4.0.3.1-pre | 299 | 12/17/2020 |
4.0.3-pre | 320 | 12/17/2020 |
4.0.1.1 | 828 | 12/9/2020 |
4.0.0.1 | 1,085 | 12/4/2020 |
3.3.4 | 477 | 12/9/2020 |
3.3.3.2 | 486 | 12/8/2020 |
3.3.3.2-pre | 324 | 12/8/2020 |
3.3.2.2 | 1,087 | 10/20/2020 |
3.3.2.2-pre | 425 | 10/13/2020 |
3.3.2.1-pre | 341 | 9/29/2020 |
3.3.2-pre | 733 | 8/11/2020 |
3.3.1.1-pre | 385 | 8/11/2020 |
3.3.1-pre | 311 | 8/11/2020 |
3.3.0-pre | 361 | 7/1/2020 |
3.2.3-pre | 327 | 6/30/2020 |
3.2.2-pre | 332 | 6/23/2020 |
3.2.1-pre | 384 | 6/22/2020 |
3.2.0-pre | 437 | 6/16/2020 |
3.1.3-pre | 374 | 6/15/2020 |
3.1.2-pre | 393 | 6/9/2020 |
3.0.2 | 527 | 6/15/2020 |
3.0.2-pre | 401 | 6/5/2020 |
3.0.1 | 1,302 | 5/27/2020 |
3.0.1-pre | 654 | 3/30/2020 |
3.0.0-pre | 893 | 3/29/2020 |
2.0.0.3 | 576 | 2/20/2020 |
2.0.0.3-pre | 747 | 2/22/2020 |
2.0.0.2 | 575 | 2/19/2020 |
2.0.0.1 | 1,093 | 2/19/2020 |
2.0.0 | 788 | 2/13/2020 |
1.2.1-alpha.2 | 316 | 2/19/2020 |
1.2.1-alpha.1 | 325 | 1/27/2020 |
1.1.1 | 912 | 1/21/2020 |
1.1.1-alpha.1 | 325 | 2/19/2020 |
1.0.0.3 | 1,077 | 1/4/2020 |
1.0.0.2 | 631 | 1/4/2020 |
1.0.0.1 | 1,055 | 1/4/2020 |
Changed
*******
- Add MaxPlayersInGameSession analytics
- Notify gameserver hosting agents when the app is not an active deployment.
- Make sure that calling IsHost never throws, but instead returns false.
- Don't send Teams infos to analytics
- Add gamefinder and Parameters to analytics
- Added the affected Players to the ReservationCancelledContext instead of only their user id.
- P2P is now the default mode if a gameserver couldn't be located.
Fixed
*****
- Don't wait 5s before returning PostResults response for the last player in the session.