This class implements the IDeterministicSessionRunner interface and contains code to glue together the Quantum server and Quantum session runner. This was formerly part of the Quantum Server SDK. The class will also work without running the server simulation only as wrapper for access to custom simulation code as resource manager and command serialization for example.
More...
Inherits IDeterministicSessionRunner.
|
AssetGuid | AddInitialDynamicAsset (AssetObject asset) |
| Add an initial dynamic asset. Needs to be performed before the simulation starts. Use DeterministicServer.OnDeterministicSessionCanStart(). More...
|
|
void | Service (double gameTime) |
| Implements the server update callback. More...
|
|
void | Shutdown () |
| Disposes the Quantum runner. More...
|
|
void | Start (DeterministicSessionRunnerStartArguments args) |
| Implements the start of the Quantum online session. Instantiates a Quantum runner. More...
|
|
bool | TryCreateSnapshot (ref int tick, ref byte[] data) |
| Implements the server snapshot requested callback. This will use the most recent simulated frame on the server to use as a snapshot for late-joining clients. Which will bypass requesting buddy snapshots from other clients. More...
|
|
|
IAssetSerializer | AssetSerializer [get, set] |
| Get and set the AssetSerializer directly after IDeterministicSessionRunner creation, until it is possible to pass it internally. More...
|
|
Action< byte[]> | OnGameResult [get, set] |
| Callback raised on game result events from the simulation. More...
|
|
This class implements the IDeterministicSessionRunner interface and contains code to glue together the Quantum server and Quantum session runner. This was formerly part of the Quantum Server SDK. The class will also work without running the server simulation only as wrapper for access to custom simulation code as resource manager and command serialization for example.
◆ AddInitialDynamicAsset()
Add an initial dynamic asset. Needs to be performed before the simulation starts. Use DeterministicServer.OnDeterministicSessionCanStart().
- Parameters
-
asset | Asset to add to initial dynamic asset db. |
- Returns
- Guid of the asset or invalid guid when the simulation has already been started.
◆ Shutdown()
void Quantum.DotNetSessionRunner.Shutdown |
( |
| ) |
|
|
inline |
Disposes the Quantum runner.
◆ Start()
void Quantum.DotNetSessionRunner.Start |
( |
DeterministicSessionRunnerStartArguments |
args | ) |
|
|
inline |
Implements the start of the Quantum online session. Instantiates a Quantum runner.
- Parameters
-
◆ Service()
void Quantum.DotNetSessionRunner.Service |
( |
double |
gameTime | ) |
|
|
inline |
Implements the server update callback.
- Parameters
-
gameTime | Game time in seconds |
◆ TryCreateSnapshot()
bool Quantum.DotNetSessionRunner.TryCreateSnapshot |
( |
ref int |
tick, |
|
|
ref byte[] |
data |
|
) |
| |
|
inline |
Implements the server snapshot requested callback. This will use the most recent simulated frame on the server to use as a snapshot for late-joining clients. Which will bypass requesting buddy snapshots from other clients.
- Parameters
-
tick | The tick of the snapshot. |
data | DeterministicFrame object serialized. |
- Returns
- True, if the snapshot was set.
◆ InitialDynamicAssetDB
DynamicAssetDB Quantum.DotNetSessionRunner.InitialDynamicAssetDB => _dynamicAssetDB |
◆ Runner
Grants access to the Quantum session runner.
◆ EventDispatcher
object Quantum.DotNetSessionRunner.EventDispatcher => _eventDispatcher |
◆ CallbackDispatcher
object Quantum.DotNetSessionRunner.CallbackDispatcher => _callbackDispatcher |
Access Quantum callbacks.
◆ AssetSerializer
Get and set the AssetSerializer directly after IDeterministicSessionRunner creation, until it is possible to pass it internally.
◆ OnGameResult
Action<byte[]> Quantum.DotNetSessionRunner.OnGameResult |
|
getset |
Callback raised on game result events from the simulation.