Lithium (Fabric)

Lithium (Fabric)

22M Downloads

dimension specific and dynamic view distance

noxifoxi opened this issue ยท 2 comments

commented

Is your feature request related to a problem? Please describe.
If the player numbers on a server fluctuate a lot, it's hard to find a good middle ground between a reasonable view distance and bearable lag when the numbers are high (especially on lower-end hardware). There also is not a lot of reason to have a view distance higher than 8 chunks (if I remember right) in the nether, because of the obstructive nature and the distant fog.

Describe the solution you'd like
An option to enable a dynamic view-distance range which, the server then will use a TPS/MSPT threshold to determine the view distance. If the server struggles to keep up, it will lower the view distance and send less chunks to the players, vice versa it will increase the view distance up to the max setting if it has the resources to do so. There also should be an option or hard coded value on how fast the server checks if it should switch the render distance (probably shouldn't be too rapid, I think it should be a long time until the view distance gets adjusted) and lithium should keep track of the average server performance to not run into the problem of always changing the render distance back and forth.
Furthermore an option to set different view distances for each dimension no matter if they are set to be dynamic or not.

Describe alternatives you've considered
Alternative fabric mods:

  • QuiltServerTools/TickTools
    Has dimension specific and dynamic view distance. The mod unfortunately seems to have a slow development cycle, no 1.18 commits/branches yet.
  • Wesley1808/ServerCore-Fabric
    Has too many other features. Dynamic view distance works but it is unusable, because I ran into problems where the world completely unloads for a second and freezes the client while the mod changed the view distance dynamically, this happened every 30 seconds or so. (This does not necessarily have to be the case, see BasiqueEvangelist/worldspecificviewdistance-fabric)
  • henkelmax/dynamic-render-distance
    Does only dynamic view distance (no dimension specific (refused my feature request)), but has some problems, like where the mod switches the view distance too rapidly and does not keep track if a higher render distance is always too much for the server to handle.
  • BasiqueEvangelist/worldspecificviewdistance-fabric
    No longer maintained. Dimension specific, but only fixed view distance. Adds commands to change the view distance while the server is running, it worked in 1.17 without any issues and it does not force the client to reload all chunks like ServerCore does.

Additional context
If I am not mistaken, I think lithium would benefit from these features and they would further optimise server performance, creating a pleasant gameplay experience while having a good balance between a high as possible view distance and no lags.

commented

Noe that many issues with henkelmax/dynamic-render-distance should be fixed now, or on my own branch if last PR is not accepted by the time you read this: https://github.com/GotoFinal/dynamic-render-distance/tree/1.18 I impelemented a limiter there so it cant change by more than 256 chunks at once. As it can lag really bad during bigger change... And separates view and simulation.

commented

This is out of scope of lithium, which is intended to optimize without adding or changing features. If there are any compatibility issues with mods that implement this feature, we will try to resolve them.