News for hackers. Stuff that matters.
Re:Never trust the client by amelius on Wednesday April 27, 2016 @04:01PM (#11584010)
Perhaps you can solve this as follows. The client is going to go through a series of states, guided by some inputs. You can compute a hash from these states. Now you let the server go through the same states (using the same inputs), and compute the hash, and compare the hash codes from server and client.

This sounds prohibitively complicated (and requires work from the server). But note that the state can be a partial state (with obviously weaker protection against hacking), but perhaps still good enough.

Re:Never trust the client by greenail on Wednesday April 27, 2016 @04:12PM (#11584113)
from my recollections forever ago, RTS games like the spring engine use checksums on state to prevent manipulation. the game client gets "out of sync" if a client's checksum doesn't match. The state checksum is computed at every tick of the simulation. This makes it so you don't have to run the simulation on the server. Debugging is very hard though, and odd things like FPU precision on different processors can create all kinds of difficult bugs.
Re:Never trust the client by maccard on Thursday April 28, 2016 @04:47AM (#11587327)
Those fpu precision issues are a nightmare. The most common way to get Around them is to do integer math instead.

One thing that makes this possible is that many of those games run st much slower update rates (typical games are 30/60hz, many rts games run at 10hz) and they run in lock step. If you have different clients with slightly different views of the world it doesn't work at all

Re:Never trust the client by amelius on Thursday April 28, 2016 @04:56AM (#11587355)
I thought that IEEE floating point operations were well-defined, and guaranteed to always behave in the same way (but there are a few CPU flags that can influence e.g. rounding).