-
Notifications
You must be signed in to change notification settings - Fork 66
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
Use FE2CL_..._AROUND, _AROUND_DEL packets #295
Conversation
65fdeb9
to
73aab0b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I really like how cleanly you implemented this. The main things to fix are the buffer size one-offs and the transportation-around-del gotcha.
I think we should let this one bake on the 104 server for a few days before pushing it to Academy and maybe before merging to the repo as well; just because it's such a core component.
d333bec
to
353f90c
Compare
Introduces a generic, fixed-size `Bucket` type in place of the inner vector. This does add size generics but I think it's a very good tradeoff considering how performance-sensitive this codepath is.
353f90c
to
486a996
Compare
Currently, when a player's visible chunks change, we send a single enter/exit packet for each entity in the vicinity.
This PR makes it so that we batch these entities in AROUND and AROUND_DEL packets (for enter and exit, respectively).
Since the packet buffer size is fixed, there is a maximum number of entities that we can send per packet. Thus we have to do dynamic batching, helped by a new
Bucket
utility class. To minimize the number of packets, I modified the buffer size for 728 and 1013 to match the client's increased buffer size.