Class NetcodeOptions
Configurations for sessions.
public sealed record NetcodeOptions : IEquatable<NetcodeOptions>
- Inheritance
-
NetcodeOptions
- Implements
- Inherited Members
Constructors
NetcodeOptions()
public NetcodeOptions()
Properties
FrameRate
Base frame rate used to estimate fairness (frame advantage) over peers.
Default FPS(frames per second)
public int FrameRate { get; set; }
Property Value
- See Also
InputDelayFrames
Amount of frames to delay local input.
public int InputDelayFrames { get; set; }
Property Value
- int
Defaults to
2
InputQueueLength
Max length for player input queues.
public int InputQueueLength { get; set; }
Property Value
- int
Defaults to
128
LocalPort
Local Port for UDP connections
public int LocalPort { get; set; }
Property Value
- int
Defaults to
random port
- See Also
Logger
Logging options.
public LoggerOptions Logger { get; set; }
Property Value
- See Also
Meta
Custom meta data Useful for INetcodePlugin implementations
public Dictionary<string, object> Meta { get; }
Property Value
NumberOfPlayers
Number of players Can not be greater than Backdash.Core.Max.NumberOfPlayers
public int NumberOfPlayers { get; set; }
Property Value
- int
Defaults to
2
PredictionFrames
Max allowed prediction frames.
public int PredictionFrames { get; set; }
Property Value
- int
Defaults to
16
- See Also
PredictionFramesOffset
Value to be incremented on PredictionFrames in state store.
public int PredictionFramesOffset { get; set; }
Property Value
- int
Defaults to
2
- See Also
Protocol
Networking Protocol options.
public ProtocolOptions Protocol { get; set; }
Property Value
- See Also
RecommendationInterval
Interval for time synchronization notifications.
public int RecommendationInterval { get; set; }
Property Value
- int
Defaults to
240
milliseconds
- See Also
RollbackFramesSmoothFactor
Smooth factor for session rollback frames counter.
public float RollbackFramesSmoothFactor { get; set; }
Property Value
- float
Defaults to
0.2f
- See Also
SaveStateCount
Value to override the total number of SavedFrame in state store.
public int SaveStateCount { get; set; }
Property Value
- int
Defaults to PredictionFrames + PredictionFramesOffset
- See Also
SpectatorInputBufferLength
Max length for spectators input queues.
public int SpectatorInputBufferLength { get; set; }
Property Value
- int
Defaults to InputQueueLength
StateSerializationEndianness
Sets the Endianness used for state serialization. If null, use the same endianness as ProtocolOptions. SerializationEndianness will be used.
public Endianness? StateSerializationEndianness { get; set; }
Property Value
- Endianness?
Defaults to LittleEndian
- See Also
StateSizeHint
Size hint in bytes for state serialization pre-allocation.
public int StateSizeHint { get; set; }
Property Value
- int
Defaults to
512
bytes
TimeSync
Time synchronization options.
public TimeSyncOptions TimeSync { get; set; }
Property Value
- See Also
UseBackgroundThread
Run jobs in a separated thread.
public bool UseBackgroundThread { get; set; }
Property Value
- bool
Defaults to
true
UseIPv6
Config UdpSocket to use IPv6.
public bool UseIPv6 { get; set; }
Property Value
Methods
Equals(NetcodeOptions?)
public bool Equals(NetcodeOptions? other)
Parameters
other
NetcodeOptions
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
obj
object
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(NetcodeOptions?, NetcodeOptions?)
public static bool operator ==(NetcodeOptions? left, NetcodeOptions? right)
Parameters
left
NetcodeOptionsright
NetcodeOptions
Returns
operator !=(NetcodeOptions?, NetcodeOptions?)
public static bool operator !=(NetcodeOptions? left, NetcodeOptions? right)
Parameters
left
NetcodeOptionsright
NetcodeOptions