Live data from Hacker News

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

oxism.com

11–20 of 71 posts

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

#11
post #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…

I made a little multiplayer arcade game last year. I added a chat feature with TTS. About an hour after launch it was just the n word over and over again. (Also zalgo text, which somehow strained the browser more than a video game!)

I removed the chat feature.

At any rate, getting banned by OFCOM is starting to sound like a badge of honor these days.

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

#14
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?

> how scalable is it

Considering the site just spams my error console with

  DOMException: Failed to construct 'RTCPeerConnection': Cannot create so many PeerConnections
I'd say not very.

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

#15
post #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…

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

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

#16

I remember cloning the twilio code for video conferencing for webrtc and it working instantly. Very cool.

On the other hand setting up the turn servers and so on for signaling before the webrtc connection is established can be a nightmare, if not using a third party service like twilio

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

#17
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?

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

#18
post #15
post #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…

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

Yes. Its defined without a technical requirement - just legal ones.

Each host will carry a legal responsibility for both what they push, and what they pull.

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

#19
post #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.

I've always been obsessed with true P2P WebRTC with QR codes but, at least back in the day, Firefox fails the offer under a very short timeout (~5 secs IIRC) which made out of band signaling completely impossible.

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

#20
post #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.

You're not wrong! Serverless is a funny term. Cloud companies use serverless to mean you don't have to provision and manage the server yourself, but it is still very much serverful technically speaking. This is neat in that you don't even need to setup anything with a cloud provider yourself to enable p2p connections
Post reply on HN