Peer-to-peer (P2P) computing or networking is a distributed application architecture that partitions tasks or workloads between peers. Peers are equally privileged, equipotent participants in the application. They are said to form a peer-to-peer network of nodes.
In gaming, the utilisation of this structure is known as peer-to-peer gaming, otherwise known as P2P gaming. This is one architectural method that allows you to play with other players online. To put it simply, P2P gaming is when players connect to and rely upon one another to keep an online network going, negating the need for a dedicated server.
Peer-to-peer gaming has been used as a basis of online multiplayer. However, since the 2010's, this method of multiplayer has received much criticism by experts, and any game utilising P2P would be deemed unacceptable by today's standards.
How It Works
Aside from P2P, there is also what’s known as a “dedicated server,” wherein, as the name implies, an offshore central server is provided for all players to connect to. This server is not a player, nor is it a part of the game. The server’s responsibility is to simulate the game’s world and send data to every player that’s connected so they can interact with it seamlessly.
When it comes to peer-to-peer gaming, however, there are two types of network structures that most commonly occur. On one hand, a sole player acts as a “server,” otherwise known as a host. The other players can then connect to the host and the host will relay data to every player that’s connected to them.
Why It's Bad for Online Gaming
- It is 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).
- 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.
- Peer-to-peer networking depends on the upload speed of the players, and residential upload speeds are notoriously slow. In a worst-case scenario, you have P2P networking with no central host so everyone is sending their data to everyone else.
- P2P comes with a bunch of problems — it is very susceptible to "sabotage", from players deliberately introducing lags to people abusing simple P2P implementations to DDoS other players.
- Unlike dedicated servers, peer-to-peer multiplayer doesn't require a base server to get connected to.
- P2P implementations can be perfectly fine at a fairly low run cost depending on the type of game and how many players it has to support.
- Due to the fact that there is no central server in a peer-to-peer network, each peer is responsible for storing and sending the requested information. There are no fees charged by the server that is hosting the application.
- What is Peer-to-Peer Gaming, and How Does it Work? — VGKami
- What is Peer-to-Peer Gaming, and How Does it Work? — Game Development Stack Exchange
- Is P2P Bad for Online Multiplayer? — Reddit
- Advantages and Disadvantages of a Peer-to-Peer Network — Flevy Blog