Xonotic Forums
[NEED HELP] Hey, I'm a (new dev?) trying to improve anti-cheat - Printable Version

+- Xonotic Forums (https://forums.xonotic.org)
+-- Forum: Community (https://forums.xonotic.org/forumdisplay.php?fid=6)
+--- Forum: Oh Hey, I'm new, I'd like to Introduce myself (ohiniltim) (https://forums.xonotic.org/forumdisplay.php?fid=28)
+--- Thread: [NEED HELP] Hey, I'm a (new dev?) trying to improve anti-cheat (/showthread.php?tid=8341)



Hey, I'm a (new dev?) trying to improve anti-cheat - Quantum - 06-01-2020

Hey, I'm a fresh college grad trying to get into the anti-cheat industry. This might sound kind of crass, but contributing to Xonotic sounded like a good way to hone my skills and improve my portfolio.

I hear that cheaters aren't a big problem in this game, but it doesn't hurt to be prepared. I think a good first order of business would be to improve culling / anti-wallhack / fog of war. I just started reading the codebase, so I could use a few pointers. Does anyone know a quick way to evaluate wallhacks--maybe a console command that reveals wireframes, an engine tweak that makes walls translucent, or just straight wallhack code? Also, I heard that you guys already have some culling code--I presume something quick and dirty with potentially visible sets? Does anyone know where that is?

Thanks for your help.

Update: I figured out how to make walls transparent. The PVS implementation is quite good because players move fast. I also found the culling code sv_main.SV_MarkWriteEntityStateToClient, but I'm having trouble reading it. I should be able to figure it out in a day or two, but it would be nice if someone could walk me through in a Discord call. Also, does anyone know how to make a bot that stands still? I can probably just remove a line in the bot code--asking just in case anyone knows off the top of their head.

Update: Figured out how to manipulate bots and launch a second client on https://gitlab.com/xonotic/xonotic/-/wikis/Programming-Tips.


RE: Hey, I'm a (new dev?) trying to improve anti-cheat - Lyberta - 06-01-2020

A universal anti-cheat would be using Fitts's law and look for players who have abnormally strange movements. But that's non-linear regression and machine learning.


RE: Hey, I'm a (new dev?) trying to improve anti-cheat - Quantum - 06-01-2020

I took a lot of ML classes in college. I'd have to find a way to get enough good data, but I could do the modeling without much trouble. Haven't heard of Fritt's law, so thanks for the pointer!


RE: Hey, I'm a (new dev?) trying to improve anti-cheat - BuddyFriendGuy - 06-04-2020

This may not come as a surprise to many veterans here, but I just realized that my demo (i.e. recording) files only has the data I am able to see, i.e. if somebody is behind the wall, the information I'm not supposed to see is not recorded in demo, so my opponents will sometimes disappear, even when I set my camera from the other side (when viewing the demo).

I suspect the information is held back by the server so hacking the client's walls won't help, but I may be wrong.


RE: Hey, I'm a (new dev?) trying to improve anti-cheat - Gibson - 06-07-2020

(06-04-2020, 04:40 PM)BuddyFriendGuy Wrote: This may not come as a surprise to many veterans here, but I just realized that my demo (i.e. recording) files only has the data I am able to see, i.e. if somebody is behind the wall, the information I'm not supposed to see is not recorded in demo, so my opponents will sometimes disappear, even when I set my camera from the other side (when viewing the demo).

I suspect the information is held back by the server so hacking the client's walls won't help, but I may be wrong.

Yeah, the server filters which players it sends you based on what it thinks you can see (assuming the map was compiled properly).


RE: Hey, I'm a (new dev?) trying to improve anti-cheat - Antibody - 06-08-2020

@Quantum - If you're interested in building a model, I could arrange to get you a dataset from our telemetry. I store it all in our stats database for easy retrieval. Example data can be seen in the "e anticheat*" events here. You'd have to look in the codebase for their origin, though. I'm just the storage man!