I wanted to play Bingo with friends remotely. The interesting constraint I set myself: no backend server for the game state - everything should sync peer-to-peer. So I used WebRTC for the multiplayer and hashing to let players keep the same board across sessions.
Features
- Shareable link gets everyone into the same game instantly
- Hashable boards - the hash encodes your board layout, so you can bookmark your favourite and use it every time
- Peer-to-peer multiplayer via WebRTC, no game server needed
TODO
- Firebase matchmaking for finding games without manually sharing a link
What I learnt
- How WebRTC peer connections work - signalling, ICE candidates, data channels
- URL hashing to encode and reconstruct state
- Caching strategies for static game assets
P.S. This was one of my earlier web projects and it shows, but the WebRTC plumbing works.
Built with
- Next.js
- tailwindcss
- Deployed on Vercel