Blogs

Building a Game Backend From Scratch

Auth, lobbies, leaderboards, IAP, push, live-ops — the components every connected game needs and how to architect them.

Feb 13, 2026 5 min

The game ships in Unity or Unreal. The backend is everything else. Underestimate it once.

A connected game needs more than gameplay code. Identity, leaderboards, in-app purchases, anti-cheat, social features, push notifications, and live-ops infrastructure. We have built this layer fifteen times. Here is what the architecture looks like.

The core services

  • Identity service: account creation, social sign-in (Apple, Google, Steam, Epic), guest accounts with later upgrade.
  • Player profile service: name, avatar, level, currency, owned items.
  • Inventory service: per-player game economy with anti-duplication safety.
  • Matchmaking service: queues, skill-based pairing, party support, regional routing.
  • Game session service: lobby state, mid-game disconnects, reconnects.
  • Leaderboards: global and friends, seasonal resets, anti-cheat validation.
  • IAP and entitlements: receipt validation with Apple, Google, Steam.
  • Live-ops: remote config, A/B testing, content delivery, push notifications.

The deploy shape

For new projects we ship as gRPC microservices on Kubernetes (EKS or GKE), with Postgres for relational data and Redis for hot game state. Game servers run on Agones for fleet management. CDN-delivered configs and assets via CloudFront. Total infra footprint for a launch-ready backend: under $2K/month before player traffic.

The shortcuts that work

  • PlayFab, Nakama, GameSparks for proof-of-concept — outsource the entire backend until traction.
  • Firebase for casual mobile games. Identity, push, remote config, analytics in one SDK.
  • EOS (Epic Online Services) for cross-platform identity and friends.

The shortcuts that bite

Skipping authoritative validation of player actions on the client. Trusting the client about leaderboard scores. Storing IAP receipts but not validating them on every entitlement check. Letting one player's bad request crash the matchmaker. Each of these has cost a client a launch.

The lesson

Build identity, profile, and inventory in week one. They are the foundation everything else stands on. Defer matchmaking and live-ops until the gameplay loop is fun. Treat the backend as the product, not the plumbing.