Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-193153

View-distance is often intolerable on SMP

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Awaiting Response
    • None
    • 1.16.1
    • None
    • Unconfirmed
    • (Unassigned)

      Problem: View distance is often intolerable. Theoretical is 50+ blocks. Actual is ~10 blocks in SMP. It takes ages to transfer large amounts of data even on decent hardware; you see empty void, missing mountains, an edge of the world really close, etc.

       

      Proposed solution: Multiple clients will trivially be able to log in and instantly render 50+ blocks, and elytra around while seeing 50+ blocks, while the server is not overloaded. The player will still see reasonable 'live' changes fairly quickly (especially because the server is no longer 20000ms behind trying desperately to keep up with communicating entire chunks at the same time).

       

      Solution details: Client keeps a local cache of chunks in persistent storage / hard-disk. Server hashes all chunks (sometimes in groups of 4x4 for efficiency). There are two levels of hashes: "most-recent" hash, and "stale-but-workable" hash (updated every 10 blocks etc.). e.g. An enderman picking up a block would usually update only the first hash of the chunk and the 4x4 superchunk, and only the "stale" hash if it was the 10th modification. Server keeps client up-to-date only if the client hash doesn't match. The required communication is only a few bytes, allowing instant staleness-checking of huge swaths of the world. Server keeps client up-to-date to "most-recent" when the player is nearby, or velocityVector*2sec would be nearby; otherwise, another thread in the background will push "most-recent" chunks to the client when the server is not busy.

       

      This ensures the server does an asymptotically minimal / optimal amount of work, while still making sure things are fairly up-to-date.

       

      Jira ate my original bug report; please excuse the brevity as I had to retype it from scratch.

            Unassigned Unassigned
            d6_6b d6_6b
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: