Online Tambola
A zero-latency, serverless real-time multiplayer Tambola (Housie) game built with WebRTC DataChannels, Cloudflare Durable Objects, and an authentic mathematical ticket engine.
Project Link: https://tambola.nkaushik.in
Overview
Online Tambola is a modern, real-time multiplayer web recreation of traditional Tambola (Indian Bingo / Housie). It pairs a full-featured Moderator control board with an intuitive mobile-friendly player experience. Powered by WebRTC DataChannels and Cloudflare Workers, games run peer-to-peer with zero centralized game server latency and zero infrastructure running costs.
Problem
Traditional online Tambola games and party apps are plagued by aggressive ads, cumbersome user registration, noticeable websocket polling delays on number calls, and expensive centralized server architectures that make hosting casual family or community games frustrating.
Constraints
- Must run 100% serverless with zero recurring hosting or server compute bills
- Near-instant synchronization (<15ms) across dozens of connected mobile and desktop players
- Mathematically authentic ticket generation respecting strict 3x9 column sorting and number distribution rules
- Frictionless room onboarding via dynamic QR codes and direct invite links with zero login requirements
Approach
Engineered a star-topology WebRTC DataChannel network where the room Moderator acts as the authoritative host node. Ephemeral signaling is offloaded to Cloudflare Workers with Durable Objects for fast WebRTC handshakes. Ticket generation and claim validations are computed locally via deterministic algorithms, and audio cues are synthesized in real time via the Web Audio API and SpeechSynthesis.
Key Decisions
WebRTC DataChannels for Game State Sync
Transmitting number draws, ticket daubs, and strike claims directly between host and player peers eliminates server bottlenecking, reduces latency to single-digit milliseconds, and ensures unlimited concurrent games without backend scaling limits.
- Centralized WebSocket Server
- Firebase Realtime Database
- Server-Sent Events (SSE)
Cloudflare Durable Objects for Ephemeral Signaling
Durable Objects provide consistent, globally distributed state coordination for room creation and WebRTC SDP/ICE handshakes, automatically shutting down when games end to minimize resource consumption.
- Redis Pub/Sub
- Managed Socket.io instance
- PeerJS cloud
Client-Side Web Audio API & Speech Synthesis
Synthesizing voice announcements and auditory feedback directly in the browser delivers responsive sound cues with customizable traditional call nicknames without streaming heavy audio assets across the network.
- Pre-recorded MP3 asset packs
- Server-side TTS generation
Host-Driven Game Moderation
Separating moderator controls from player interfaces ensures that only the room creator can roll numbers or verify winning dividend claims, while players enjoy a clean, distraction-free gaming ticket without mandatory logins.
- Crowdsourced voting for calls
- Strict user account registration
Tech Stack
- React
- Vite
- WebRTC
- Cloudflare Workers
- Durable Objects
- Web Audio API
- Canvas Confetti
- QRCode
Result & Impact
- $0 / monthServer Cost
- < 15msP2P Sync Latency
- 1–90Max Numbers
- 7 StrikesWinning Dividends
Delivers a seamless, ad-free party gaming experience capable of hosting community game nights, family reunions, and virtual team events with instant QR-code join.
Learnings
- Peer-to-peer WebRTC DataChannels are extraordinarily powerful for turn-based and semi-real-time multiplayer web games when architected around an authoritative host.
- Cloudflare Durable Objects simplify room coordination and WebSocket handshakes down to a few dozen lines of edge code.
- Designing mobile-first touch interfaces with authentic haptic feedback and paper ticket aesthetics elevates player engagement over generic web grids.
Experience Highlights & Key Features
Online Tambola brings the classic paper-and-coin Housie experience into the modern browser:
Host & Moderator Command Center:
- Full 1–90 visual master board with animated number drawer.
- Manual caller or automated countdown timer modes (3s, 5s, 8s, 10s intervals).
- Built-in speech announcer featuring traditional Tambola nicknames (e.g., “Top of the House: 90”, “Two Fat Ladies: 88”).
- Dynamic Strike Management (Early 5, Top Line, Middle Line, Bottom Line, Four Corners, Temperature, Full House) with instant winner confirmation and roster management.
- One-click QR code and link generator for effortless mobile onboarding.
Interactive Player Experience:
- Authentic 3×9 tickets generated with mathematical balance (5 numbers per row, sorted columns).
- Touch-friendly daubing with visual stamp animations, sound effects, and bogey prevention.
- Live Dividend Tracker displaying claimed prizes with real-time strike-through animations.
- Confetti celebrations when dividends are awarded.
- Dark and Light arcade themes with fluid responsiveness.
Technical Architecture
┌─────────────────────────────────┐
│ Cloudflare Workers & DO │
│ (Ephemeral WebRTC Signaling) │
└───────────────┬─────────────────┘
│ (SDP / ICE Handshake)
▼
┌────────────────────────────────┐ WebRTC DataChannel ┌────────────────────────────────┐
│ Moderator Node │ ◄──────────────────► │ Player Node │
│ - Authoritative 1–90 Game Run │ │ - Authentic 3x9 Ticket Engine │
│ - Speech Synthesizer & Cues │ │ - Interactive Touch Dauber │
│ - Dividend Verifier & Payouts │ │ - Real-time Strike Tracker │
└────────────────────────────────┘ └────────────────────────────────┘You can test the game live, host a room, or play with friends at tambola.nkaushik.in.