Cheaters & Peer-To-Peer Networking: A Beginners Guide

Cheaters & Peer-To-Peer Hosting: A Beginners Guide
Cheaters & Peer-To-Peer Hosting: A Beginners Guide
Cheaters & Peer-To-Peer Hosting: A Beginners Guide

Key Insights

Key Insights

Key Insights

  • P2P games are cheater playgrounds: Without a central server watching over gameplay, dishonest players can manipulate their own game data to grant themselves infinite health, unlimited ammunition, or instant teleportation. They can also access other players' IP addresses directly, opening the door to harassment and DDoS attacks that boot opponents from matches.

  • Cheaters exploit P2P weaknesses through lag switching, data tampering, and ghosting: Some intentionally delay their connection to freeze the game while making moves others can't counter in real time. Others modify client-side data or gain complete map visibility when they should have limited sight.

  • Relay networks, such as Edgegap's, offer a middle-ground solution between pure P2P and expensive dedicated servers: Instead of connecting directly to each other, players route their traffic through relay servers that act as intermediaries. This approach costs less than full server hosting while addressing many P2P security gaps.

  • The relay approach shields IP addresses and equalizes connection quality, but comes with trade-offs: Players can no longer target each other with network attacks since their actual IP addresses remain hidden, and everyone connects to the same relay infrastructure, eliminating host advantages and solving NAT connectivity issues. However, developers must maintain relay infrastructure costs, and if relays go down or are geographically distant, gameplay suffers. Most importantly, relays still don't provide the authoritative game logic that dedicated servers offer for preventing sophisticated cheating attempts.

  • Alternatively, an even better solution is with dedicated game servers which host the game’s logic in a cloud server. Edgegap’s simplified integration of dedicated game servers solves one of its biggest problems. Learn more about it for Unreal Engine or Unity Engine.

Cheaters & Peer-To-Peer  Networking

Multiplayer game development is, as often said, truly challenging. Even with best practices implemented, such as adding Identification service, cheating remains a persistent issue, particularly in peer-to-peer (P2P) networking games.

This article aims to highlight the vulnerabilities of P2P-based multiplayer systems, the tactics cheaters employ to exploit these weaknesses, and how a network of relays can provide a potential solution.

Peer-To-Peer (P2P)  Networking: What Is It?

In contrast to a centralized server approach where a dedicated, “independent” server is authoring each player’s action on a cloud network, peer-to-peer networking is a decentralized approach to game hosting. Specifically, it means one player's computer or console acts as the authoring game server.

Such an approach has the advantage of reduced costs, reduced latency in certain scenarios, and is primarily used by developers given its simplicity in terms of development and integration.

While shared authority can be done in P2P, it is very rare because it is much more complex and, as such, isn’t covered in this article as such.

Vulnerabilities in P2P Networking

The very nature of P2P hosting presents multiple security exposure to risk.

  • Lack of Central Authority: As there are no independent server that is supervising all transactions and actions in-game, this means no built-in oversight or authority to detect anomalies or cheating. Opening the door for players to exploit the game (see topic below).

  • Easy Manipulation & Decompiling of Game Data: In a P2P setup, game data like player location, health, ammunition, etc., are often stored on individual clients. Dishonest players can manipulate this data to their advantage. Additionally, as players get the compiled code for the server, they can decode (using a decompiler) what the server does and try to modify the data to cheat.

  • Exposure of IP Addresses & IP-Based Attacks: Since players connect directly to each other, their IP addresses can be exposed, making them susceptible to various attacks or harassment. With access to other players' IP addresses, cheaters can initiate Distributed Denial of Service (DDoS) attacks, booting players from the game or severely degrading their connection quality.

Cheating Techniques in P2P Systems

Exploiting the vulnerabilities of P2P networking, cheaters have devised various methods to gain an unfair advantage or disrupt the gaming experience for others:

  • Lag Switching: Cheaters can intentionally introduce lag to disrupt the flow of the game. By delaying their data transmission, they can 'freeze' the game momentarily and make moves without other players being able to respond in real time.

  • Data Manipulation: Since game data resides on individual clients, a cheater can modify their data to give themselves infinite health, unlimited ammunition, or even change their location instantly.

  • Ghosting: In games where players are supposed to have limited visibility of the map or other players, a cheater could gain complete visibility, giving them an unfair advantage.

Introducing the Network of Relays: A Potential Solution

A convenient and easy to integrate way to counter some of the vulnerabilities of P2P networking is by using a network of relays.

Instead of players connecting directly to each other, they connect to these relay servers, which then handle the data transmission between players. These are much easier to integrate than authoritative server, and cheaper to run, and provide massive benefits over pure P2P networking.

Benefits of a Network of Relays

  • Shielding of IP Addresses: Players' IP addresses are hidden from each other since they only connect to the relay server. It prevents IP-based attacks and safeguards player privacy.

  • Fairness in Connection Quality: Since everyone connects to the relay, any network advantages (like being the host in a P2P scenario) are neutralized. Everyone experiences a more consistent connection quality. As player's connectivity experience doesn't rely on unreliable direct player-to-player connection anymore. It also solves many network connectivity issues, such as players behind restrictive NATs (see below) and players from different competing ISPs that are not peered.

  • NAT: By design, relays solve P2P’s NAT well-documented connectivity issues by acting as a go-between between users for seamless connections and player experience. Specifically, it overcomes NAT traversal and firewall restrictions.

  • Potential for Cheating Detection: Relay servers can be equipped with anti-cheat algorithms that monitor game data in real time. Suspicious patterns or anomalies can be flagged, making it easier to detect and deter cheaters.

  • Lower Latency: If the relay networks uses a distributed relays with a lot of locations, with automated orchestration the relay network can deploy game server instances nearest to users which enables lower latency. Also, by handling some of the network traffic between players, the relay server can help reduce latency and improve the overall gameplay experience.

Drawbacks and Considerations

It’s essential, however, to understand that no system is entirely foolproof. While a network of relays offers many advantages, it does introduce potential challenges:

  • Increased Latency: Introducing an intermediary can potentially increase the game’s latency if the relay server is geographically distant from the players. It is therefore critical to pair it with an automated orchestration that deploys nearest to users.

  • Cost: Maintaining a network of relays requires infrastructure and upkeep costs. This expense could be transferred to players or developers.

  • Reliability: If a relay server goes down, it could disrupt the gaming experience for connected players on a single relay going down. If all relays are on a single provider, and an outage occurs, then all players will be taken offline. A such, only a multi-cloud relay network can ensure reliability.

  • Authoring: Still, relay network are not an authoritative server. Thus, it doesn't solve that aspect, which are often critical for live services games, if this is your game’s needs.

Conclusion

While P2P networking provides cost and latency advantages in specific scenarios, its vulnerabilities can be exploited by cheaters to the detriment of the broader player base. A network of relays offers a promising solution, adding layers of security but it's not without its challenges.

Developers and players alike need to weigh the pros and cons of each system and continually adapt to the evolving landscape of online gaming.

A smart, network of relays powered by automated orchestration and deployed on a global, regionless distributed network provides.

Alternatively, an even better solution is with dedicated game servers which host the game’s logic in a cloud server. Edgegap’s simplified integration of dedicated game servers solves one of its biggest problems. Learn more about it for Unreal Engine or Unity Engine.

Written by

the Edgegap Team