Photon Fusion 1.1.2

Public Types | Public Attributes | Properties | List of all members
SimulationConfig Class Reference

Project configuration settings specific to how the Simulation class behaves. More...

Public Types

enum class  Topologies
 
enum class  StateReplicationModes
 Enumerates the types of state replication available. More...
 

Public Attributes

int InputDataWordCount
 
int TickRate = 60
 The update rate of the simulation in Hz (ticks per second). More...
 
int MaxPrediction = 60
 The max amount of predicted ticks on a client in server or host mode, if this is overstepped on client a hard reset will be done on client to bring it down to correct prediction . More...
 
int DefaultPlayers = 10
 The default number of players allowed to join a game instance. Can also be changed in code when starting Fusion. More...
 
StateReplicationModes ReplicationMode
 Determines which StateReplicationModes mode will be used. More...
 
Topologies Topology
 The topology used More...
 
bool HostMigration
 If, in host mode, we should allow host migration if the current host leaves. More...
 
bool ObjectInterest
 Selects if Object Interest should be used when running in StateReplicationModes.EventualConsistency mode. When enabled, clients will only receive updates for objects which they have interest in. How interest is determined for each NetworkObject is based on its NetworkObject.ObjectInterest mode setting. More...
 
bool SimulationCulling
 Uses area of interest queries to cull execution of Fixed Update Network for objects outside of any players area of interest. More...
 
int ServerPacketInterval = 1
 This value times TickRate determines the network send rate for the server. A value of 1 instructs the server to send state updates to clients every simulation tick. Values greater than 1 will send a input/state updates every N ticks. Higher values reduce data usage, in exchange for increased latency and reduced state sync accuracy. More...
 
int ClientPacketInterval = 1
 This value times TickRate determines the network send rate for clients. A value of 1 instructs clients to send input/state updates to the server every simulation tick. Values greater than 1 will send an update every N ticks. Higher values reduce data usage, in exchange for increased latency and reduced state sync accuracy. More...
 

Properties

int InputTotalWordCount [get]
 
double DeltaTime [get]
 Returns the inverse of TickRate. The time (in seconds) between simulation ticks. More...
 
double ServerDeltaTime [get]
 Returns (DeltaTime * ServerTickMultiplier). More...
 
double ServerPacketDeltaTime [get]
 Returns (ServerPacketInterval * ServerDeltaTime). This is the effective time interval (in seconds) between server tick updates to clients. More...
 
double ClientPacketDeltaTime [get]
 Returns (ClientPacketInterval * DeltaTime). This is the effective time interval (in seconds) between client input/state updates from the client. More...
 

Detailed Description

Project configuration settings specific to how the Simulation class behaves.

Member Enumeration Documentation

◆ StateReplicationModes

enum StateReplicationModes
strong

Enumerates the types of state replication available.

Enumerator
DeltaSnapshots 

Server Authoritative, Delta Snapshots send the complete world state from every network tick. This produces the highest accuracy simulation replication, but may not be suitable for higher object and player counts.

EventualConsistency 

Server Authoritative, Eventual Consistency allows for partial/culled state transmission, which may be necessary for implementing Area of Interest, high networked object counts, or high player counts.

◆ Topologies

enum Topologies
strong

Enumerator
ClientServer 

Classic server and client model

Shared 

Relay based shared world model

Member Data Documentation

◆ ClientPacketInterval

int ClientPacketInterval = 1

This value times TickRate determines the network send rate for clients. A value of 1 instructs clients to send input/state updates to the server every simulation tick. Values greater than 1 will send an update every N ticks. Higher values reduce data usage, in exchange for increased latency and reduced state sync accuracy.

◆ DefaultPlayers

int DefaultPlayers = 10

The default number of players allowed to join a game instance. Can also be changed in code when starting Fusion.

◆ HostMigration

bool HostMigration

If, in host mode, we should allow host migration if the current host leaves.

◆ InputDataWordCount

int InputDataWordCount

◆ MaxPrediction

int MaxPrediction = 60

The max amount of predicted ticks on a client in server or host mode, if this is overstepped on client a hard reset will be done on client to bring it down to correct prediction .

◆ ObjectInterest

bool ObjectInterest

Selects if Object Interest should be used when running in StateReplicationModes.EventualConsistency mode. When enabled, clients will only receive updates for objects which they have interest in. How interest is determined for each NetworkObject is based on its NetworkObject.ObjectInterest mode setting.

◆ ReplicationMode

StateReplicationModes ReplicationMode

Determines which StateReplicationModes mode will be used.

◆ ServerPacketInterval

int ServerPacketInterval = 1

This value times TickRate determines the network send rate for the server. A value of 1 instructs the server to send state updates to clients every simulation tick. Values greater than 1 will send a input/state updates every N ticks. Higher values reduce data usage, in exchange for increased latency and reduced state sync accuracy.

◆ SimulationCulling

bool SimulationCulling

Uses area of interest queries to cull execution of Fixed Update Network for objects outside of any players area of interest.

◆ TickRate

int TickRate = 60

The update rate of the simulation in Hz (ticks per second).

◆ Topology

Topologies Topology

The topology used

Property Documentation

◆ ClientPacketDeltaTime

double ClientPacketDeltaTime
get

Returns (ClientPacketInterval * DeltaTime). This is the effective time interval (in seconds) between client input/state updates from the client.

◆ DeltaTime

double DeltaTime
get

Returns the inverse of TickRate. The time (in seconds) between simulation ticks.

◆ InputTotalWordCount

int InputTotalWordCount
get

◆ ServerDeltaTime

double ServerDeltaTime
get

Returns (DeltaTime * ServerTickMultiplier).

◆ ServerPacketDeltaTime

double ServerPacketDeltaTime
get

Returns (ServerPacketInterval * ServerDeltaTime). This is the effective time interval (in seconds) between server tick updates to clients.