Live data from Hacker News

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

oxism.com

1–10 of 71 posts

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

#4
I use Trystero as one of the transfer methods on wiredove. it's super cool. it doesn't always work because punching thru NAT is a pain, but when it does work it's awesome. Trystero is also cool if you want to hook up a webcam or a video meeting with the minimal amount of code.

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

#7
post #6

WOW this is cool! I love this, but as a nitpick, how scalable is it to do each connection peer to peer? Doesn't that mean that I have to keep a stream connection open for everyone who I want to include in the room?

It's not very scalable. Regular rules of webrtc apply, so once you go to a certain number of users, you would have to use an SFU approach.

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

#8
This isn't serverless. It's just using someone else's servers for the SDP signaling. And in a production app you'd likely also need turn servers and maybe SFU servers.

There are some true serverless approaches out there for the signaling, e.g. where both peers scan each other's QR code, but that obviously has very limited use.

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

#10
Just a reminder that this kind of user-to-user interaction feature makes your website a "social network" according to UK regulation (and Mississippi's, and more jurisdictions coming soon), and therefore you must get copies of government ID of your users so that you can deny them access if they are underage, and rattle them to the police if you suspect they are committing thought crime by sending certain fruits. Obey the law.
Post reply on HN