Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the viewDistance sent by client and actually send up to that amount of chunks. #303

Open
GotoFinal opened this issue Dec 3, 2021 · 7 comments
Labels
enhancement New feature or request

Comments

@GotoFinal
Copy link

Is your feature request related to a problem? Please describe.
Currently my friends server must keep the render distance pretty low, because people with slower internet even when they have view distance of 2-5 keep disconnecting or lagging due to massive amounts of chunks being sent from server to client for no reason.

Describe the solution you'd like
Client sends ServerboundClientInformationPacket each time view distance is changed as far as i understand, so this value can be just read and only send chunks up to Math.min(playerViewDistance, serverViewDistance), currently player view distance is just read from packet and ignored.

Describe alternatives you've considered
Sending of chunks could be also priortized by distance to player and limited to X amounts of chunks per second, big updates can cause issues filling the buffers and client stops receiving important packets while waiting for that 2000 chunks. - unless thats already implemented?

Additional context

@GotoFinal GotoFinal added the enhancement New feature or request label Dec 3, 2021
@OrangeCatSeth
Copy link

This could actually be quite useful for players with limited hardware or slow internet.. The server sending updates for chunks the player can't see is wasteful.. Consumes both bandwidth and client side resources unnecessarily.

@Draradech
Copy link

This seems related to https://bugs.mojang.com/browse/MC-228420 (connection issues on slow connection when server view distance is high). If the server would only send chunks visible by the client, that should fix it.

@Mhowser
Copy link

Mhowser commented Jan 10, 2022

Is it possible to only send the chunks that are in front of the players view? Just like clientside culling?

@GotoFinal
Copy link
Author

GotoFinal commented Jan 10, 2022

Is it possible to only send the chunks that are in front of the players view? Just like clientside culling?

@Mhowser technically yes, but it would be more complicated and adds a lot of possible risks/edge cases to handle, as culling on client side is just about rendering, the data is still there, if you remove the data then suddenly a lot of stuff might break, like any mods checkings for blocks behind players, and sending chunks is a bit of latency so players would see that when rotating fast, and people could produce network load by just rotating a lot on high visibility... just a lot of risks, possible issues, etc, imho not worth it.
But if anything then better make it only partially, like load 1/3 of expected chunks behind the player to keep enough data behind the player to make all typical stuff still work. But imho still not worth the effort.

It would be worth it if minecraft would implement some smart chunk cache, but that would require changes on both client and server side and probably protocol itself - so its something for more game changing mods or Mojang itself, where server would be only re-sending the chunks that changed.

@Draradech yep, that for sure the same issue.

@SuperFlue
Copy link

I would throw a request in for this too. This issue is really annoying.

Or maybe there could be some kind of tweaks to chunk data sent from the server (rate-limiting?).
Though that might cause other issues, but would be nice as an optional feature.

@ghost
Copy link

ghost commented Aug 3, 2022

i'm mad about it
When I play on a local network through ports
players kicks

@CuteistFox

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

6 participants