All comparisons

Should you use Supabase Realtime for a multiplayer game?

Supabase Realtime works well for turn-based games, lobbies and shared scores, especially if you already use Supabase. For real-time movement it is a harder fit: every update counts against a message quota and a per-second rate limit, and there is no game server deciding outcomes. A game backend handles both.

What Supabase Realtime gives you

Supabase Realtime has three parts: Broadcast, which sends a message to everyone on a channel; Presence, which tracks who is online; and Postgres Changes, which streams database edits to clients. With a Supabase database already in the project, that is a quick way to build a lobby, a shared scoreboard or a game where players take turns.

It is a messaging layer on top of a database, not a game server. That distinction does not matter for a chess game. It matters a great deal for a game where eight people are running around at once.

Where real-time games run into trouble

  • The meter. Supabase bills Realtime on messages and peak concurrent connections. A turn-based game sends a few messages a minute. A game where players move sends several per player per second, and Broadcast and Presence both count. A busy evening can use a month's quota.
  • The rate limit. Each plan caps messages per second, and a project over the cap has clients disconnected until traffic drops. For a game, that is a disconnect in the middle of a match.
  • No server deciding outcomes. Broadcast relays whatever a client sends. To stop a player claiming a score they did not earn, you add database rules or edge functions, which work for turns and are awkward for anything on a tick.
  • State lives in your messages. Who is in the room, where everyone is, and what a late joiner needs to see are yours to rebuild from messages or the database.

What a game backend does differently

Here a room keeps its own state: every player's fields plus room-wide values. A player sets fields on their own entity, everyone receives the change, and someone who joins late gets the current state straight away. You do not count messages, and the bill is the number of people who played this month.

When rules have to be trusted, you deploy a short script that runs on the server on a tick: it reads inputs, decides hits and scores, and writes the result. A client cannot fake it, and each deploy can be rolled back in one call.

server logicdecides collisions, scores, winnersclient 1sends inputs onlyclient 2sends inputs onlyclient 3sends inputs onlyinputs upstate down
A game server keeps the room's state and decides outcomes. Clients send inputs; the server sends back state everyone agrees on. A late joiner gets the current state, not a replay.

Using both

They do not compete for the same job. Plenty of games keep Supabase for accounts, profiles and data that lives outside a match, and use a game backend for the match itself. If Supabase is already your database, there is no reason to move it.

When Supabase Realtime is the better answer

  • The game is turn-based or slow: cards, board games, trivia, async challenges.
  • Most of the game is really database state, such as an inventory, a shared world map or a guild roster, and you want live updates on it.
  • You are already on Supabase and the realtime part is small: a lobby, a ready check, an online indicator.
  • You want everything in one vendor and one database, and the game will stay small.

Rule of thumb: if players move in real time, use a game backend for the match. If they take turns, Supabase Realtime is often enough.

Common questions

Can you build a real-time game on Supabase Realtime?

You can build a small one, and people do. The limits arrive with player count and update rate: every position update is a billed message, plans cap messages per second, and there is no server deciding outcomes, so cheating is easy unless you add database rules or edge functions.

Is Supabase cheaper than a game backend?

For a turn-based game or a small realtime feature, often yes, especially if you already pay for Supabase. For a fast multiplayer game the message meter grows with players times updates per second, while a monthly-players meter stays the same however chatty the game is.

Can I keep my Supabase database and add Multiplayer Agent?

Yes. Keep Supabase for accounts and long-lived data, and run matches in a room here. Multiplayer Agent also has its own player identity, saves and leaderboards if you would rather not build those on Supabase.

Try it on your own game

The free tier does not expire and asks for no card. Add one script tag and have two people playing in about a minute.