class

FRollbackSession

FRollbackSession — GGPO-style rollback for any number of players over any transport. Each frame the local input is filed inputDelay frames ahead and sent; inputs not yet heard from a peer are predicted (its last known input repeated); the frame is simulated at once. When a peer's real input for an already-simulated frame differs from what was predicted, the state saved before that frame is restored and every frame since resimulated with what is now known. Peers that fall more than maxPrediction frames behind stall the local simulation instead of predicting further.

Module
Game
Header
#include "Rollback/RollbackSession.h"
Namespace
Mowo

Desync detection: once every player's input for a frame is confirmed, the state saved at that frame is final; every checksumInterval frames each peer sends that state's checksum, and a mismatch is reported (OnDesync) — the moment two machines stopped agreeing, not the moment it became visible.

Properties

TypeNameDescription
static constexpr uint32_tkMaxPlayersDefault 8.
std::function<void(int32_t frame, uint64_t local, uint64_t remote, uint32_t player)>OnDesync

Constructors

SignatureNameDescription
FRollbackSession(const FRollbackConfig& config, IRollbackGame& game, IRollbackTr…FRollbackSession

Public functions

ReturnsNameDescription
boolAdvanceFrameSimulates one frame with this local input; false when stalled waiting for a peer (the input is kept and offered again next call).
voidPollReads everything the transport has: inputs, acknowledgements, checksums.
voidSendInputsRe-sends the unacknowledged local input without advancing.
int32_tGetFrame
int32_tGetConfirmedFrameNewest frame for which every player's input is known.
const FRollbackStats&GetStats
const FRollbackConfig&GetConfig
uint64_tGetSavedChecksumThe checksum of the saved state at a frame still in the ring, 0 if gone.
FRollbackInputGetInputThe input a player had (or was predicted to have) at a frame.

Function details

FRollbackSession

C++
FRollbackSession(const FRollbackConfig& config, IRollbackGame& game, IRollbackTransport& transport)

AdvanceFrame

C++
bool AdvanceFrame(const FRollbackInput& localInput)

Simulates one frame with this local input; false when stalled waiting for a peer (the input is kept and offered again next call).

Poll

C++
void Poll()

Reads everything the transport has: inputs, acknowledgements, checksums. AdvanceFrame polls first; call it alone to keep a stalled peer talking.

SendInputs

C++
void SendInputs()

Re-sends the unacknowledged local input without advancing.

GetFrame

C++
int32_t GetFrame() const

GetConfirmedFrame

C++
int32_t GetConfirmedFrame() const

Newest frame for which every player's input is known.

GetStats

C++
const FRollbackStats& GetStats() const

GetConfig

C++
const FRollbackConfig& GetConfig() const

GetSavedChecksum

C++
uint64_t GetSavedChecksum(int32_t frame) const

The checksum of the saved state at a frame still in the ring, 0 if gone.

GetInput

C++
FRollbackInput GetInput(uint32_t player, int32_t frame) const

The input a player had (or was predicted to have) at a frame.

Generated from Rollback/RollbackSession.h via game.json · Nov 5, 2026Version 1.0.0