Top
Best
New

Posted by valorzard 3 days ago

Show HN: Making a cross-platform game in Go using WebRTC Datachannels(pion.ly)
71 points | 8 comments
kamranjon 1 day ago|
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)
jmpavlec 1 day ago||
>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?

valorzard 2 days ago|
Hi! I'm the author! Feel free to ask me questions about this
VikingCoder 1 day ago||
You specifically mention:

"Server dependence: You need to host or use two different servers (Signaling + STUN/TURN). Can use Google’s STUN, but combining signaling and STUN into one server would be nice."

I'm curious about using Tailscale with this. I don't think you can just do Tailscale Funnel? But maybe you could? Maybe Tailscale Share, and the client has to also be on Tailscale?

I feel like they would go really well together...

Thoughts?

valorzard 1 day ago||
So, having talked to people in the WebRTC community about this, you should be able to use WebRTC in a local network without having to connect to STUN/TURN

STUN/TURN matters because if you are connecting to a remote peer, you have no idea how to reach them. STUN/TURN gives you a "map" to get to the remote peer.

If you are on a VPN that doesn't matter very much (see: Hamachi)

andersmurphy 1 day ago||
Yeah if you know the ip of your peer you don't need STUN/TURN from what I remember.
VikingCoder 1 day ago||
If it's ipv6, I think that's true. If it's ipv4, then you still have problems. They could be behind NAT or worse, CGNAT.
Tepix 1 day ago||
Have you looked at Trystero https://oxism.com/trystero to establish the WebRTC connection? I used it on a small PoC last week and it worked well. Thanks to latching on to various decentralized services (Nostr etc) you don’t need your own TURN/STUN server etc.