_RollbackSimulationServer

Inherits: Node

Runs gameplay simulation during rollback

Description

Rollback involves restoring the game state to an earlier point in time and re-running game logic from there. This class tracks which nodes participate in rollback, which of them need to be actually simulated, and runs the simulation itself.

Node simulation honors scene tree order. Processing order and physics processing order are not considered.

To participate in rollback, call register() using the method to call to simulate the node. Only one Callable can be actively registered per node.

Methods

Return Type Name
void register(Callable callback)
void deregister(Callable callback)
void deregister_node(Node node)
void register_rollback_input_for(Node node, Node input)
void deregister_rollback_input(Node node, Node input)
bool is_predicting_current()
Object get_simulated_object()
void simulate(float delta, int tick)

Method Descriptions

void register ( Callable callback )

Register a callback to run as part of the rollback loop


void deregister ( Callable callback )

Deregister a callback from the rollback loop


void deregister_node ( Node node )

Deregister a node from the rollback loop


void register_rollback_input_for ( Node node, Node input )

Register input as providing input for node


void deregister_rollback_input ( Node node, Node input )

Deregister input from providing input for node


bool is_predicting_current ( )

Return true if the currently simulated node is being predicted


Object get_simulated_object ( )

Get the currently simulated object


void simulate ( float delta, int tick )

Simulate a tick