Reduced Upstream/Downstream Load (#1052)

* an attempt to space out the player upstream

* some data sterilizing

* when a player is respawning, other players do not send their own update PSM's

* always display players in their proper locations when nearing their view, even if they have been stationary this whole time

* fixing configuration file and warnings
This commit is contained in:
Fate-JH 2023-04-22 00:03:13 -04:00 committed by GitHub
parent 24ee12294a
commit a1cf6c2701
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 150 additions and 36 deletions

View file

@ -183,6 +183,41 @@ game {
}
}
# Limits the dispatch of PlayerStateMessage packets from a session to its client.
# Specifically, a packet will only be dispatched based on whether
# it is to be dispatched over a threshold time after the previous dispatch time.
# The delay between packets is determined by a distance between the observer player and the target player.
# Only affects PlayerStateMessage.
player-draw = {
# Minimum number of players within a given region before scaling down the range.
# Total population - population threshold = overpopulation
population-threshold = 20
# Number of players over threshold before the reduction in range is scaled down.
# Population step / overpopulation = range step factor (integer)
population-step = 5
# Always send packets regarding target players within the given distance.
range-min = 50
# Do not send packets regarding target players beyond this distance. (sq.m)
# Treat this as an absolute render distance.
range-max = 550
# Number of meters reduced from range based on population count over threshold value. (m)
# Range step * range step factor = total distance to remove from actual distance
range-step = 25
# The distances above min-range where different delays are allowed before a successful packet must be dispatched. [m]
# Test distances against entries to find the last one that is not more than the sample distance.
# Use the index of that sample distance from this sequence in the sequence `delays` below.
ranges = [150, 300, 400]
# The absolute time delay before a successful packet must be dispatched regardless of distance. (s)
delay-max = 1000
# The time delays for each distance range before a successful packet must be dispatched. [s]
# The index for an entry in this sequence is expected to be discovered using the `ranges` sequence above.
# Delays between packets may not be as precise as desired
# as the heartbeat of upstream packets are measured in quanta of 250ms usually.
# As a consequence, additional entries with proper time spacing will push back the next proper update considerably
# while additional entries with insufficient time spacing may result in no change in behavior.
delays = [350, 600, 800]
}
doors-can-be-opened-by-med-app-from-this-distance = 5.05
}