I wish to create server-side checks which check all players in the game and make sure they aren’t using exploits (Speed hacks and noclip). I have read some articles on it. To do this I will be getting the position of the player’s humanoid root part every frame and will measure the magnitude between these 2 positions. I will measure the distance traveled in this time and compare it to the default walk speed (16). I will then raycast from these points to detect parts in the way to check if their no-clipping.
Will these calculations and raycasts have an effect on performance? And if they will how great will the effect on performance be?
Usually anti-exploits aren’t really the decisive factor of countering exploiters. It is mainly the game design itself and sanitization of remotes from bad input.
If character-based exploits aren’t related to remotes in any way, why are you bringing up sanitizing remotes on my post which is about local exploits injected into the game?
Some games completely don’t include any characters, due to its game design. Thus sanitizing player input is more important there.
Other games include a lot of character-based functionalities, which could be easily exploited. However, certain functionalities cause a problem whenever you’re trying to add an anti-exploit with it. An instance is when the game contains speed powerups.
It’s all in the game design. For the question being, you’ll rather check your playerbase for feedback if there are any issues rather than inquiring it in the first place.
Check my player base for what? Should I have instead of making this post, asked my player base if making an anti-exploit system with raycasting and magnitude checks would be laggy?
Looking outside the question would differ a lot about the general perspective. I’m not going to force you to change your own decision on this. Performance-wise, it is a variable on the code expense itself. There was other considerations about it. To improve the performance, that’s why I mentioned other details that the game design is powerful against exploits AND keeps your performance balanced.
Remember that false positives are a thing and has to be taken to consideration, whenever it impacts players.
Just like any other bit of code, you should make it efficient and keep it as performance beneficial as you can without loosing checks or whatever you may be doing