Earlier quoted context omitted.
Am I missing how that would work? That's an exponential increase in bandwidth needed to send all the mouse positions. 1 position per 100ms per player vs 10-30 per 100 ms per player. Those positions all have to be propagated to other players. so in the first case, 10 players = 10 positions per 100ms. In the 2nd case is 100-300 positions per 100ms.
Yeah but stop and think about how little bandwidth it still is. 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!
How to Animate Multiplayer Cursors
61–64 of 64 posts
Re: How to Animate Multiplayer Cursors
#62Earlier quoted context omitted.
Yeah but stop and think about how little bandwidth it still is. 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!
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
#63The spline stuff is super useful to me for another non-cursor idea I've had simmering. But I'm torn by this. The spline approach seems to look the most accurate. But when all three approaches are shown at the same time at the end, I think the spring animation might look more visually pleasing. But then, if the spring approach is only degrees better than CSS transitions, is it really worth all the extra code?
Re: How to Animate Multiplayer Cursors
#64I think it's a mistake to just drop most of the data and then try to rebuild the lost data afterwards. Nothing requires you send just a set of points across. A better approach is to transform and compress the data BEFORE sending it across the wire. This way you get the benefit of using all the available data to create a more accurate simplification. For example, each update take your cursor point set and construct a…
Another advantage of doing it this way is that the sender can downsample on large/gross movements that would render faithfully as splines with fewer points, and send more samples on tight movements.
If you're not sending uniformly-spaced (in time) samples, though, you'll want some kind of timing information encoded as well.