The deterministic game interface is the main hub that holds information about the simulation on the Quantum.Deterministic level. More...
Public Member Functions | |
void | AssignSession (DeterministicSession session) |
The DeterministicSession creates this reference during its initialization. More... | |
DeterministicFrame | CreateFrame (IDisposable context) |
Creates a new frame object using the context. More... | |
DeterministicFrame | CreateFrame (IDisposable context, Byte[] data) |
Creates a new frame object using the context and external frame data. More... | |
IDisposable | CreateFrameContext () |
Creates a frame context in the beginning of the simulation. More... | |
void | DeserializeInputInto (int player, byte[] data, byte *buffer, bool verified) |
Asks the game to de-serialize input into the buffers, because it's game specific it cannot be done from here. More... | |
byte[] | GetExtraErrorFrameDumpData (DeterministicFrame frame) |
Creates information send to the server when detecting a checksum error. More... | |
Int32 | GetInputInMemorySize () |
Return the in memory input size. More... | |
Int32 | GetInputSerializedFixedSize () |
Returns the serialized input size. More... | |
DeterministicFrame | GetVerifiedFrame (int tick) |
Try to get the verified frame for a given tick from the snapshot buffer. More... | |
void | OnChecksumComputed (Int32 frame, ulong checksum) |
The callback is called when the local checksum was computed. More... | |
void | OnChecksumError (DeterministicTickChecksumError error, DeterministicFrame[] frames) |
The callback is called when a checksum error was detected. More... | |
void | OnChecksumErrorFrameDump (Int32 actorId, Int32 frameNumber, DeterministicSessionConfig sessionConfig, byte[] runtimeConfig, byte[] frameData, byte[] extraData) |
The callback is called when the clients receives a frame dump of another client from the server. More... | |
void | OnDestroy () |
The callback is called when the simulation is destroyed. More... | |
void | OnGameEnded () |
Not implemented. More... | |
void | OnGameResync () |
The callback is called when the game is starting from a snapshot after the snapshot has been received. More... | |
void | OnGameStart (DeterministicFrame state) |
The callback is called when the actual simulation starts after the online protocol start sequence was successful. More... | |
void | OnInputConfirmed (DeterministicFrameInputTemp input) |
The callback is called when an input object was confirmed by the server. More... | |
void | OnInputSetConfirmed (Int32 tick, Int32 length, byte[] data) |
The callback is called when an input set (all clients) was confirmed by the server. More... | |
DeterministicFrameInputTemp | OnLocalInput (Int32 frame, Int32 playerSlot) |
Polls the game for local input. More... | |
void | OnLocalPlayerAddConfirmed (DeterministicFrame frame, int playerSlot, PlayerRef player) |
The callback is called when the server confirmed the addition of a (local) player. More... | |
void | OnLocalPlayerAddFailed (int playerSlot, string message) |
The callback is called when the server failed to process the add player request. More... | |
void | OnLocalPlayerRemoveConfirmed (DeterministicFrame frame, int playerSlot, PlayerRef player) |
The callback is called when the server confirmed the removal of a (local) player. More... | |
void | OnLocalPlayerRemoveFailed (int playerSlot, string message) |
The callback is called when the server failed to process the remove player request. More... | |
void | OnPluginDisconnect (string reason) |
The callback is called when the server plugin disconnected the client. More... | |
void | OnSerializedInput (byte *encoded, Array dst) |
Asks the game to serialize the input, because it's game specific it cannot be done from here. More... | |
void | OnSimulate (DeterministicFrame state) |
The callback is called when any simulation step was executed. More... | |
void | OnSimulateFinished (DeterministicFrame state) |
The callback is called after any simulation step was executed and after the OnSimulate(DeterministicFrame) callback. More... | |
void | OnSimulationBegin () |
The callback is called before the session computes multiple simulation steps (frames). More... | |
void | OnSimulationEnd () |
The callback is called when multiple simulation steps (frames) were executed. More... | |
void | OnUpdateDone () |
The callback is called when when the session completed its DeterministicSession.Update loop. More... | |
Properties | |
DeterministicSession | Session [get] |
Get the deterministic session. More... | |
The deterministic game interface is the main hub that holds information about the simulation on the Quantum.Deterministic level.
Int32 Photon.Deterministic.IDeterministicGame.GetInputSerializedFixedSize | ( | ) |
Int32 Photon.Deterministic.IDeterministicGame.GetInputInMemorySize | ( | ) |
void Photon.Deterministic.IDeterministicGame.DeserializeInputInto | ( | int | player, |
byte[] | data, | ||
byte * | buffer, | ||
bool | verified | ||
) |
Asks the game to de-serialize input into the buffers, because it's game specific it cannot be done from here.
player | The player the input is for |
data | The input data |
buffer | The destination buffer |
verified | Is the input verified |
Implemented in Quantum.QuantumGame.
DeterministicFrameInputTemp Photon.Deterministic.IDeterministicGame.OnLocalInput | ( | Int32 | frame, |
Int32 | playerSlot | ||
) |
Polls the game for local input.
frame | The frame that the input is for |
playerSlot | The player slot that is polling |
Implemented in Quantum.QuantumGame.
void Photon.Deterministic.IDeterministicGame.OnSerializedInput | ( | byte * | encoded, |
Array | dst | ||
) |
Asks the game to serialize the input, because it's game specific it cannot be done from here.
encoded | |
dst |
Implemented in Quantum.QuantumGame.
IDisposable Photon.Deterministic.IDeterministicGame.CreateFrameContext | ( | ) |
Creates a frame context in the beginning of the simulation.
Implemented in Quantum.QuantumGame.
DeterministicFrame Photon.Deterministic.IDeterministicGame.CreateFrame | ( | IDisposable | context | ) |
Creates a new frame object using the context.
context | Frame context |
DeterministicFrame Photon.Deterministic.IDeterministicGame.CreateFrame | ( | IDisposable | context, |
Byte[] | data | ||
) |
Creates a new frame object using the context and external frame data.
context | Frame context |
data |
DeterministicFrame Photon.Deterministic.IDeterministicGame.GetVerifiedFrame | ( | int | tick | ) |
Try to get the verified frame for a given tick from the snapshot buffer.
tick | Requested tick |
null
Implemented in Quantum.QuantumGame.
byte [] Photon.Deterministic.IDeterministicGame.GetExtraErrorFrameDumpData | ( | DeterministicFrame | frame | ) |
Creates information send to the server when detecting a checksum error.
frame | Frame |
Implemented in Quantum.QuantumGame.
void Photon.Deterministic.IDeterministicGame.OnDestroy | ( | ) |
The callback is called when the simulation is destroyed.
Implemented in Quantum.QuantumGame.
void Photon.Deterministic.IDeterministicGame.AssignSession | ( | DeterministicSession | session | ) |
The DeterministicSession creates this reference during its initialization.
session | Deterministic session that this game uses |
Implemented in Quantum.QuantumGame.
void Photon.Deterministic.IDeterministicGame.OnGameStart | ( | DeterministicFrame | state | ) |
The callback is called when the actual simulation starts after the online protocol start sequence was successful.
state | Intitial deterministic frame |
Implemented in Quantum.QuantumGame.
void Photon.Deterministic.IDeterministicGame.OnGameResync | ( | ) |
The callback is called when the game is starting from a snapshot after the snapshot has been received.
Implemented in Quantum.QuantumGame.
void Photon.Deterministic.IDeterministicGame.OnGameEnded | ( | ) |
Not implemented.
Implemented in Quantum.QuantumGame.
void Photon.Deterministic.IDeterministicGame.OnSimulate | ( | DeterministicFrame | state | ) |
The callback is called when any simulation step was executed.
state | Frame that was simulated |
Implemented in Quantum.QuantumGame.
void Photon.Deterministic.IDeterministicGame.OnSimulateFinished | ( | DeterministicFrame | state | ) |
The callback is called after any simulation step was executed and after the OnSimulate(DeterministicFrame) callback.
state | Frame that was simulated |
Implemented in Quantum.QuantumGame.
void Photon.Deterministic.IDeterministicGame.OnUpdateDone | ( | ) |
The callback is called when when the session completed its DeterministicSession.Update loop.
Implemented in Quantum.QuantumGame.
void Photon.Deterministic.IDeterministicGame.OnChecksumError | ( | DeterministicTickChecksumError | error, |
DeterministicFrame[] | frames | ||
) |
The callback is called when a checksum error was detected.
error | Checksum error information |
frames | Contains the verified frame that was failed to validate |
Implemented in Quantum.QuantumGame.
void Photon.Deterministic.IDeterministicGame.OnChecksumErrorFrameDump | ( | Int32 | actorId, |
Int32 | frameNumber, | ||
DeterministicSessionConfig | sessionConfig, | ||
byte[] | runtimeConfig, | ||
byte[] | frameData, | ||
byte[] | extraData | ||
) |
The callback is called when the clients receives a frame dump of another client from the server.
actorId | The Photon actor id that the dump belongs to |
frameNumber | The frame number of the dump |
sessionConfig | The session config |
runtimeConfig | The runtime config |
frameData | The frame data |
extraData | Extra dump meta information |
void Photon.Deterministic.IDeterministicGame.OnInputConfirmed | ( | DeterministicFrameInputTemp | input | ) |
The callback is called when an input object was confirmed by the server.
input | Input object |
Implemented in Quantum.QuantumGame.
void Photon.Deterministic.IDeterministicGame.OnInputSetConfirmed | ( | Int32 | tick, |
Int32 | length, | ||
byte[] | data | ||
) |
The callback is called when an input set (all clients) was confirmed by the server.
tick | Tick |
length | Length of input object array |
data | Input objects |
void Photon.Deterministic.IDeterministicGame.OnChecksumComputed | ( | Int32 | frame, |
ulong | checksum | ||
) |
The callback is called when the local checksum was computed.
frame | The frame the checksum belongs to |
checksum | The checksum that will be send to the server |
Implemented in Quantum.QuantumGame.
void Photon.Deterministic.IDeterministicGame.OnSimulationBegin | ( | ) |
The callback is called before the session computes multiple simulation steps (frames).
Implemented in Quantum.QuantumGame.
void Photon.Deterministic.IDeterministicGame.OnSimulationEnd | ( | ) |
The callback is called when multiple simulation steps (frames) were executed.
Implemented in Quantum.QuantumGame.
void Photon.Deterministic.IDeterministicGame.OnPluginDisconnect | ( | string | reason | ) |
The callback is called when the server plugin disconnected the client.
reason | Debug string |
Implemented in Quantum.QuantumGame.
void Photon.Deterministic.IDeterministicGame.OnLocalPlayerAddConfirmed | ( | DeterministicFrame | frame, |
int | playerSlot, | ||
PlayerRef | player | ||
) |
The callback is called when the server confirmed the addition of a (local) player.
frame | The frame the player has been added |
playerSlot | The player slot that was used to assign the player |
player | The player |
Implemented in Quantum.QuantumGame.
void Photon.Deterministic.IDeterministicGame.OnLocalPlayerRemoveConfirmed | ( | DeterministicFrame | frame, |
int | playerSlot, | ||
PlayerRef | player | ||
) |
The callback is called when the server confirmed the removal of a (local) player.
frame | The frame when the request was confirmed |
playerSlot | The player slot of the removed player |
player | The player that was removed |
Implemented in Quantum.QuantumGame.
void Photon.Deterministic.IDeterministicGame.OnLocalPlayerAddFailed | ( | int | playerSlot, |
string | message | ||
) |
The callback is called when the server failed to process the add player request.
playerSlot | The player slot that was requested |
message | Debug message |
Implemented in Quantum.QuantumGame.
void Photon.Deterministic.IDeterministicGame.OnLocalPlayerRemoveFailed | ( | int | playerSlot, |
string | message | ||
) |
The callback is called when the server failed to process the remove player request.
playerSlot | The player slot that was tried to remove |
message | Debug message |
Implemented in Quantum.QuantumGame.
|
get |
Get the deterministic session.