Trust the client architecture OR Clientside

This has been a planned feature for a while:
https://trello.com/c/mC6cifE4/178-weapon-prediction

It’s lower priority than the stuff we’re working on right now, but once we have time we’ll be working on it I assure you.

Unreal already does latency compensation for movement, we just need to write a system for weapons.
The technique we plan to use is called “Backward Reconciliation”.

At a high level, this is the basic premise:

  1. The client fires the weapon and FX are played back immediately on the client
  2. The client sends a RPC call to the server noting the time the weapon was fired and the forward vector.
  3. The timestamp is checked for validity ( can the user be where it claims to be at that time ).
  4. The server rewinds all players back to the reported time.
  5. A ray is cast from the reported forward vector ( at the interpolated position ) into all other players.
  6. Hit-detection and damage takes place and the appropriate response is sent to all clients.

Please understand that this is by no means a simple feat and that it requires some major changes to the weapon code.
It will be implemented when we have time to implement it.

3 Likes