ClientErrorUpdateRateLimit
ClientErrorUpdateRateLimit
#Overview
name: ClientErrorUpdateRateLimit
The value of this variable can be defined or overridden in .ini config files. 1
.ini config file referencing this setting variable.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of ClientErrorUpdateRateLimit is to control the minimum time interval between server-sent error corrections to a client in Unreal Engine’s networking system.
This setting variable is primarily used in the networking subsystem of Unreal Engine, specifically within the GameFramework module. It’s part of the AGameNetworkManager class, which manages various network-related settings and behaviors.
The value of this variable is set in the constructor of AGameNetworkManager in GameNetworkManager.cpp, where it’s initialized to 0.0f. However, being marked with UPROPERTY(GlobalConfig), its value can be overridden in configuration files, allowing for easy adjustment without recompiling the engine.
ClientErrorUpdateRateLimit interacts with other networking-related variables in the AGameNetworkManager class, such as ClientNetCamUpdateDeltaTime and ClientNetCamUpdatePositionLimit, which together control various aspects of client-server communication and error correction.
Developers must be aware that this variable directly impacts the frequency of error corrections sent from the server to clients. Setting it too high might result in less responsive gameplay, while setting it too low could potentially flood the network with unnecessary updates.
Best practices when using this variable include:
- Carefully balancing it with other network settings to achieve optimal performance and gameplay feel.
- Testing thoroughly with various network conditions to ensure it doesn’t negatively impact the player experience.
- Considering different values for different game modes or player counts, as network requirements may vary.
- Monitoring network traffic and adjusting this value if excessive bandwidth usage is observed due to frequent error corrections.
- Documenting any changes made to this variable, as it can significantly affect gameplay and network behavior.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseGame.ini:39, section: [/Script/Engine.GameNetworkManager]
- INI Section:
/Script/Engine.GameNetworkManager
- Raw value:
0.0f
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Classes/GameFramework/GameNetworkManager.h:174
Scope (from outer to inner):
file
class class AGameNetworkManager : public AInfo
Source code excerpt:
/** Minimum delay between the server sending error corrections to a client, in seconds. */
UPROPERTY(GlobalConfig)
float ClientErrorUpdateRateLimit;
/** Minimum delay between calls to ServerUpdateCamera, in seconds. */
UPROPERTY(GlobalConfig)
float ClientNetCamUpdateDeltaTime;
/** Camera position change limit, when exceeded allows an immediate ServerUpdateCamera call. */
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/GameNetworkManager.cpp:39
Scope (from outer to inner):
file
function AGameNetworkManager::AGameNetworkManager
Source code excerpt:
ClientNetSendMoveThrottleOverPlayerCount = 10;
ClientAuthorativePosition = false;
ClientErrorUpdateRateLimit = 0.0f;
ClientNetCamUpdateDeltaTime = 0.0166f;
ClientNetCamUpdatePositionLimit = 1000.0f;
bMovementTimeDiscrepancyDetection = false;
bMovementTimeDiscrepancyResolution = false;
MovementTimeDiscrepancyMaxTimeMargin = 0.25f;
MovementTimeDiscrepancyMinTimeMargin = -0.25f;
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/GameNetworkManager.cpp:150
Scope (from outer to inner):
file
function bool AGameNetworkManager::WithinUpdateDelayBounds
Source code excerpt:
const float TimeSinceUpdate = PC->GetWorld()->GetTimeSeconds() - LastUpdateTime;
if (ClientErrorUpdateRateLimit > 0.f && TimeSinceUpdate < ClientErrorUpdateRateLimit)
{
return true;
}
else if (TimeSinceUpdate < GetDefault<AGameNetworkManager>(GetClass())->CLIENTADJUSTUPDATECOST/PC->Player->CurrentNetSpeed)
{
return true;