The input provider is used to push recorded inputs into the simulation. This class uses the full input history instead of delta compressed input stream which uses a large memory footprint. More...
Public Member Functions | |
InputProvider (DeterministicSessionConfig config, int capacity=60 *60, int growSize=0) | |
Construct an input provider with a given capacity and grow size. More... | |
InputProvider (DeterministicTickInputSet[] inputList) | |
Construct an input provider with a given list of inputs. More... | |
InputProvider (int playerCount, int startFrame, int capacity, int growSize) | |
Construct an input provider with a given player count, start frame, capacity and grow size. More... | |
void | AddRpc (int player, byte[] data, bool command) |
Unused. More... | |
bool | CanSimulate (int frame) |
Returns true if the input provider can simulate the given frame. More... | |
void | Clear (int startFrame) |
Clear all recorded inputs. Usually called after a resync. More... | |
DeterministicTickInputSet[] | ExportToList (int verifiedFrame) |
Export the inputs to a list. More... | |
DeterministicFrameInputTemp | GetInput (int frame, int player) |
Returns input for a given frame and player. More... | |
QTuple< byte[], bool > | GetRpc (int frame, int player) |
Reads a rpc from the input provider. More... | |
void | ImportFromList (DeterministicTickInputSet[] inputList) |
Import a list of inputs into the input provider. More... | |
void | InjectInput (DeterministicTickInput input, bool localReplay) |
Injects a random input. More... | |
void | OnInputConfirmed (QuantumGame game, DeterministicFrameInputTemp input) |
This callback is called when an input was confirmed and can be recorded. More... | |
The input provider is used to push recorded inputs into the simulation. This class uses the full input history instead of delta compressed input stream which uses a large memory footprint.
|
inline |
Construct an input provider with a given capacity and grow size.
config | Session config used to gather PlayerCount and RollbackWindow |
capacity | The initial capacity |
growSize | The grow size, 0 means doubling the buffer |
|
inline |
Construct an input provider with a given list of inputs.
inputList | Input list |
|
inline |
Construct an input provider with a given player count, start frame, capacity and grow size.
playerCount | Player count |
startFrame | Start frame |
capacity | The initial capacity |
growSize | The grow size, 0 means doubling the buffer |
|
inline |
Returns true if the input provider can simulate the given frame.
frame | Requested frame |
Implements Photon.Deterministic.IDeterministicInputProvider.
|
inline |
Clear all recorded inputs. Usually called after a resync.
startFrame | New start frame |
|
inline |
Import a list of inputs into the input provider.
inputList | A reference to the imported list is internally copied. |
|
inline |
Export the inputs to a list.
verifiedFrame | The max frame that in input available for |
|
inline |
This callback is called when an input was confirmed and can be recorded.
game | The game |
input | The confirmed input |
|
inline |
Injects a random input.
input | Input to inject |
localReplay | If set to true the input sent flag is set to true |
|
inline |
Unused.
Implements Photon.Deterministic.IDeterministicRpcProvider.
|
inline |
Reads a rpc from the input provider.
frame | Frame |
player | Player |
Implements Photon.Deterministic.IDeterministicRpcProvider.
|
inline |
Returns input for a given frame and player.
frame | Requested frame |
player | Requested player |
Implements Photon.Deterministic.IDeterministicInputProvider.