DEV Community

Cover image for How to Build a Turn-Based Multiplayer Game
A Plus Games Studio
A Plus Games Studio

Posted on Originally published at aplusgamesstudio.com on

How to Build a Turn-Based Multiplayer Game

The short answer

A turn-based multiplayer game sends each player's move to a server, which checks it against the rules, saves it and tells the other players. Choose synchronous play (both players online with turn timers) or asynchronous play (players move whenever they like and get a notification), then build on a backend such as Nakama, Firebase, PlayFab or Apple Game Center. It is the easiest kind of online game to build, because there is no need for lag compensation, but leagues, notifications and fair play still need careful design.

Synchronous or asynchronous?

Synchronous Asynchronous
How it plays Both players online; turns last seconds or minutes Players move whenever they like; matches last hours or days
Examples Live chess, card battles with turn timers Word games, correspondence chess, many mobile board games
Key systems Turn timers, reconnects, forfeits Push notifications, many games in parallel, reminders
Retention driver Exciting live matches Habit: a quick move several times a day

Many mobile games support both: quick live matches for engaged players and async games for everyone else.

The architecture

  1. The client shows the board and lets the player choose a move.
  2. The client sends the move, not the resulting state, to the server.
  3. The server checks the move is legal and that it is this player's turn.
  4. The server stores the move and updates the game state.
  5. The server notifies the opponent, by live message or push notification.

Storing the game as an ordered list of moves, rather than only the latest state, makes replays, spectating and dispute checks simple, and makes bugs easier to reproduce.

Backend options

Option What it offers Consider when
Nakama (Heroic Labs) Open source (Apache 2.0) game server with authoritative match logic in TypeScript, Go or Lua, matchmaking, leaderboards, chat You want full control and a game-focused feature set
Firebase Realtime Database or Firestore for state, Cloud Functions to validate moves, Cloud Messaging for notifications Small to medium games, especially async
PlayFab Accounts, economy, leaderboards and server hosting from Microsoft You also need LiveOps and economy tools
Apple Game Center Turn-based matches through GameKit's GKTurnBasedMatch iOS-only games
Custom server Any language and database Unusual rules, very large scale, or existing infrastructure

Note that Google Play Games Services ended its turn-based and real-time multiplayer APIs on 31 March 2020, so Android and cross-platform games need one of the other options. Our comparison of Firebase, PlayFab and custom backends goes deeper.

Matchmaking and ratings

Players want fair opponents. Rating systems in the Elo or Glicko family adjust a skill number after each match and pair players with similar ratings. At launch, when few players are online, widen the search range over time so nobody waits too long, and consider bots for the very first matches.

Leagues and seasons

Leagues give players goals beyond single matches. A common structure:

  • Divisions: groups of players with similar ratings, such as Bronze to Diamond.
  • Seasons: fixed periods, often a few weeks, after which standings reset partly.
  • Promotion and relegation: the top players move up, the bottom move down.
  • Rewards: cosmetic or currency rewards by final position, which gives a reason to come back.

Leagues need scheduled server jobs to close seasons, calculate standings and grant rewards reliably, so plan them as part of the backend, not as an afterthought.

Timers, forfeits and reconnects

  • Set a turn timer, even in async games, so abandoned matches end and the remaining player gets a result.
  • Let disconnected players rejoin a synchronous match within a grace period.
  • Decide what happens when a player quits: forfeit, bot takeover or a draw.

Fair play

Turn-based games are easier to protect than real-time ones, but still never trust the client. Validate every move on the server, never send information a player should not see (such as the opponent's hand in a card game), and rate-limit requests. Our article on anti-cheat for small games covers the basics.

Design tips

  • Keep turns short so async games fit into spare moments.
  • Show clearly whose turn it is in every game the player has running.
  • Let players play several matches at once in async modes.
  • Add lightweight social features such as rematches and friend invites.
  • Notifications should be useful, not spammy, and respect system settings.

What it costs and how long it takes

A simple turn-based game with accounts, matchmaking and notifications is one of the most affordable multiplayer projects, because there is no real-time networking to tune. Leagues, chat, economies and cross-platform play add scope. Our guide to multiplayer mobile game costs gives a breakdown, and our browser multiplayer guide covers web versions.

Building one with us

We build turn-based and real-time multiplayer games in Unity for mobile, web and PC, with backend, matchmaking and leagues. See mobile game development or request a quote.

Sources: Heroic Labs: Nakama documentation · Apple: GKTurnBasedMatch · Google Play: multiplayer APIs ended · Firebase: Cloud Functions · Microsoft: PlayFab documentation. Checked October 20, 2026.

Related: Mobile game development · Multiplayer development · Get a quote


Originally published on A Plus Games Studio, a game, AR and VR development studio in Sacramento, CA.

Top comments (0)