Punisher
The AntiCheat system is built on four pillars: Protection, Monitoring, Detection and Punishment.
- Protection: To protect against cheaters and hackers, encrypt or obfuscate your data so that it is protected against attacks. Countermeasures are taken to protect the integrity of the data and trap attackers, for example through honey pots.
- Monitoring: Observe and track the state of the game or device and the behavior of players to detect potential cheating or unusual behavior.
- Detection: Monitoring itself does not report cheating activity, but only tracks the state of the game or device and monitors deviations. These deviations are recorded by a detector. The detector itself checks the monitored deviations and informs the 'AntiCheat-Monitor' about possible cases of tampering or cheating.
- Punishment: React to detected cheating attempts with punishers when a calculated threat level is reached and can impose various penalties.
Punishment
Upon detecting a cheater, where is the fun when not punishing him, and apply appropriate consequences. The 'Punisher' is your tool for this.
The 'Punisher' is a MonoBehaviour which can be attached to the 'AntiCheat-Monitor' GameObject. It reacts to detected cheating attempts when a calculated threat level is reached and can impose various penalties. This could involve actions such as mirroring the camera, reducing the frames per second, spawning random entities, clearing the player score or simply closing the application or anything you can imagine.
However, it is crucial to exercise caution and make sure it is a serious cheating incident before taking action, as unjustified accusations could lead to misunderstandings and backfire on you. It's all about maintaining fairness and keeping it fun for everyone involved.
Threat Level Calculation
A 'Punisher' reacts to a certain threat level accumulated by the 'AntiCheat-Monitor'. The threat level to which the punisher should react can be customized in the inspector view of the component.
Example: The 'Exit Game Punisher' which closes the game, once a threat level of 850 is reached.
The 'AntiCheat-Monitor' subscribes to the available 'Detectors'. A detector notifies the 'AntiCheat-Monitor' of any cheating detected. The detected cheating is evaluated by the detector and gets a threat rating and also a chance detecting a false positive.
These values are accumulated by the 'AntiCheat-Monitor' into a threat level, which is scaled with a sensitivity level that indicates how high the threat level will be. Punishers can subscribe to this threat level and react to it. This allows you to penalise the player for cheating and take the fun out of it, hopefully discouraging them from trying again.
The next threat level of the 'AntiCheat-Monitor' is calculated as following once a detector notifies a possible cheating detection:
float next_threatLevel = current_threatLevel + (1f - detection.PossibilityOfFalsePositive) * detection.ThreatRating * (int)this.SensitiveLevel;
Over time, the threat level is slowly reduced:
float next_reduction = fixedUnscaledDeltaTime / 5.5f * ((int)ESensitiveLevel.VERY_SENSITIVE + 1 - (int)this.SensitiveLevel);
Built-In
Once a certain threat level is reached, punisher can punish the player. You can easily write custom punisher or use the included.
Universal Punishers
These punishers are included in the asset and can be used universally on all platforms:
Punisher | Free | Pro |
---|---|---|
Reduce FPS | + | |
Mirror or Flip Camera | + | |
Force Exit Game | + | + |
A brief overview over the universal punishers:
- Reduce FPS: The reduce fps punisher reduces the max frame rate to a custom low value. Can be very annoying for cheaters.
- Mirror or Flip Camera: The flip camera punisher flips the camera view horizontally or vertically. Can be very annoying for cheaters in first person shooters.
- Force Exit Game: The exit game punisher is a very drastic punishment. It closes the game.