Skip to content
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

PP: 0.76 Compact World Update #1

Open
NotAFile opened this issue Jun 28, 2017 · 5 comments
Open

PP: 0.76 Compact World Update #1

NotAFile opened this issue Jun 28, 2017 · 5 comments

Comments

@NotAFile
Copy link
Member

The .76 world update is much more compact than the .75 world update.

It might be worthwhile backporting it to .75 OS under a new packet ID

@xtreme8000
Copy link
Contributor

xtreme8000 commented Sep 2, 2017

While it is more compact, there is one better solution:
uint8_t[] - bitmask array, every bit equals one player id
(the array has as many bytes/bits as required for all server slots)
then follow by as many float x,y,z,ox,oy,oz as there are connected players

My previous idea to this was to just send out all data for connected players, leaving out those ids that are disconnected, but this would result in problems when new players connect (world update is async, so a packet send before a playercreate packet could arrive after it and result in a 'data shift')

@NotAFile
Copy link
Member Author

NotAFile commented Jan 2, 2018

I'm not quite sure what you mean? If I understand it correctly, your format just saves one byte for the ID per player?

@xtreme8000
Copy link
Contributor

xtreme8000 commented Jan 2, 2018

yes, which is already a lot

@NotAFile
Copy link
Member Author

NotAFile commented Jan 2, 2018

True, at 10ups 32 players clients just save around 240B/s which is not really significant, but the server saves 8KB/s. This figure will only grow with 64 players and higher network ups so it would probably make sense.

@xtreme8000
Copy link
Contributor

xtreme8000 commented Jan 2, 2018

I mean if we want to optimise bandwith, then do it at the most possible level. Especially considering protocol updates are hard to enforce on players.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants