Table of Contents

Class RollbackNetcode

Namespace
Backdash
Assembly
Backdash.dll

The session factory used to create new netcode sessions.

public static class RollbackNetcode
Inheritance
RollbackNetcode
Inherited Members

Methods

CreateReplaySession<TInput, TGameState>(int, IReadOnlyList<ConfirmedInputs<TInput>>, SessionServices<TInput, TGameState>?, SessionReplayControl?, bool)

Initializes new replay session.

public static IRollbackSession<TInput, TGameState> CreateReplaySession<TInput, TGameState>(int numberOfPlayers, IReadOnlyList<ConfirmedInputs<TInput>> inputs, SessionServices<TInput, TGameState>? services = null, SessionReplayControl? controls = null, bool useInputSeedForRandom = true) where TInput : unmanaged where TGameState : notnull, new()

Parameters

numberOfPlayers int

Session player count

inputs IReadOnlyList<ConfirmedInputs<TInput>>

Inputs to be replayed

services SessionServices<TInput, TGameState>

Session customizable dependencies

controls SessionReplayControl

replay control

useInputSeedForRandom bool

UseInputSeedForRandom

Returns

IRollbackSession<TInput, TGameState>

Type Parameters

TInput

Game input type

TGameState

Game state type

CreateSession<TInput, TGameState>(int, RollbackOptions?, SessionServices<TInput, TGameState>?)

Initializes new multiplayer session.

public static IRollbackSession<TInput, TGameState> CreateSession<TInput, TGameState>(int port, RollbackOptions? options = null, SessionServices<TInput, TGameState>? services = null) where TInput : unmanaged where TGameState : notnull, new()

Parameters

port int

The UdpSocket port

options RollbackOptions

Session configuration

services SessionServices<TInput, TGameState>

Session customizable dependencies

Returns

IRollbackSession<TInput, TGameState>

Type Parameters

TInput

Game input type

TGameState

Game state type

CreateSpectatorSession<TInput, TGameState>(int, IPEndPoint, int, RollbackOptions?, SessionServices<TInput, TGameState>?)

Initializes new spectator session.

public static IRollbackSession<TInput, TGameState> CreateSpectatorSession<TInput, TGameState>(int port, IPEndPoint host, int numberOfPlayers, RollbackOptions? options = null, SessionServices<TInput, TGameState>? services = null) where TInput : unmanaged where TGameState : notnull, new()

Parameters

port int

The UdpSocket port

host IPEndPoint

The host IPEndPoint to be watched.

numberOfPlayers int

Session player count

options RollbackOptions

Session configuration

services SessionServices<TInput, TGameState>

Session customizable dependencies

Returns

IRollbackSession<TInput, TGameState>

Type Parameters

TInput

Game input type

TGameState

Game state type

CreateSyncTestSession<TInput, TGameState>(FrameSpan?, RollbackOptions?, SessionServices<TInput, TGameState>?, bool)

Initializes new sync test session.

public static IRollbackSession<TInput, TGameState> CreateSyncTestSession<TInput, TGameState>(FrameSpan? checkDistance = null, RollbackOptions? options = null, SessionServices<TInput, TGameState>? services = null, bool throwException = true) where TInput : unmanaged where TGameState : notnull, new()

Parameters

checkDistance FrameSpan?

Total forced rollback frames.

options RollbackOptions

Session configuration

services SessionServices<TInput, TGameState>

Session customizable dependencies

throwException bool

If true, throws on state de-synchronization.

Returns

IRollbackSession<TInput, TGameState>

Type Parameters

TInput

Game input type

TGameState

Game state type

See Also

IRollbackSession<TInput>
IRollbackSession<TInput, TState>