by sktrdie · 5y ago · 0 comments
Use off-shelf-chatrooms-software to create rooms but instead of chatting you send ROM game commands to each other and allow for multiplayer gaming!
That said, it was better than NAT punch-through and/or UPNP which are not very reliable these days.
If that fails, then there's TURN which acts like a proxy between the peers.
WebRTC has data channels, which are currently the only way to achieve unreliable and unordered real-time communication (UDP-style) between the browser and other browsers or a server. This is pretty essential for any networked application where latency is critical, like voice and video and fast-paced multiplayer games.
As other commenters have noted, it's a royal pain in the ass to set up WebRTC if all you want is UDP-style communication between a server and browser, since you need to wrangle half a dozen other protocols in the process.
However! A new API, WebTransport[1], is actively being developed that will offer a WebSockets-like (read: super simple to set up) API for UDP-style communication. I am extremely excited about it and its potential for real-time browser-based multiplayer games (which I'm working on).
WebTransport isn’t going to be here soon though, I would be cautious in investing. Stuff like Congestion Control is still a big unknown [0] and we don’t have Datagrams everywhere.
I just starred it, it does seem like it'd alleviate a some of the pain. Another similar (more end to end) project I had come across is: geckos.io. This previous HN thread[1] discusses some of the (at least perceived) difficulty with using WebRTC as a "WebSockets but UDP" solution.
I'm not sure I follow the concern about congestion control. UDP doesn't have it either, presumably since if you're building an application that requires such latency sensitivity, you don't mind rolling your own congestion control algorithm that makes most sense given your application's specific needs, right? Pretty much all FPS games do this, as far as I understand.
[0] https://github.com/geckosio/geckos.io [1] https://news.ycombinator.com/item?id=23666679
This phrase doesn't mean anything.
The game list includes games that do not support PlayStation Link Cable, so this has to implement netplay the same way other emulators do:
Both host and client emulate the game in sync, exchanging controller input
Edit: Seems like I was wrong about the latter, it runs the emulator on the host only, who sends video/audio from clients (and they send inputs).
If I'm not mistaken, RetroArch's networking functions in that way.
300 IQ!