- Home /
Question about RPCs
Hi, I am trying to create a multiplayer shooter and i have a little problem synchronizing my bullets.
Actually i am managing the bullet by spawning it instantly on the client that shot it, then i use a Rpc to tell everybody to do the same thing. Everything is working fine but as you can imagine, the bullet will be slightly in the past for everybody except the shooter. Every Answers i found about this problem was to let this "delay" for everybody including the shooter. I'd like to know if i can get the "ping/delay" of a Rpc to do something like :
Ok lets spawn a bullet there with this velocity for everybody (except the shooter, he already got it), but check when it has been sent, use this delay to move the bullet according to its velocity in order to simulate the bullet perfectly on everybody with absolute spatio-temporal precision ?
TLDR: how can i know the "ping" behind a Rpc ?
Answer by Outliver · May 10, 2016 at 02:55 PM
The old RPC API is deprecated. Anyway, there is System.Net.NetworkInformation.Ping in C# already which has a Send() Method.