envenger
(envenger)
August 18, 2016, 4:48pm
3
Spawning a ‘fake’ projectile that doesn’t interact with anything and merely shows a visual representation is fine, this is what Unreal Tournament does.
UT replicates the movement from the Server for the ‘Real’ projectile, and the Client lines up their ‘fake’ projectile to that one when it recieves it. The key thing is to make sure that your client projectile really is only a visual representation and doesn’t affect gameplay at all. You also need to handle cases where a projectile from the server arrives after the client one has already expired for example, which can happen if it only exists for a short period of time.
If you’re spawning lots of them at once, pooling them might also be a good approach, and reusing them when neccesary.
Well I want the server version of the projectile to detect the client version because the projectile might have systems in which they might get attached to the target or destroyed.
So basically I want to give that information to the client.