ClientNetSendMoveDeltaTimeThrottled
ClientNetSendMoveDeltaTimeThrottled
#Overview
name: ClientNetSendMoveDeltaTimeThrottled
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 ClientNetSendMoveDeltaTimeThrottled is to control the rate at which client movement updates are sent to the server in high-traffic or low-bandwidth network conditions. This variable is part of Unreal Engine’s network optimization system for character movement.
ClientNetSendMoveDeltaTimeThrottled is primarily used by the Engine module, specifically within the GameFramework and character movement systems. It’s defined in the AGameNetworkManager class, which is responsible for managing network-related game settings.
The value of this variable is set in the constructor of AGameNetworkManager in GameNetworkManager.cpp, with a default value of 0.0222 seconds. However, it can be modified through configuration files as it’s marked with the UPROPERTY(GlobalConfig) macro.
This variable interacts closely with other network-related variables such as ClientNetSendMoveDeltaTime, ClientNetSendMoveDeltaTimeStationary, ClientNetSendMoveThrottleAtNetSpeed, and ClientNetSendMoveThrottleOverPlayerCount. These variables work together to determine when and how often client movement updates are sent to the server.
Developers must be aware that this variable is used in place of ClientNetSendMoveDeltaTime when either the player count is high (over ClientNetSendMoveThrottleOverPlayerCount) or when the network speed is low (less than or equal to ClientNetSendMoveThrottleAtNetSpeed). This helps to reduce network traffic in challenging network conditions.
Best practices when using this variable include:
- Carefully balancing it with other related variables to optimize network performance without sacrificing gameplay responsiveness.
- Testing thoroughly with various network conditions and player counts to ensure smooth gameplay.
- Considering adjusting this value based on the specific needs of your game, especially if it involves fast-paced movement or large numbers of players.
- Monitoring network performance metrics in real-world scenarios to fine-tune this and related variables.
- Being cautious when modifying this value, as it can significantly impact both network performance and player experience.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseGame.ini:34, section: [/Script/Engine.GameNetworkManager]
- INI Section:
/Script/Engine.GameNetworkManager
- Raw value:
0.0222
- 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:151
Scope (from outer to inner):
file
class class AGameNetworkManager : public AInfo
Source code excerpt:
/**
* ClientNetSendMoveDeltaTime is the default minimum time delta of CharacterMovement client moves to the server. When updates occur more frequently, they may be combined to save bandwidth.
* This value is not used when player count is over ClientNetSendMoveThrottleOverPlayerCount or player net speed is <= ClientNetSendMoveThrottleAtNetSpeed (see ClientNetSendMoveDeltaTimeThrottled).
*/
UPROPERTY(GlobalConfig)
float ClientNetSendMoveDeltaTime;
/** ClientNetSendMoveDeltaTimeThrottled is used in place of ClientNetSendMoveDeltaTime when player count is high or net speed is low. See ClientNetSendMoveDeltaTime for more info. */
UPROPERTY(GlobalConfig)
float ClientNetSendMoveDeltaTimeThrottled;
/** ClientNetSendMoveDeltaTimeStationary is used when players are determined to not be moving or changing their view. See ClientNetSendMoveDeltaTime for more info. */
UPROPERTY(GlobalConfig)
float ClientNetSendMoveDeltaTimeStationary;
/** When player net speed (CurrentNetSpeed, based on ConfiguredInternetSpeed or ConfiguredLanSpeed) is less than or equal to this amount, ClientNetSendMoveDeltaTimeThrottled is used instead of ClientNetSendMoveDeltaTime. */
UPROPERTY(GlobalConfig)
int32 ClientNetSendMoveThrottleAtNetSpeed;
/** When player count is greater than this amount, ClientNetSendMoveDeltaTimeThrottled is used instead of ClientNetSendMoveDeltaTime. */
UPROPERTY(GlobalConfig)
int32 ClientNetSendMoveThrottleOverPlayerCount;
/** Minimum delay between the server sending error corrections to a client, in seconds. */
UPROPERTY(GlobalConfig)
float ClientErrorUpdateRateLimit;
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Components/CharacterMovementComponent.cpp:12438
Scope (from outer to inner):
file
function float UCharacterMovementComponent::GetClientNetSendDeltaTime
Source code excerpt:
else
{
NetMoveDelta = FMath::Max(GameNetworkManager->ClientNetSendMoveDeltaTimeThrottled, 2 * GameNetworkManager->MoveRepSize / Player->CurrentNetSpeed);
}
// Lower frequency for standing still and not rotating camera
if (Acceleration.IsZero() && Velocity.IsZero() && ClientData->LastAckedMove.IsValid() && ClientData->LastAckedMove->IsMatchingStartControlRotation(PC))
{
NetMoveDelta = FMath::Max(GameNetworkManager->ClientNetSendMoveDeltaTimeStationary, NetMoveDelta);
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/GameNetworkManager.cpp:34
Scope (from outer to inner):
file
function AGameNetworkManager::AGameNetworkManager
Source code excerpt:
MaxClientSmoothingDeltaTime = 0.50f;
ClientNetSendMoveDeltaTime = 0.0166f;
ClientNetSendMoveDeltaTimeThrottled = 0.0222f;
ClientNetSendMoveDeltaTimeStationary = 0.0166f;
ClientNetSendMoveThrottleAtNetSpeed = 10000;
ClientNetSendMoveThrottleOverPlayerCount = 10;
ClientAuthorativePosition = false;
ClientErrorUpdateRateLimit = 0.0f;
ClientNetCamUpdateDeltaTime = 0.0166f;