Carries metadata about the DeterministicSession simulator in the current Update.
More...
|
| Boolean | IsRollbackRequired => TargetVerificationTick > PreviousUpdatePredictedTick |
| | true when verification has reached past the tick the previous Session Update predicted to, which forces a rollback regardless of SkipPredictionRollbackIfPossible or SkipPrediction. More...
|
| |
| Int32? | LatestTickPredicted => TicksPredicted <= 0 ? null : PredictedFromTick + TicksPredicted |
| | The frame number of the latest Predicted frame simulated this Update. null if none were Predicted yet. More...
|
| |
| Int32? | LatestTickSimulated => LatestTickPredicted ?? LatestTickVerified |
| | The frame number of the latest frame simulated this Update, either Verified or Predicted. null if none were simulated yet. More...
|
| |
| Int32? | LatestTickVerified => TicksVerified <= 0 ? null : VerifiedFromTick + TicksVerified |
| | The frame number of the latest Verified frame simulated this Update. null if none were Verified yet. More...
|
| |
| Int32? | NextTickToPredict => TicksPendingPrediction <= 0 ? null : PredictedFromTick + TicksPredicted + 1 |
| | The next Predicted frame the simulator intends to simulate. null if there are no ticks pending Prediction. More...
|
| |
| Int32? | NextTickToSimulate => NextTickToVerify ?? NextTickToPredict |
| | The next frame the simulator intends to simulate, either Verified or Predicted. null if there are no ticks pending simulation. More...
|
| |
| Int32? | NextTickToVerify => TicksPendingVerification <= 0 ? null : VerifiedFromTick + TicksVerified + 1 |
| | The next Verified frame the simulator intends to simulate. null if there are no ticks pending Verification. More...
|
| |
| Int32 | PredictedFromTick => WillRollbackPrediction || HasRolledBackPrediction ? TargetVerificationTick : PreviousUpdatePredictedTick |
| | The tick from which predictions started or will start on this Session Update. By default, this is the TargetVerificationTick, but can instead be the PreviousUpdatePredictedTick when the rollback is skipped. See WillRollbackPrediction. More...
|
| |
| Int32 | TargetVerificationTick => VerifiedFromTick + TicksToVerify |
| | The number of the last Verified frame that the simulation intends to simulate on this Session Update. More...
|
| |
| Int32 | TicksPendingPrediction => TicksToPredict - TicksPredicted |
| | The number of remaining Predicted frames to be simulated in this Update in order to reach the TicksToPredict count. More...
|
| |
| Int32 | TicksPendingSimulation => TicksPendingVerification + TicksPendingPrediction |
| | The total number of remaining frames to be simulated in this Update, both Verified and Predicted. More...
|
| |
| Int32 | TicksPendingVerification => TicksToVerify - TicksVerified |
| | The number of remaining Verified frames to be simulated in this Update in order to reach the TicksToVerify count. More...
|
| |
| Int32 | TicksSimulated => TicksVerified + TicksPredicted |
| | The total number of frames already simulated in this Session Update, including Verified and Predicted ones. More...
|
| |
| Int32 | TicksToPredict |
| | The total number of Predicted frames that will be simulated on this Session Update in order to reach from PredictedFromTick towards the MaxPredictableTick, limited by the rollback window. Zero if the session is stalling or if SkipPrediction is set. More...
|
| |
| Boolean | WillRollbackPrediction |
| | Whether the Predicted state will still be rolled back to the Verified state on this Session Update. If a rollback has already occurred, then this is false and HasRolledBackPrediction is true. Rollbacks are only performed when there is a newer Verified state to rollback to (TargetVerificationTick greater than LatestVerifiedRolledBackTo). In that case, rollback is performed if not skipped with SkipPredictionRollbackIfPossible or SkipPrediction, or if IsRollbackRequired. More...
|
| |
|
| Boolean | HasRolledBackPrediction [get] |
| | If the Predicted state has been rolled back to the Verified state on this Session Update. Always false up to and including the BeforePrediction stage. More...
|
| |
|
Boolean | IsStalling [get] |
| |
| Int32 | LatestVerifiedRolledBackTo [get] |
| | The latest Verified tick that the Predicted state was rolled back to. More...
|
| |
| Int32 | MaxPredictableTick [get] |
| | The max tick the simulator has polled inputs for. More...
|
| |
| Int32? | MaxPredictedTicks [get, set] |
| | The number of Predicted frames this Session Update may simulate in total, counted from PredictedFromTick. More...
|
| |
| Int32 | MaxVerifiableTick [get] |
| | The max tick the simulator is able to verify given the verified and complete input sets available. More...
|
| |
| Int32 | PreviousUpdatePredictedTick [get] |
| | The latest predicted tick the simulator had when starting this update, resultant from the previous update loop. More...
|
| |
| Boolean | SkipPrediction [get, set] |
| | If the Prediction stage should simulate no frames at all on this Session Update, leaving the Predicted state where the previous Session Update left it, unless IsRollbackRequired. This property defaults to and is reset to false at the beginning of every Session Update. Attempting to modify this value after the BeforePrediction stage has ended will have no effect. More...
|
| |
| Boolean | SkipPredictionRollbackIfPossible [get, set] |
| | If a rollback of the Predicted state to the latest Verified state should be skipped, if possible. See IsRollbackRequired for when rollbacks cannot be skipped. This property defaults to and is reset to false at the beginning of every Session Update. Attempting to modify this value after the prediction loop has started will have no effect. More...
|
| |
| SimulatorStage | Stage [get] |
| | The current stage of the Simulator. - See also
- SimulatorStage
More...
|
| |
| Int32? | TargetPredictedTick [get, set] |
| | The last Predicted tick that should be simulated in this Session Update. More...
|
| |
| Int32 | TicksPredicted [get] |
| | The number of Predicted frames already simulated in this Session Update. More...
|
| |
| Int32 | TicksToVerify [get, set] |
| | The total number of Verified frames that will be simulated on this Session Update. Defaults to the maximum number of verifiable frames clamped by the limit set in DeterministicSession.MaxVerifiedTicksPerUpdate. More...
|
| |
| Int32 | TicksVerified [get] |
| | The number of Verified frames already simulated in this Session Update. More...
|
| |
| Int32 | VerifiedFromTick [get] |
| | The Verified tick from which the simulator started on this update. More...
|
| |
Carries metadata about the DeterministicSession simulator in the current Update.
| Boolean Photon.Deterministic.SimulatorContext.SkipPredictionRollbackIfPossible |
|
getset |
If a rollback of the Predicted state to the latest Verified state should be skipped, if possible. See IsRollbackRequired for when rollbacks cannot be skipped. This property defaults to and is reset to false at the beginning of every Session Update. Attempting to modify this value after the prediction loop has started will have no effect.
Prediction Rollbacks are NOT performed if new Verified frames were not simulated since the last rollback. Skipping prediction rollbacks saves on performance, but tends to cause more mispredictions the larger is the window between the latest Verified state and the last Verified state the Predicted stated was rolled back to. Prediction rollbacks must occur periodically and frequently in order to keep the predictions accurate.
Setting this to true is a request, not a guarantee: it is overridden when verification has advanced past the tick the previous Session Update predicted to. See IsRollbackRequired and WillRollbackPrediction.
Only the rollback is skipped, the Prediction stage still runs. Use SkipPrediction to skip both.
| Boolean Photon.Deterministic.SimulatorContext.SkipPrediction |
|
getset |
If the Prediction stage should simulate no frames at all on this Session Update, leaving the Predicted state where the previous Session Update left it, unless IsRollbackRequired. This property defaults to and is reset to false at the beginning of every Session Update. Attempting to modify this value after the BeforePrediction stage has ended will have no effect.
Skipping predictions also skips the rollback that would precede them, so the Predicted state is not rewound to a tick it had already passed and left there with nothing predicted on top of it.
If IsRollbackRequired, a rollback still occurs. The Predicted state then ends the update holding the Verified state at TargetVerificationTick, the same shape a stalling update produces, so it never trails the Verified state.
A lockstep session (e.g. in Replay mode) never predicts, so this has no effect there.
| Int32? Photon.Deterministic.SimulatorContext.MaxPredictedTicks |
|
getset |
The number of Predicted frames this Session Update may simulate in total, counted from PredictedFromTick.
Derived from SkipPrediction and reads 0 while predictions are skipped and Int32.MaxValue otherwise. Writing those two values is still supported and sets the flag; any other value throws, as partial budgets are no longer supported.
Attempting to modify this value after the BeforePrediction stage has ended will have no effect.
- Exceptions
-
| ArgumentOutOfRangeException | Thrown when the value is neither 0 nor Int32.MaxValue. |