aosprotocol icon indicating copy to clipboard operation
aosprotocol copied to clipboard

PP: 0.76 Compact World Update

Open NotAFile opened this issue 8 years ago • 5 comments

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

NotAFile avatar Jun 28 '17 03:06 NotAFile

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')

xtreme8000 avatar Sep 02 '17 17:09 xtreme8000

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

NotAFile avatar Jan 02 '18 12:01 NotAFile

yes, which is already a lot

xtreme8000 avatar Jan 02 '18 15:01 xtreme8000

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.

NotAFile avatar Jan 02 '18 15:01 NotAFile

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.

xtreme8000 avatar Jan 02 '18 16:01 xtreme8000