I’ve been working on a networked multiplayer fps-like game with a ‘over-the-shoulder’ camera view and characters’ main attack skills are mostly slow moving projectiles like RPG. You can think of Brawl Stars with 1st person view.
My problem is that I can’t find a good solution to set (or fix or calculate) the initial moving vector of a projectile when a player A triggered it towards player B, which should be applied to server and all clients.
I’ve searched many Q&As and articles of ‘projectiles in network game’ (some of them are
link text,
link text,
link text,
link text)
However, I can’t find mentions about a projectile’s direction or trajectory (not the speed) that is easily out of sync in networked play under this situation : authoritative server, owner player’s position is predicted in its own device, other players are interpolated (like 100ms), no entity extrapolation is used.
For better understanding, I drew a kind of diagram.
In above situation, if I take the projectile’s direction in Client A (favor of the shooter) and apply it to Server, and Client B, player B in Client B will have hard time dodging this projectile because of the wrong direction.
Can anyone help me out what a projectiles moving direction should be? Is trying to sync it something that I don’t have to care? Or the direction can be different on Server, Client A and Client B? Any help would be greatly appreciated.
