Multiplayer Hacking

I know nothing of “hacking”, so I’m hoping to have my thoughts confirmed.

Can a person change a variable? For example, if I have a camera line trace, and the max distance the trace can travel is 500 units, could a person change that to 50,000 and have it affect the trace? I assume so.

Now, what if I run the trace on the server. In this case, changing the variable should have no affect, as the server would still have the variable of 500, right?

And assuming I am correct on those two points, why is there any hacking at all in games? Is the network programming not done correctly? If I’m correct, the only hacks available that affect the gameplay would be auto aim, and radar. Everything else would be client side only, such as changing a damage value on an item. It’d all be visual. Although, one other thing I can see being a problem potentially is removing meshes and being able to walk through them, I suppose.

Is this all correct?

I am not up on all the latest methods of multiplayer hacking, but I believe most devs have cleaned up the easy kills by correctly separating their execution logic between the client and the server.

I think the key is that you write it so the client determines nothing. It only tells the server what the player has input, and the server then tells the client where it is and what effect it has had.

There are probably some tricks to be had when you are trying to balance security with server lag issues affecting the gameplay experience, and that may be the area where devs open themselves to hacking in this day and age. I can see that getting worse as devs try to maximize performance for the coming wave of VR titles.

I remember many MMOs with rubberband issues where you walk 10 feet and then teleport backward because the server keeps updating your location based on where it thinks you are and not where you have actually walked. Overcoming issues like that could theoretically make your game vulnerable.

I would be interested to find out if there is a book that addresses these kinds of issues and how devs have overcome them. Though, networking in my project will probably be relatively easy to deal with compared to many real-time titles…