Live data from Hacker News

Make any site multiplayer in a few lines. Serverless WebRTC matchmaking

oxism.com

51–60 of 71 posts

Re: Make any site multiplayer in a few lines. Serverless WebRTC matchmaking

#51
post #45
post #42

Earlier quoted context omitted.

wait but this should only work on locals / close networks shouldn't it ? i thought you still need some proxying in other cases (hence the turn) - i really need to study this again asap tough

STUN gives back your public IP:port, TURN gives you assigned proxied IP:port. You take that data and send to the peer over signaling connection, and they call you back on that IP:port. Most NAT implementations make and keep a temporary mapping between public port to private IP consistent[1] for few minutes, and not completely random per destination[2], so it usually works. 1: e.g. router.public.ip.example:23456 192.1…

woaw thank you ; will definitely hop back on this topic now ; very much appreciate the answer

Re: Make any site multiplayer in a few lines. Serverless WebRTC matchmaking

#54
The site says "Right now youʼre the only person with the page open, but you can cheat and just open this URL in another tab to see what itʼs like with others." I'm using Firefox and Chrome on Ubuntu. When I try a second tab or one in Firefox and one in Chrome my computer's network connection locks up (pings stop). I have to close the tabs and then pings to google.com come back at 30 seconds and slowly come back to normal. It appears that http://playground.nostrcheck.me/relay is the problem.

Re: Make any site multiplayer in a few lines. Serverless WebRTC matchmaking

#55

I've been exploring PeerJS ( https://peerjs.com/ ) recently. This seems like a similar concept. Would it give me anything that PeerJS doesn't?

I'm the Trystero author and I'd say both libs attempt to accomplish the same goal but with very different APIs. One key difference is PeerJS uses a single centralized server by default for matchmaking, whereas Trystero offers lots of flexibility and redundancy, using various signaling connections in parallel.

Re: Make any site multiplayer in a few lines. Serverless WebRTC matchmaking

#56

It'd be cool if you could easily publish multiplayers games to itch.io or similar websites from Godot or Unity and have automatic matchmaking: the first player to visit the game pages gets matched automatically with the next, and so on. Is there anything like that?

You can't find the first one without the first one having static IP found from something in the page, which this thing solves using external services of developer choice, including commercial Supabase and Firebase systems. But the docs says it supports Bittorrent for that, so it's probably good.

Re: Make any site multiplayer in a few lines. Serverless WebRTC matchmaking

#57
Few things

1) Serverless isn't really serverless and we are sick of this AWS speak. The trend lasted briefly but it isn't appealing when you are metered for every little thing and unable to SSH into a host and resolve issues

2) You can already do matchmaking easily with FOSS self-hosted solutions. These don't cost a lot of computing or bandwidth but some developers think its a chaotic and resource heavy problem.

Re: Make any site multiplayer in a few lines. Serverless WebRTC matchmaking

#59
post #15

Earlier quoted context omitted.

Do those laws even apply to P2P apps without central servers?

They do, but unlike what the OP claims, you do not need to age verify your site just because you added a social element. If the purpose is not to distribute pornography/other age restricted materials and you are able to moderate the site (ie: are not facebook scale), this is not required. The law sucks but the misinformation around it is getting out of hand.

So if a site is completely p2p, it's illegal because it is unmoderatable?
Post reply on HN