About ballistic and netcode
Most modern FPS games usually have two types of weapons:
- Bullet weapons: Which are usually handled instantaneously through raycasting, “if i aim at you and shoot, i hit you instantly”
- Projectile weapons: These weapons generally encompass everything that fly and/or bounce for a certain time. Those weapons usually do not hit instantly, or fly in a straight line.
Now bullet weapons are pretty much handled the best way they can be in term of network usage, when the player fire, he transmit his position/rotation to the server which fire a raycast and determinate what is hit.

Ballistic projectiles and physical projectiles
Projectile weapons tend to follow a much more network intensive approach that consist in sending to the client regular updates on “where is this grenade/rocket now”, which is understandable for weapons like grenades because they are rolling and bouncing around in a very unpredictable pattern. But there are projectile weapons that posses a much simpler behavior, and that’s where we can apply some optimizations.
Ballistic weapons, like rockets, artillery shells or cannonballs are usually handled like physic objects but ,at the contrary of grenades, they follow a very predictable flight path that can be perfectly emulated through a mathematical curve. Since those weapons tend to explode on impact, there is literally no need to pass them through the physics engine.
Lets take an example of a simple non guided rocket that fly in a straight line to it’s destination, it’s trajectory and speed are constant, then what is the point of sending updates to the client at all?
If both server and client know the flight characteristics of a rocket, instead of sending periodic updates on the rocket position in space, the server can simply send to the client:
Rocket ID(N) was fired from coordinate FOO in direction BAR at timestamp T.
With this single piece of data, the client can easily reconstruct where the rocket is now and where it will be the next frame.
The client can even predict when the rocket object will be destroyed (through local collision tests) and play the visual effects related to it, without having to wait for the server to confirm impact.
Rocket ID(N) collided at coordinate FOO2 with object X at timestamp T2.
This can be interesting if you have some form of lag compensation code too.
The same goes for artillery shells, mortars and cannon shells, their trajectory follows an elliptic curve that can be easily calculated by the client and the server without requiring any network intensive synchronization.
You can cut a serious amount of network usage by only making a full server->client synchronization for unpredictable objects (players, vehicles, homing missiles, physical objects, etc…) and handle fully predictable objects through client-side simulation.




I love you….mannequin. *hugs*