valence/examples
Ryan Johnson ae7eaf15fc
Big Optimizations (#164)
Closes #84

# Changes

- Implemented new algorithm for tracking loaded entities and chunks.
- The client does not need to maintain a list of loaded chunks and
entities anymore, as this information can be inferred using carefully
maintained data from the previous tick.
- Chunks are used as a spatial partition for entities. Entity visibility
is now based on chunk visibility rather than the euclidean distance to
clients.
- The BVH is no longer strictly necessary, so it has been moved to the
new `valence_spatial_index` crate.
- The API has been generalized to support things other than entities.
The crate does not have a dependency on the main `valence` crate.
- Chunk, entity, and player list packets are now aggressively cached to
increase performance.
- Chunk packets now include some filler light data. This makes the
vanilla client lag a lot less.
- Entities and chunks must now be marked as deleted before they are
removed.
- Improved `ChunkPos` interface.
- Added function to get the duration per tick.
- Added `Index` and `IndexMut` impls to collection types.

As a result of the above changes, performance under heavy load has
increased significantly. With the rust-mc-bot test on my machine, I went
from a max of ~1000 players to ~4000 players.
2022-12-11 02:37:02 -08:00
..
biomes.rs Big Optimizations (#164) 2022-12-11 02:37:02 -08:00
building.rs Big Optimizations (#164) 2022-12-11 02:37:02 -08:00
chest.rs Big Optimizations (#164) 2022-12-11 02:37:02 -08:00
combat.rs Big Optimizations (#164) 2022-12-11 02:37:02 -08:00
conway.rs Big Optimizations (#164) 2022-12-11 02:37:02 -08:00
cow_sphere.rs Big Optimizations (#164) 2022-12-11 02:37:02 -08:00
death.rs Big Optimizations (#164) 2022-12-11 02:37:02 -08:00
entity_raycast.rs Big Optimizations (#164) 2022-12-11 02:37:02 -08:00
inventory_piano.rs Big Optimizations (#164) 2022-12-11 02:37:02 -08:00
parkour.rs Big Optimizations (#164) 2022-12-11 02:37:02 -08:00
resource_pack.rs Big Optimizations (#164) 2022-12-11 02:37:02 -08:00
terrain.rs Big Optimizations (#164) 2022-12-11 02:37:02 -08:00
text.rs Big Optimizations (#164) 2022-12-11 02:37:02 -08:00