I'm working on a multiplayer game, and I've implemented a simple enough player prediction (according to this great article) - which works well enough.

What isn't discussed there, and my question here; is how do I handle non-raycast projectiles (like missiles for example)?

There is RTT between the player pressing fire to the time he receives back the server's "confirmation", and then all other players add their latency to the mix.

And of course there is the issue of actually rendering hits; what if I see my missile hit someone in my simulation while he wasn't even there on the server and the missile missed him completely?

So my question is, what is the best way to hide latency for all players in (relatively) slow moving projectiles in an authoritative server?

  • \$\begingroup\$ I could do with an answer to this. As it is, I get the server to send the client a batch of "unfired" bullets, which the client can launch immediately. However, since the server is authoritiaitve, only hits validated by the server actually do any harm. \$\endgroup\$ Aug 30, 2018 at 15:24

1 Answer 1


This is what we ended up doing:

Client side

  1. Detect player clicks button to shot missile
  2. Immediatley simulate rocket visuals on client
  3. In parallel, send command to server
  4. Once predict hit something, destroy missile (no explosion)

Server Side

  1. Receive fire command
  2. Save client ping data on missile
  3. Fire missile, each frame accelerating the missile until we've caught up with the lag delta (but without rewind replay)
  4. On explosion, send both explosion FX + damage result

It works very well most of the time (around 99.9% of the time)

  • \$\begingroup\$ What about other clients? Did you spawn local bullets for other clients (if so how you handled them?) or server manages/sends movement of bullets and other players just receive/interpolate? \$\endgroup\$
    – unlut
    Aug 9, 2019 at 12:40
  • \$\begingroup\$ @unlut - for anything that has to be deterministic we sync it from the server. If I'm not mistaken we simply spawned a local instance on the remote client, simulated it and then exploded it when received the explosion from the server. \$\endgroup\$
    – Ron
    Aug 20, 2019 at 11:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .