Built a realtime multiplayer tile-capture game to understand WebSockets + Redis Pub/Sub
Simple game shared grid, you claim tiles, others can steal them back. Everyone has a cooldown between captures and limited steals. Last person standing with the most tiles wins. That's it.
Built it entirely to understand things I kept reading about but never actually felt — goroutines and channels for managing concurrent WebSocket connections, Redis Pub/Sub for cross-instance sync, stateless backend design, and clean layered architecture. Each WebSocket client runs in its own goroutine and a central hub uses channels to fan out broadcast messages without race conditions. Hosting frontend and backend separately made CORS and WebSocket upgrade issues very real very fast.