A single-player mobile game can run entirely on the phone. A multiplayer game cannot. Once players compete or cooperate with each other, you need a multiplayer game backend that connects them, keeps the game fair and stores their progress. Planning these pieces early has a big effect on budget, launch date and how well the game copes when players arrive.
Real-time or turn-based
The first decision shapes everything else.
Real-time games, such as shooters, racing games and battle arenas, send many small updates every second. Players notice delays, so servers need to be close to players and the networking code must handle lag and dropped packets.
Turn-based or asynchronous games, such as card games, board games and word games, send fewer updates and can tolerate a short delay. These can often run on a standard web backend with a database, which is simpler and cheaper.
Many games mix both. A strategy game might have asynchronous base building and real-time battles. Be clear about which parts of your game need which approach.
Parts of a multiplayer game backend
Most multiplayer games need some version of the following.
- Player accounts and authentication. Guest accounts for a quick start, then linking to platform sign-in such as Apple, Google or Game Center so players keep progress across devices.
- Matchmaking. Grouping players by skill, region, latency or party, and deciding how long they wait before the rules relax.
- Game servers or relay. Somewhere for the match itself to run, either on dedicated servers or by relaying traffic between players.
- Persistent data. Profiles, inventories, currencies, progress and match history in a database.
- Leaderboards, friends and chat. Social features that keep players coming back.
- Economy and purchases. Server-side validation of in-app purchases and rewards, so items cannot be granted by a modified client.
- Live operations tools. Admin panels for events, rewards, bans and support, plus remote configuration to adjust the game without a new release.
- Analytics and monitoring. Data on retention, match quality and server health.
Networking models and anti-cheat
How the match runs decides how well you can prevent cheating.
Client-hosted or peer-to-peer. One player's device acts as host, or devices talk directly. This is cheaper to run, but the host can have an advantage, and cheating is harder to stop because players control the simulation.
Relay servers. Traffic passes through a relay service, which helps devices connect behind home routers and mobile networks. The game logic still runs on player devices.
Dedicated authoritative servers. The server runs the real game simulation, and devices only send inputs. This costs more to host, but it is the strongest basis for fair competitive play.
Whatever the model, a few anti-cheat habits apply to every game.
- Never trust the client with currency, rewards or match results.
- Validate purchases with the app stores on your server.
- Check that actions are physically possible, such as movement speed or fire rate.
- Log suspicious behaviour and give your team tools to review and ban accounts.
- Protect your APIs with authentication and rate limits.
Unity networking options
Unity is a common choice for mobile games, and it has several networking routes. The landscape changes, so check current documentation and pricing before committing.
| Option | What it is | Typical fit |
|---|---|---|
| Netcode for GameObjects | Unity's own networking library for GameObject-based projects | Casual and co-op games, smaller player counts |
| Netcode for Entities | Unity's networking for its ECS data-oriented stack | Larger, performance-focused games |
| Unity Gaming Services | Hosted services such as authentication, lobby, relay, matchmaking and cloud save | Teams that want managed building blocks |
| Photon (Fusion, PUN and others) | Third-party networking and hosting | Fast setup, widely used for mobile multiplayer |
| Mirror and Fish-Net | Open source networking libraries | Teams that want control and to host their own servers |
| Nakama and similar | Open source game backend for accounts, social, matchmaking and storage | Custom backends with full data control |
Many teams combine options, for example a networking library for the match itself and a separate backend for accounts and economy. Our guide to choosing a game engine covers the engine decision that comes before this.
Hosting and costs
Server costs depend on concurrent players, match length, update rate and where your players are. Real-time games often need servers in several regions so latency stays low. Managed hosting and fleet services can start and stop game servers as demand changes, which avoids paying for idle machines. Turn-based games are usually cheaper because a normal web backend can serve many players at once.
Load testing before launch is essential. Simulate many players, watch how matchmaking and databases behave, and set up alerts before real players find the limits for you.
How to plan your backend
Use this checklist before development starts.
- Define the multiplayer mode. Real-time, turn-based or both, and how many players per match.
- Decide how competitive it is. Ranked competitive play needs authoritative servers and stronger anti-cheat.
- Choose build or buy for each part. Managed services save time, while custom code gives control and may lower long-term costs.
- Plan for live operations. Events, offers and moderation need admin tools from day one.
- Budget for running costs. Estimate concurrent players and test against real hosting prices.
- Prototype the network early. Test a real match on mobile networks before building lots of content.
Frequently asked questions
Do we need dedicated servers for a multiplayer mobile game?
Not always. Turn-based and casual co-op games can often use a web backend or relay service. Competitive real-time games usually benefit from dedicated authoritative servers.
Can we add multiplayer to an existing single-player game?
Sometimes, but it is often a major change. Game logic built for one player usually needs restructuring so that the server or host can control it.
What causes lag in mobile multiplayer games?
Distance to the server, unstable mobile connections and sending too much data are common causes. Regional servers, efficient network messages and client-side prediction help.
Planning a multiplayer game? Our game development team builds Unity games with the server side designed in from the start.