This is great - thanks for posting - I can definitely use Pion in the game I'm working on and it's pretty great that it can compile to wasm and work on the frontend (for the clients)
>Right now, this can only support two players on the same computer
So the example only currently works with 2 clients on the same computer? Seems like a pretty substantial limitation. How much more work is it to support other computers and 2+ clients?
So, as you can see in the article, there are already games and other projects that have grown past this limitation.
The main thing I need to do is honestly just sit down and rewrite the signaling server to make it work for multiple players, and also add CORS support.
(to be clear it will already support other computers, just not browsers on remote computers due to lacking CORS support)
So yeah this isn't an inherent limitation of WebRTC or anything, it's just writing a good signaling server for WebRTC is annoying
Check the /game folder haha. The main.go file has all the stuff related to webrtc
And yes, the signaling server IS a normal http server.
That’s the whole point. You can set up a WebRTC connection by even just emailing each other the SDPs if you want
6 comments
[ 3.6 ms ] story [ 27.2 ms ] threadSo the example only currently works with 2 clients on the same computer? Seems like a pretty substantial limitation. How much more work is it to support other computers and 2+ clients?
The main thing I need to do is honestly just sit down and rewrite the signaling server to make it work for multiple players, and also add CORS support.
(to be clear it will already support other computers, just not browsers on remote computers due to lacking CORS support)
So yeah this isn't an inherent limitation of WebRTC or anything, it's just writing a good signaling server for WebRTC is annoying
The signaling server seems to just be a normal http server