How to build a real-time multiplayer game with Flutter Flame
A real-time multiplayer UFO shooting game can be built with Flutter, the Flame game engine and Supabase Realtime. Flame components handle the player and bullet sprites, collision detection with hitboxes, pan-gesture movement and health gauges. Player position is sent as a mirrored percentage of screen size so each client sees its opponent from the opposite side. Supabase presence powers a lobby that waits for two players, and broadcast messages over a low-latency WebSocket sync position, health and game start between clients.
Related posts
- Flutter Tutorial: building a Flutter chat app
Supabase mediumAdeptA real-time single-room chat app can be built with Flutter on the frontend and Supabase as the entire backend, using the supabase_flutter SDK instead of a custom API. The walkthrough creates profiles and messages tables in Postgres with username validation constraints, adds the messages table to the supabase_realtime publication for live updates, initializes the Supabase client, routes users via a splash page based on auth session, and defines Dart data models plus a registration page. Authentication and row-level security are deferred to a second part.
- Create a Figma Clone app with Flutter and Supabase Realtime
Supabase mediumAdeptA collaborative design canvas, a simplified Figma, built by combining Supabase Realtime Broadcast for low-latency client-to-client messaging with Flutter's CustomPainter for low-level canvas rendering. Users can draw circles and rectangles, drag them around, and see each other's cursors live, while canvas state persists to a Postgres table of JSONB objects behind simple RLS policies. The walkthrough covers project setup, a SyncedObject class hierarchy with JSON serialization and hit-testing, and a custom painter that renders cursors and shapes. Auth is skipped and users get random UUIDs.
- Make a Multiplayer Game with Kaboom.js and Heroic Labs
Replit mediumAdeptA multiplayer platformer can run in Replit's browser IDE using the Kaboom.js game library on the client and Heroic Labs' open source Nakama server, run locally via Docker Compose with Postgres, as the backend. The walkthrough authenticates players with Nakama email auth to create sessions and opens a realtime socket. Players then create or join matches by match ID and broadcast state so every participant sees each other's movement. On the Kaboom side it sets up a world, a platform and keyboard-controlled players that can move and jump.
- Flutter Authorization with RLS
Supabase mediumAdeptExtends a basic Flutter real-time chat app into a 1-on-1 chat with authorization enforced by PostgreSQL Row Level Security on Supabase. The schema adds rooms and room_participants tables, a room_id foreign key on messages, and a security-definer plpgsql function create_new_room that returns an existing room for two users or creates one. The client side uses flutter_bloc cubits to stream room participants and each room's latest message via Supabase realtime. Email confirmation is handled through deep links configured in iOS Info.plist, AndroidManifest.xml and the Supabase redirect URL settings.
- Making a Real-Time Chat App with Supabase on Replit
Replit mediumAdeptA real-time public chat app can be built with a Vue 3 and Tailwind CSS frontend on Replit backed by Supabase's hosted Postgres. The walkthrough creates a messages table via SQL, enables replication-based real-time events, and wraps the supabase-js client in a Vue composable. That composable handles paginated message loading by range, INSERT subscriptions for live updates, and inserts for sending. Users are identified only by a random username stored in localStorage, and older messages load when the list is scrolled to the top.