Board Thread:Game Discussion/@comment-31526827-20180319073112/@comment-31526827-20180320155654

The server runs everything by both sending and receiving mesages from each client. All the clients only talk to the server, they never talk to each other. One reason is that if each client was to try to reach another one they'd have to breach any firewall or security that client has; whereas the server is already through by virtue of the fact the original connection was made.

The server only knows EXACTLY where any other car is only when the client tells it. At any time in between when the client says, "I'm here" it has to interprolate... "It was here, It was going this direction at this speed and at this accelleration/decelleration and angle. Until I hear otherwise I'll assume it's still going that way."

Now; we have a wall. If the server doesn't hear from the client it just assumes the car will continue on it's path. And that path might way, "into wall" - so it's processed as such and the server lets everyone else know, "Car 133242 went into wall thusly" - but THEN, after teh fact, it gets a message from car 133242 that says, "In fact, I pulled off a braking and turning manuever and missed it" so it has to correct things to match up. And that can give you those really bizzard jumping around moments. What we call "Lag" behaviour.

In the case of OMP, as far as I know, the effortless hack is the one that changes the stats of the car on the client side, the client program keeps telling the server where the car is, and it's going really fast and braking really hard and the server just accepts that as fact, no matter how unreal.

What we're doing here is forcing a validity check (vs sanity check, another method but one that can sometimes snag a legal user so I don't prefer. Santity checks say, "A car SHOULDN'T ever go this fast so must be illegal;" but forgot to notice it was going downhill). The check says, "I KNOW the legal values of this car because *I* maintain the master database, if ANY other value appears it MUST be illegal and therefore we have ourselves a cheater."

That's it.