|
|
|
|
|
by andai
913 days ago
|
|
>The movement was a bit janky, as expected from websockets Could you elaborate on this? I played a few "io games" and it seemed pretty smooth (except for the occasional laggy player). On the other hand, I did a bit of testing with WebSockets a few months ago. If I understand correctly, there are significant downsides to using TCP for games (or any latency sensitive communications for that matter): TCP header being >2x bigger than UDP, additional control packets, and TCP delays transmission of new data while old (stale) data is retransmitted. So WebSockets have these same downsides, due to being hosted over TCP. Despite all that (TCP supposedly guaranteeing delivery of WebSocket messages), I was able to produce packet loss. So you have the downsides, and as far as I can tell you don't really have the upside, since if you actually want guaranteed delivery you still need to build your own thing on top of it (which you could have just done on top of UDP in the first place, at least for messages that need it!) (Take this with a grain of salt, aside from a bit of dabbling I have close to zero knowledge and experience with networking.) |
|