Multiplayer Quiz Game with WebSockets
A Kahoot-style live quiz where a host runs a game and players join with a code, answer timed questions, and climb a real-time leaderboard.
How to build it step by step
- 1Lobby: Host creates a game with a join code; players connect and appear in a live lobby.
- 2Game loop: Push questions with countdowns; collect answers and score by correctness and speed.
- 3Leaderboard: Update and broadcast standings after each question.
- 4State: Keep authoritative game state on the server in Redis to survive reconnects.
Key features to implement
- โJoin-by-code lobby
- โTimed questions
- โSpeed-based scoring
- โLive leaderboard
- โReconnect handling
๐ก Unique twist to stand out
Add power-ups (double points, 50/50) and a spectator mode that streams the game without participating.
๐ What you'll learn
Authoritative server design, real-time game loops, scoring systems, and reconnection logic.