Make any site multiplayer in a few lines. Serverless WebRTC matchmaking
16 days ago
- #real-time
- #peer-to-peer
- #Trystero
- Real-time peer connection on the page syncing mouse movements and clicks.
- Trystero supports multiple connection methods: BitTorrent, Nostr, MQTT, IPFS, Supabase, and Firebase.
- Users can join a room with an app ID and room ID using `joinRoom` function.
- Listen for peers joining or leaving with `onPeerJoin` and `onPeerLeave`.
- Create and respond to actions like mouse movements and clicks using `makeAction`.
- Broadcast actions to peers and listen for incoming actions from peers.
- Supports additional features like audio/video streams and binary data transfers.
- Example code provided for setting up mouse movement and click synchronization.