You could, but I think for most web applications the authors wouldn’t think about binary encoding. So you’d end up with something like:
{“x”:50,”y”:56}
Encoded as a UTF8 string, which is 15 bytes, x100 is 1.5kb/second/participant.Ok, I guess that’s still not that much.
Re:How to Animate Multiplayer Cursors
by Etherlord87 on Thursday July 07, 2022 @07:37AM
(#32012681)
So you implement spline logic rather than a byte stream? Doesn't make sense to me.
That’ll get compressed a bit too.
Re:How to Animate Multiplayer Cursors
by Etherlord87 on Thursday July 07, 2022 @07:36AM
(#32012677)
Well spotted, and in reality it would more likely be 4096x4096 plane, encoded as 12 bits + 12 bits = 3 bytes. And probably 30 FPS giving 90 B/s. So the only problem is how often you want to send those packets, but the bandwidth of the cursor data becomes completely irrelevant.
X and Y can easily be 2 bytes each, 4 bytes total. 100 samples per second is a mere 400 bytes per second. You could do it from a dialup modem from the early 90s!