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

AliasDescription
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

SignatureNameDescription
FRollbackWorld(World& world, PhysicsWorld* physics, float fixedDt)FRollbackWorld

Public functions

ReturnsNameDescription
voidAddStep
voidSaveState
voidLoadState
voidAdvance
uint64_tComputeChecksum
int32_tGetFrame
floatGetFixedDt
size_tGetLastStateBytes
uint32_tGetPhysicsRestoreFailures
voidRegisterChecksumAdds a component type to every checksum.
voidRegisterChecksumFn

Function details

FRollbackWorld

C++
FRollbackWorld(World& world, PhysicsWorld* physics, float fixedDt)

AddStep

C++
void AddStep(FStep step)

SaveState

C++
void SaveState(FRollbackState& outState) override

LoadState

C++
void LoadState(const FRollbackState& state) override

Advance

C++
void Advance(const FRollbackInput* inputs, uint32_t playerCount) override

ComputeChecksum

C++
uint64_t ComputeChecksum() const

GetFrame

C++
int32_t GetFrame() const

GetFixedDt

C++
float GetFixedDt() const

GetLastStateBytes

C++
size_t GetLastStateBytes() const

GetPhysicsRestoreFailures

C++
uint32_t GetPhysicsRestoreFailures() const

RegisterChecksum

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