Comment by theshrike79

Comment by theshrike79 2 days ago

2 replies

Server-authoritative games. Basically the client does stuff, gives the list of moves to the server along with a checksum/end result. Then the server runs the same commands on the same starting state and checks if it got the same result.

If a==b, then everything moves on as normal. If not, the client gets a synchronisation error and has to rewind back to the last known good state.

Completely unfeasible for anything real-time pretty much.

0xC0ncord 2 days ago

Having done modding for some older shooter games built on the server-authoritative model, it's still possible to create a "pingless" experience, but it requires more calculations and compromises on client/server trust to make it work. For shooters specifically, you want the client to provide instant feedback when the gun fires, and ideally when they hit an enemy. You can achieve this by telling the server "I was at position A and shot my gun at position B and hit enemy Bob." The server will validate all of this before informing the client who fired and the client for "Bob" that Bob was killed. The compromise here is that the server must trust that the client isn't sending forged data, or the server must do additional computations to validate it.

  • PetitPrince 2 days ago

    An elaborated version of this idea is called "rollback" where you let the local client predict and execute the game state at time t+1 and will "roll back" the state of the game if it received another game state than the one predicted. Extremely popular and state of the art for 2D fighting games (most of the time the prediction is correct and it greatly reduce the perceived lag) , but probably harder a bit harder to do with 3D games.