3 ms·
Has there been any progress with using browsers' support for QUIC for latency-sensitive game networking?
by lytedev 2y ago
Has there been any progress with using browsers' support for QUIC for latency-sensitive game networking?
- modeless 2y agoThere is WebTransport which is based on HTTP/3 (formerly QUIC), however it is not available in Safari (no surprise there) and also it does not support peer-to-peer connections. WebRTC is available today in all browsers and supports peer-to-peer unreliable UDP.
- thot_experiment 2y agoIs there a reasonable networking library for just throwing data packets somewhere using WebRTC in browser, specifically with a client-server rather than P2P? I've probably started work on such a thing like 4 times now but I've never gotten very far because I always found that whole stack incredibly convoluted and onerous to work with if you're not using it for it's intended usecase, but I really would like to have a go-to library to make little multiplayer webgames that use UDP under the hood.
- modeless 2y agoYeah WebRTC is not a well-factored API. It's basically almost an entire end-to-end implementation of a video calling app Google acquired and bolted on the side of Chrome. If what you're making is not a straight video calling app then it's a very strange API to use. But it does work! The problem with WebRTC for this kind of application is the need for a whole separate "signaling server" just for connection establishment, plus STUN/TURN, plus your actual application server makes three required servers. It puts a really high minimum on the complexity of any WebRTC app. For a client-server only application you might be able to combine all three servers into the same binary. I haven't seen a library that does that, but maybe it exists, I haven't looked extensively. The HumbleNet library that I use provides an implementation of the signaling server for connection establishment, and for the client app it hides all the WebRTC complexity behind the BSD sockets API. So all you need to do is host the server.