Why is it not more common to implement anti-cheat on the server instead of the client? Is that not more secure? Couldn’t the server just check what vision a player should have and not provide any other information to prevent wallhacks or maphacks? Or check how fast it is possible to move to prevent speedhacks? Aimbot is a bit harder to detect I guess but what about the other ones?

  • Snot Flickerman@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    35
    arrow-down
    2
    ·
    1 year ago

    Couldn’t the server just check what vision a player should have and not provide any other information to prevent wallhacks or maphacks?

    Definitely not how that works. The server has no idea how to tell how the GPU on the client-side is rendering anything. The server is just doing server things, which definitely doesn’t include data on the “vision” of each player. There’s a lot less data being transferred than you assume here.

    All of these are way easier to detect client-side, because client-side you can actually check the code that is running.

    A server that checked all the code that is running would be a very, very slow game. Like imagine a chess game where it took five minutes for a move to register after making a move. Servers focus mostly on “player state” like, where are they, what direction are they looking, what direction are they moving, what buttons they are pressing, and a lot less on checking the code of the remote player. Once again, because checking literally every players code remotely would slow everything way the fuck down.

    • JeffKerman1999@sopuli.xyz
      link
      fedilink
      arrow-up
      13
      ·
      1 year ago

      I remember a long time ago it was on the server side that the hits were registered not on the client side. It had a funny feeling because you would have to shoot where the target was going towards instead of shooting where the target was. And that was done with 24 players in a server

        • undetermined@lemmy.world
          link
          fedilink
          arrow-up
          6
          ·
          edit-2
          1 year ago

          Pre-aiming hitscan is an ancient workaround by players for bad networking. Lag compensation fixes that. This basic problem has been overcome long time ago and is not present anymore in “most games”.

          Pre-aiming projectiles is a basic fps weapon mechanic but has nothing to do with networking. However, it might be influenced by the networking logic by e.g. by increasing or decreasing a delay after shooting to compensate for certain ping values. This depends on the engine the game implements.

          • boletus@sh.itjust.works
            link
            fedilink
            arrow-up
            1
            ·
            1 year ago

            I think you misunderstood me, I meant that most games will handle the bullet simulation on the server, but you no longer have to pre aim because of lag compensation.