🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Prevent spectate or camera manipulation cheating?

Started by
3 comments, last by hplus0603 3 years, 9 months ago

Right now I have a debug system that allows the player to change it's observed character from the one you're controlling to another player. This moves the camera to their perspective.

Now, if I want to make this a proper feature for players to use I probably want to make that system be server authority by having the server tell the player what character to observe. Seems straight forward.

But that doesn't fix the problem entirely. What's stopping a player from saying “ignore what the server says, spectate this enemy player" through memory manipulation? I guess if a malicious player is in deep enough to know how to force this setting in memory, they can probably do a bunch of nasty stuff like move the camera around the map anyway so maybe worrying about this is moot anyway?

Advertisement

NetworkDev19 said:
But that doesn't fix the problem entirely. What's stopping a player from saying “ignore what the server says, spectate this enemy player

Yeah, like you said, a player can already manipulate things like the view-matrices you upload to the GPU; or dump the GPUs data to view anything he wants anyway. You can make such things harder and try do make some automatic cheat-detection; but in the end all those tools can be circumvented. As long as the game is run on the players PC, the player in the end has full control. So you should rather have a good tool for players reporting cheaters and the capacity to ban malicious players (without just banning tons of innocent players due to unwarranted reports).

The simplest solution is: Do not send the whole map from server to client – only the surroundings of where the player is allowed to look.

If they have no data they can manipulate the local position or camera on client as they want, but will still not see much more.

Anti-cheat systems rely on a variety of approaches.

Some install a kernel driver that can detect when other software attaches to the game client process. Of course, the cheat tools will then figure out how to disable this driver mechanism – it's a constant war of escalation.

The server can withhold some information in a multiplayer game. However, things that must appear right around the corner, probably need to be updated to the client, to avoid long lag time when things should show up on screen.

The client can send screen shots from right before or at the time of kills or other important events, or just randomly. A human may need to view these to screen for possible cheats.

In general, though, it's really hard to prevent players from “cheating” – you could stick a computer between your client and the upstream internet, and have that sniff all the network packets, and draw whatever view of the map you want, on the side. This is not possible to detect with any software running on the client.

The final solution, is to not ban people, and not let them know whether you know they're cheating or not; just put them in a separate matchmaker server where they end up playing against other suspected cheaters.

enum Bool { True, False, FileNotFound };

This topic is closed to new replies.

Advertisement