temportalflux / crystal-sphinx

GNU General Public License v3.0
0 stars 0 forks source link

Optimize chunk replication #8

Open temportalflux opened 2 years ago

temportalflux commented 2 years ago

Replicating chunks is taking a HUGE amount of time (probably because of chunk data serialization). Try to optimize this, but if there are no significant gains or straightforward paths, the replicator system should process in a separate thread.

image

temportalflux commented 2 years ago

Serializing the replicate world packet for a given chunk can take up to 5ms per chunk. image

temportalflux commented 2 years ago

The "Game Development In Rust" discord had some good discussion around this topic a couple days ago. Saving these screenshots here as a note on how to optimize sending chunks over the network when users join.

https://www.gamedevs.org/uploads/1500-archers-age-of-empires-network-programming.pdf

image image image

temportalflux commented 2 years ago

Moving this ticket out of investigation and updating its name.

temportalflux commented 2 years ago

2 optimizations: