-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Manually set global last-changed tick #109
Comments
So it's basically pause replication after specific tick? Make sense to me. |
No longer relevant after #16. |
This is still relevant, #116 still scans the entire world every tick even if there is nothing to replicate. |
But there is not such thing as last changed tick. I feel like it's something that should be solved on Bevy side. They considering adding change detection on archetype and entity levels. |
Right, that's why I said "it is [sometimes] feasible to manually track the last tick where something in the world was modified". |
Instead of global last-change tick, we could do Since renet uses Bytes, we can just store a copy per client. Very cheap, no need to allocate again. |
There is a category of games that have limited conditions where the server world will be modified. For those games, it is feasible to manually track the last tick where something in the world was modified (or an event sent to clients). Once the last world-change-tick has been acked, it is a waste of CPU time to scan the ECS world for individual changes.
It would be nice if we could manually define/inject the last world-change-tick to the server replication loop, either on a global or per-client basis. We can then short-circuit replication if a client has acked that tick. Moreover, even if a client has not acked a tick, if we have cached replication buffers for the tick range (last acked, last world-change], then we don't need to scan the world (just send the buffers again).
The text was updated successfully, but these errors were encountered: