[GH-ISSUE #5008] Dedicated server: send saved chunks past the view distance, out to max_view_distance #1517

Closed
opened 2026-11-02 15:47:38 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @rdbtCVS on GitHub (Oct 31, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5008

Originally assigned to: @rdbtCVS on GitHub.

🤖 Filed by rdbtCVS's AI agent (Claude Code, Claude Opus 5.5), not by rdbtCVS personally.

What

Dedicated servers: an optional outer ring of saved chunks past view_distance, out to a new max_view_distance, sent to players whose own render distance reaches that far.

  • Inside view_distance nothing changes: chunks load, stay loaded, and are generated if missing.
  • Between the two distances only chunks already in the save are sent. The ring never generates terrain. The server loads each chunk, sends it, and drops it again, keeping only the fact that the player has it, so it costs a disk read and some bandwidth, not memory or ticking.
  • A small cache of encoded chunks keeps a player walking back and forth from making the server read the same chunks again.
  • A brake: while the server's ticks run long or a client is slow to acknowledge chunks, the ring stops growing and shrinks; it grows back once the server is quiet. It never goes below view_distance.
  • Off by default (max_view_distance equal to view_distance), since it changes how far players see compared with vanilla. /pregen gives a full ring instead of only the chunks players have visited.

Why

Generating new chunks is what costs a server; sending chunks it already has is cheap. Players with a large render distance get a wider view on servers with pregenerated worlds, at almost no cost to the server.

Different from the far terrain (LOD) PRs #4945, #4946 and #4947: those send heightmap tiles over horizon:lod; this sends real chunks over the vanilla protocol, so vanilla clients get it too.

Originally created by @rdbtCVS on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5008 Originally assigned to: @rdbtCVS on GitHub. > 🤖 Filed by rdbtCVS's AI agent (Claude Code, Claude Opus 5.5), not by rdbtCVS personally. ## What Dedicated servers: an optional **outer ring of saved chunks** past `view_distance`, out to a new `max_view_distance`, sent to players whose own render distance reaches that far. - Inside `view_distance` nothing changes: chunks load, stay loaded, and are generated if missing. - Between the two distances only chunks already in the save are sent. The ring never generates terrain. The server loads each chunk, sends it, and drops it again, keeping only the fact that the player has it, so it costs a disk read and some bandwidth, not memory or ticking. - A small cache of encoded chunks keeps a player walking back and forth from making the server read the same chunks again. - A brake: while the server's ticks run long or a client is slow to acknowledge chunks, the ring stops growing and shrinks; it grows back once the server is quiet. It never goes below `view_distance`. - Off by default (`max_view_distance` equal to `view_distance`), since it changes how far players see compared with vanilla. `/pregen` gives a full ring instead of only the chunks players have visited. ## Why Generating new chunks is what costs a server; sending chunks it already has is cheap. Players with a large render distance get a wider view on servers with pregenerated worlds, at almost no cost to the server. Different from the far terrain (LOD) PRs #4945, #4946 and #4947: those send heightmap tiles over `horizon:lod`; this sends real chunks over the vanilla protocol, so vanilla clients get it too.
Author
Owner

@rdbtCVS commented on GitHub (Oct 31, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6540108647 --> @rdbtCVS commented on GitHub (Oct 31, 2026): 🤖 Agent: /claim
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#1517
No description provided.