0
\$\begingroup\$

I developed a multiplayer fps game in C++ and many peoples appreciated it, and today someone has created cheats for my game and he is trying to spoil my hard work which I spend developing the game. I am not expert to create an anti cheat system but I know by updating or releasing the new patch can avoid those cheats for a little time and then after some time I will need to update it again.

I want to know the quick and easy way to update all the files. This is a headache to search manually for all classes and strings and values to update them.

Data I want to update to avoid speed hack, aimbot, wall hack and flying hack.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ My advice: start all over again and make your game cheat resistant right from the first architecture design. \$\endgroup\$ – Vaillancourt Dec 4 '20 at 15:52
  • \$\begingroup\$ @Vaillancourt Yes a Good solution and also I need to implement a key type authentication after every action the client made. \$\endgroup\$ – Ali-Baba Dec 4 '20 at 16:26
5
\$\begingroup\$

I'm sorry to bring you bad news, but unfortunately it's not really possible to prevent cheating client-sided. Anything which runs on the client is under the control of the client. You can use some commercial anti-cheat tool which spies on the users personal files looking for cheats, but those are expensive, ethically questionable and can not really prevent cheating either. They can make it harder, but anti cheat tools are also software which runs locally and thus can be hacked by a determined user.

But speed hacks and flying hacks are easy to fix server-sided by a simple heuristic which detects when players move in ways they are not supposed to.

Wallhacks can be partially prevented by changing your network protocol to do some visibility calculations on the server and not send position updates about objects to clients which should be unable to see them.

Automation hacks like aimbots are pretty hard to prevent, because a sufficiently advanced aimbot is indistinguishable from a very good player. But you can at elast try to detect naive aimbots by a server-sided heuristic which detects unnatural rotation movements (when the rotation change per tick is low, then suddenly very fast for just a single tick, ends up pointing exactly at an opponent and is then very slow again, then that's very suspicious). After your first couple bans, the cheat programmers will get creative and try to make the movements of their aimbots more natural (which will also make them perform worse). You can make it a lot harder for them to figure out how much they need to nerf their aimbots when you don't kick people immediately but wait a couple days.

\$\endgroup\$
6
  • \$\begingroup\$ thank you for your response, it's mean a better solution to avoid cheats is to create a key type authentication mechanism before every action the client made, and the key must be an encrypted hash which can be only authenticates from server side... yes it is possible early I have experimented it but not successfully successes to avoid cheats because I tried to implement the way if client modified a single byte in the source the key must change it's state differently from the original which will not be authenticated from the server due to mismatch, and the user gets banned. \$\endgroup\$ – Ali-Baba Dec 4 '20 at 16:24
  • 3
    \$\begingroup\$ @Ali-Baba That approach is not going to work either, because a hacker who can modify your game client can also modify the routine which calculates and encrypts the hash value. Forget about client-sided anti-cheat. When you want your anti-cheat methods to work reliable, they must be 100% server-sided and not rely on any cooperation from the client at all. \$\endgroup\$ – Philipp Dec 4 '20 at 16:37
  • \$\begingroup\$ Ok thank you for your efforts spending to reply with this great information ) \$\endgroup\$ – Ali-Baba Dec 4 '20 at 18:45
  • \$\begingroup\$ Extended advice: Be paranoid and assume every client is always hacked. Then defend against it. \$\endgroup\$ – Weckar E. Dec 4 '20 at 19:56
  • 1
    \$\begingroup\$ Some more Q&A about detecting and combatting cheat scripts here \$\endgroup\$ – DMGregory Dec 15 '20 at 17:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.