I am reading up on multiplayer game architecture.

So far most of the articles i've found deal with the client-server model.

I'd like to know what are the limitations for using a p2p architecture? what "class" of games are possible (or more common) to implement using it? which aren't? and in general, what are its main differences and limitations against the client-server model.


3 Answers 3


Here's my two cents:


  • Pros:
    • No need for a central server: this makes it much cheaper, and more viable for low-budget indie games.
    • Scales very well (up to a certain point when the average client just can't handle the bandwidth).
    • Very good for data distribution: Suits games where user-created content is dynamically synced (e.g. torrents).
    • More Stable: It can never happen that the server is having problems and no-one can play (implementation dependent).
  • Cons:
    • Hard to implement: much harder to create a solid P2P architecture, than a server-client.
    • It's very hard to prevent cheating in such a system, unless you designate an authoritative peer (which will hinder any benefits of scaling well from P2P).
    • Security is hard to achieve.
    • A client's internet connection can influence the game for others too.
    • Latency is usually much greater (although it can be better when joining an internet game with multiple people from a LAN network for example).
    • May require port forwarding: P2P over the Internet requires port-forwarding, and not everyone is technically-inclined enough to do that. Additionally, the ISP may prevent port forwarding, and it increases the barrier to entry.


  • Pros:
    • Easy to implement: It's as straightforward as it gets.
    • If implemented well, scales extremely well (if the work can be distributed across multiple servers).
    • Cheating can be avoided easily (compared to P2P).
    • Lower Latency: If the server has a solid connection the latency can be extremely low.
    • A player's internet connection never affects another's game.
  • Cons:
    • Costs you money to run the servers: definitely not suitable for a free game (unless you let the players set up a dedicated server, but that might be a security problem).
    • If the server has problems, everyone does.

I would consider P2P a good choice because the average internet connection is getting better and better, in the future P2P latency might not be a problem at all. Also much about P2P depends on the specific implementation.

There is also some architectures that combine P2P with Server-client.

  • \$\begingroup\$ P2P Con: Matchmaking, unless it's a LAN game, you don't know how to find your peer. CS: Lower latency is not when one player in, say, Germany and the other is in Australia. It's still a problem 6y later. CS: Cost you money not that much, really. Servers become rather cheap. Also, you can start by hosting the game on your own PC using some web-proxy to point to it. \$\endgroup\$
    – badunius
    Jan 24, 2020 at 3:40

A big risk of peer-to-peer games is that without a central authority in form of a neutral server, there is no way to prevent cheating. Each client can interprete the outcome of the game however it wants. Some games declare one of the clients the host and let him be the judge, but when that client is a cheater, they decide the outcome of the whole game.

With games which require low latency and high bandwidth, like any game which requires quick reaction from the players, you also have the problem that the host is just using a consumer-grade internet connection, not sitting in a datacenter with a high-performance backbone connection. That means the user-experience will suffer. This isn't so much of a problem in more strategy-oriented, "slower" games.

  • 1
    \$\begingroup\$ Using a consensus model, cheating is no more of a problem than it would be in a client-server model. \$\endgroup\$
    – Jeroen
    Oct 1, 2017 at 11:43

Implementing peer to peer multiplayer games is not easy and not applicable at the moment.

The problem you have is, that none of the peers knows all other peers so that you have multiple hops for each message which results in a higher latency compared to a client server model. See this paper for additional details.

Round-based games could easily use such a protocol since they dont depend on latency so much. Also they normaly have only a few hosts in a session so that one could broadcast every message to all other players.

Other games which use peer to peer just choose one of the Peers dynamically to host the game (i.e. CoD MW2), which results in problems like host-migration if the host disconnects.

  • 4
    \$\begingroup\$ What do you mean "not applicable at the moment"? There are lots of games that use P2P for networking. Also, "none of the peers knows all other peers" is worded wrong. While in practice relays need to be supported in order to improve robustness, it's entirely possible to have a perfect everybody-to-everybody network topology, especially with small peer counts or in LAN where there's no NAT routers interfering. \$\endgroup\$
    – Tapio
    Dec 22, 2013 at 17:02
  • \$\begingroup\$ @Tapio Of course it is possible to build a p2p-network for games but it would be limited in terms of latency, number of users or the environment in which it is used. For that reasons most games don`t use a p2p approach. \$\endgroup\$ Dec 22, 2013 at 20:25
  • \$\begingroup\$ @Horstinator I know of a game which uses P2P for an FPS game, it solidly supports 50-100 players without any latency problems whatsoever.(Its called stickman warfare for anyone who cares) \$\endgroup\$
    – akaltar
    Dec 22, 2013 at 21:02
  • \$\begingroup\$ @akaltar Is it open source? Id like to see how they do it. \$\endgroup\$ Dec 22, 2013 at 21:16
  • \$\begingroup\$ @Horstinator Too bad, but as far as I know it isn't. You could ask the creator on the forum(its a very small project, so someone should respond). \$\endgroup\$
    – akaltar
    Dec 23, 2013 at 0:40

Not the answer you're looking for? Browse other questions tagged .