Expand description
This module is responsible for sending chunks to the client.
Chunk sending runs on its own independent tick loop, separate from the game
tick. The three-phase design (prepare โ encode โ commit) minimizes lock hold
time on the per-player ChunkSender mutex so that game-tick operations like
mark_chunk_pending_to_send and drop_chunk are never blocked for long.
Structsยง
- Chunk
Sender - This struct is responsible for sending chunks to the client.
- Encoded
Chunk - Encoded chunk packet plus the holder and readiness generation it was built from.
- Prepared
Batch - Data collected during the prepare phase, used to encode and then commit.
- Prepared
Chunk - One chunk selected during the prepare phase.
Constantsยง
- MAX_
CHUNKS_ ๐PER_ TICK - Maximum chunks per tick (vanilla: 64.0, we use 500.0 for faster loading)
- MAX_
UNACKNOWLEDGED_ ๐BATCHES - Maximum unacknowledged batches after first ack (vanilla: 10)
- MIN_
CHUNKS_ ๐PER_ TICK - Minimum chunks per tick (vanilla: 0.01)
- START_
CHUNKS_ ๐PER_ TICK - Starting chunks per tick (vanilla: 9.0)