← Browse all
Peer-to-peer Tic-Tac-Toe — Serverless browser Tic-Tac-Toe played directly between two peers

Peer-to-peer Tic-Tac-Toe

Games Playable Updated 1mo ago

Serverless browser Tic-Tac-Toe played directly between two peers

Episodes & demos

About

p2p-ttt is a proof of concept for a local-first, peer-to-peer browser game. Two people start and play Tic-Tac-Toe without an application backend, account system, signaling service, or shared database. A host opens the static site, picks X or O, and shares an invitation link (or QR code); the friend opens it and returns a reply link; the two browsers then establish a direct WebRTC data-channel connection for live play. Each browser runs its own durable local workspace backed by a Web Worker, using sql.js (SQLite compiled to WebAssembly) to persist series, matches, ordered moves, outcomes, and replay history. QR codes are generated with qrcode-generator and scanned with jsQR via the camera. The project is documented with concept, architecture, plan, devops, backlog, and design specs, and includes a small Python static server for local development.

Summary

A local-first, static-web Tic-Tac-Toe proof of concept where two browsers connect directly over WebRTC after exchanging ordinary invitation and reply links, with no backend, accounts, or signaling service.

Tech

  • JavaScript
  • WebRTC
  • HTML
  • CSS
  • Web Workers
  • SQLite (sql.js/WASM)
  • jsQR
  • qrcode-generator
  • Python

Tags

  • browser-game
  • local-first
  • peer-to-peer
  • tic-tac-toe
  • webrtc