Anti-cheats are a lie, they don’t belong on your computer, and I’ll prove it in this 10min read

I have gathered from many sources and many game developers, including myself, what the supposed purpose of anti-cheats, how it’s implemented, and how it should actually be implemented. This is regarding the client-server networking model for multiplayer games.

The following will be discussed:

  1. How it looks
  2. What it means to cheat in a multiplayer games.
  3. Why is almost every multiplayer game implementing anti-cheats THE WRONG WAY
  4. What anti-cheats actually look like
  5. The solution and examples

CLIENT = the player, on their own computer, using their own copy of the player-side of the game SERVER = hardware game server used to host some parts of the multiplayer side, depends on the implementation of multiplayer CHEATER = the CLIENT who manipulates or otherwise exploits their own side of things, their own computer, on which the game and anti-cheat reside. HACKER = the person, who used many skills to illegally infultrate the SERVER, and therefor have (probably UNLIMITED) access to everything that’s on that SERVER, including everything game-related.

1. How an anti-cheat looks like in most games In most multiplayer games, an anti-cheat looks like this: an entirely separate software on the CLIENT’s computer, that checks the computer, the game for any changes in number of sophisticated ways, but this is a very bullet-prone vest, and it’s proprietary, it can’t even, really be open source.

2. What it means to cheat in a multiplayer games. This means bypassing the anti-cheat (if any) and editing variables or functions in memory to whatever the CHEATER wants to. How can a CHEATER - a player, in a multiplayer game even influence the entire game that is hosted on another computer (SERVER)? The simple answer is - they can’t. They don’t affect their abbilities and entire multiplayer game on/from the SERVER, they do it ON THE CLIENT, on their own computer!! How can that even be possible?

3. Why is almost every multiplayer game implementing anti-cheats THE WRONG WAY I don’t know, they dumb? Perhaps they don’t how programming works? Or they just think that’s how it works and they don’t question it or they’re ordered to do it the way everyone else does?

4. What anti-cheats actually look like Anti-cheats should just be what they’re meant to do: prevent any CLIENT from exploiting the game, in other words: stop the CLIENT from changing the values which they shouldn’t have power over in the 1st place! The actual anti-cheat isn’t some separate proprietary piece of shit program, it’s the way the entire game is implemented and logic that checks I/O.

A multiplayer game in a CLIENT-SERVER networking model (not peer-to-peer, for example) which is what most games are using - should be doing this: Since the SERVER wants the game to be fair and for all CLIENTs to play according to SERVER’s rules (think of walking speed, the weapons you have, your health, etc.), the SERVER in this networking model HAS TO be authoritive. The SERVER HAS TO dictate to every CLIENT what they should do, not the other way around.

5. The solution and examples In the past and sometimes even today - without a game engine, the developer had to implement their own networking for the game to get maximum performance out of it, have it customized the way they want to, or game engines simply didn’t exist yet. This was done by serialization and deserialization of data received by CLIENT/SERVER, the 1st variable extracted was usually the number, which was then correlated with a list of functions - each function was assigned a number.

None of that is necessary today, really, because some game engines have good implementations of networking (such as Godot, I think).

Okay, how about we make a few examples which will be the solution: So let’s take movement and rotation of the player for example: var position: Vector3(x, y, z) and var rotation: Vector3(x, y z)

The way CLIENTs walk around a map isn’t by telling the SERVER where they’re at, it’s by spamming the SERVER with inputs from the user (WSAD, mouse). Then the SERVER decides many things actually, before doing anything with that information:

  • is the CLIENT a legit connection and stuff?
  • is the CLIENT sending a number that correlates with any function (if custom networking implementation)?
  • is the CLIENT sending data that’s of valid type and value?
  • is the CLIENT alive?
  • is the CLIENT allowed to move? ( the following can be implemented in various ways, this is one of them )
  • okay, then move CLIENT that’s a copy on the SERVER, in that direction at the speed and velocity the SERVER dictates *this already eliminates possibility to teleport, speedwalk and clipping trough walls and the entire map
  • anything that the CLIENT collides with, run corresponding collision logic, triggers, signals, etc.
  • send the new position and rotation and exact time to ALL CLIENTs
  • the CLIENTs interpret this new message at that exact time, then CLIENTs can use interpolation and extrapolation to smoothly move and rotate to the new position and rotation directed by the SERVER (not the CLIENT)

This is uncheatable if done correctly. You know some of world biggest and most expensive games such as Battlefield 6 still don’t understand this. This, what you read, is worth more than the entire worth of Battlefield which is probably many millions of $$$. Why instead not create a better game?

Even AAA games such as Battlefield 6 don’t do this, they have anti-cheat spyware they put on your computer, just like most games do.

You can follow a game I’m creating, it will not be some slop put together under a overlord boss at a evil slave corporation, here: https://blorpblorp.xyz/home/c/my_life_game@lemmy.dbzer0.com

EDIT 1 SECTION A lot of game-dev-incapable people attacked me, ridiculed me and just wasted my time, explaining to me how this and this isn’t possible, but they didn’t even know what it was called. What most of them were referring to is wall-hacking. It’s easy to solve. I already code that does this, actually. I just use it for a sanity system.

For instance, in Blazium(Godot) I have a system for sanity, and when you look towards a enemy that is from horror you can calculate the distance (pitch/yaw) and the depth, and your sanity decreases, for example.

There is some complicated math involved, but you can easily convert that part of code to C++.

The only thing we need to change (ON THE SERVER) in here is make this for all players, and if the pitch/yaw and/or distance depth, see if there’s any players nearby… AND ONLY THEN transmit the other player’s position to the player.

Then add a raycast towards that player, and if it hits anything else before the player - there’s a wall or something blocking the view - DO NOT SEND enemy location.

Wall-hacking solved.

EDIT 2 SECTION I’m saying all of this with latency and such and such distance and roundtrip (to server and back or vice-versa) in mind. And packet-loss.

  • Gigatron@lemmy.dbzer0.comOP
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    14
    ·
    1 day ago

    I just literally disproven the necessity of anti-cheats even being on your computer. Every other game is just ignorant about this. I’m sorry

    • terabyterex@lemmy.world
      link
      fedilink
      English
      arrow-up
      17
      arrow-down
      1
      ·
      edit-2
      1 day ago

      No you didnt. You have a gross misunderstanding of 1)how multiplayer games work and 2) how cheating works.

      So, one popular cheat is to highlight where other players are. This has nothing to do with talking to the server at all. You can have your client not render any walls so you can see through everything.

      Heres another. The client automates everything. Bullet comming your way well you step to the side. Your client tells rhe server you mkved last second to dodge it. Server tells client that the player you are shooting at is moving right, ok now lets move the cursor to the right and shoot. Thats called auto aiming.

      • Gigatron@lemmy.dbzer0.comOP
        link
        fedilink
        English
        arrow-up
        1
        arrow-down
        4
        ·
        10 hours ago

        You don’t even know what the cheat’s name is. It’s wall-hacking. I solved it already in my game, but you can read another reply to someone else’s comment, which I made. You don’t make effort to post, so I won’t post here either go find it.

        • CameronDev@programming.dev
          link
          fedilink
          English
          arrow-up
          1
          ·
          9 hours ago

          There are also cheats that increase the contrast for enemies. Not a wall hack, just make the enemy easier to see, which gives an edge.

          • Gigatron@lemmy.dbzer0.comOP
            link
            fedilink
            English
            arrow-up
            1
            arrow-down
            1
            ·
            8 hours ago

            The wall-hacking is already cheat-proofed, in concept, and in code, I already have code for that but I’m using it for something else since I have 0% of multiplayer code written, I’d like to have some sort of singleplayer game ready before the multiplayer implementation even starts.

            But you’re PROBABLY right for the horror/steath/shadow/hidden enemies… unless we come up with something abso-fucking-lutely genius… but that’s a hard one to beat, same with aimbot since you could not only use software but also hardware to do it… I have a theory or 2 on how to try to prevent that, we’ll see, I’m counting aim-botting as on the “probably-unstoppable” list

        • terabyterex@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          arrow-down
          1
          ·
          9 hours ago

          I love how i explain the cheat and the other fuy just names it and you think he put more effort in it. You are a fucking child. You pick up godot and you think you are suddenly a game developer.

          By the way, genius, the game client diesnt run on the server, you cant raycast. Do you even have a concept of how expensive rhat is.

          • Gigatron@lemmy.dbzer0.comOP
            link
            fedilink
            English
            arrow-up
            1
            arrow-down
            1
            ·
            8 hours ago

            The authoritive server runs not only a copy of the game, but it’s the game master, the game manager, the game server. You can have 1000 raycasts if you want to. This isn’t my 1st game

            It is more resource intensive/expensive than regular multiplayer games. But guess what I’d rather have that than incomplete games with spyware programs (separate anti-cheats) that don’t even work on Linux and can be broken increasingly easier (with AI reverse-engineering, etc.)

            I am blocking you for wasting my time and not using 2 brain cells.

      • Gigatron@lemmy.dbzer0.comOP
        link
        fedilink
        English
        arrow-up
        1
        arrow-down
        4
        ·
        10 hours ago

        Please put more effort in your comment next time. My post doesn’t solve everything, I have just tapped the surface of a proper anti-cheat, because otherwise nobody would even bother to read it. You didn’t even bother to read this much text, let alone more of it.

      • CameronDev@programming.dev
        link
        fedilink
        English
        arrow-up
        9
        ·
        1 day ago

        OPs solution protects against a single type of cheat, movement speed/teleportation. Its also the only cheat that no one actually uses…

      • Gigatron@lemmy.dbzer0.comOP
        link
        fedilink
        English
        arrow-up
        1
        arrow-down
        3
        ·
        10 hours ago

        Exactly. There is no “automated system”, it’s just A LOT of IF checks, NULL checks, checking if input from CLIENTs is valid and as expected, then doing A LOT OF COMPLICATED math, etc.

        Fun part: optimizing all of that.