The JK Jung Times
TECHNOLOGY

Building Real-Time Multiplayer with Flutter and Firebase

How I built a competitive number guessing game with sub-second sync, ELO ranking, and a virtual economy — all on Firebase's free tier.

By JK Jung, Staff Developer | Los Angeles Bureau | Thursday, April 16, 2026

Building Real-Time Multiplayer with Flutter and Firebase

When I set out to build Number Strike Baseball, I knew the core challenge wasn't the game logic — it was making two players feel like they were in the same room. Real-time multiplayer on mobile demands sub-second sync, graceful disconnection handling, and cheat prevention, all while keeping infrastructure costs near zero.

Before settling on Firestore, I evaluated several real-time database options including Supabase Realtime, Socket.io with a custom backend, and Firebase Realtime Database. Supabase offered PostgreSQL familiarity but lacked the seamless offline support critical for mobile gaming. Socket.io gave full control but meant managing WebSocket infrastructure — a non-starter for a solo developer. Firebase Realtime Database was a contender, but Firestore's document model mapped more naturally to game sessions with nested turn data and player states.

Firestore's real-time listeners turned out to be the perfect fit. Each game session lives as a single document with nested turn data. Both clients subscribe to the same document, and

...

Tags: Flutter, Firebase, Real-time, Game Dev