class
FRollbackWorld
FRollbackWorld — an ECS world (and optionally a physics world) as the deterministic simulation a rollback session or the time rewind drives. Advance writes each player's input into its RollbackPlayerComponent, runs the registered steps in order, then steps physics by the fixed step. The checksum covers every registered component of every entity in id order plus the physics state; Transform and RollbackPlayer are registered by the engine, games register their own gameplay components.
- Module
- Game
- Header
#include "Rollback/RollbackWorld.h"- Namespace
Mowo
Type aliases
| Alias | Description |
|---|---|
using FStep = std::function<void(World& world, const FRollbackInput* inputs, uint32_t playerCount, float fixedDt)> | |
using FHashFn = std::function<void(World& world, std::vector<std::pair<EntityID, uint64_t>>& outHashes)> |
Constructors
| Signature | Name | Description |
|---|---|---|
FRollbackWorld(World& world, PhysicsWorld* physics, float fixedDt) | FRollbackWorld |
Public functions
| Returns | Name | Description |
|---|---|---|
void | AddStep | |
void | SaveState | |
void | LoadState | |
void | Advance | |
uint64_t | ComputeChecksum | |
int32_t | GetFrame | |
float | GetFixedDt | |
size_t | GetLastStateBytes | |
uint32_t | GetPhysicsRestoreFailures | |
void | RegisterChecksum | Adds a component type to every checksum. |
void | RegisterChecksumFn |
Function details
FRollbackWorld
C++
FRollbackWorld(World& world, PhysicsWorld* physics, float fixedDt)AddStep
C++
void AddStep(FStep step)SaveState
C++
void SaveState(FRollbackState& outState) overrideLoadState
C++
void LoadState(const FRollbackState& state) overrideAdvance
C++
void Advance(const FRollbackInput* inputs, uint32_t playerCount) overrideComputeChecksum
C++
uint64_t ComputeChecksum() constGetFrame
C++
int32_t GetFrame() constGetFixedDt
C++
float GetFixedDt() constGetLastStateBytes
C++
size_t GetLastStateBytes() constGetPhysicsRestoreFailures
C++
uint32_t GetPhysicsRestoreFailures() constRegisterChecksum
C++
template<typename T> static void RegisterChecksum(const char* name, void (*hash)(const T& component, FRollbackHasher& hasher))Adds a component type to every checksum. hash feeds the fields that matter for gameplay; registration order must be the same on every peer, which one binary guarantees.
RegisterChecksumFn
C++
static void RegisterChecksumFn(const char* name, FHashFn fn)Generated from Rollback/RollbackWorld.h via game.json · Nov 5, 2026Version 1.0.0