Hi !
Context: A real-time 1-on-1 Multiplayer game, imagine Golf.
Player 1 hits, both players see the ball projectile at the same time. So, ball is synced. I'm using Photon, so I'm doing the syncing manually. Player 1 sees the actual motion, and Player 2, as long as both connections are decent, I could sync the ball nicely, and even interpolate x,y and add velocities to smooth out the motion near-perfectly.
Problem: Often, players lag a little too much and it starts to glitch/skip. I want to get rid of lag-based problems completely by showing Player 2 an imitation (a projectile) of what Player 1 has hit.
Although it's a real-time turn-by-turn game, but there could be a couple of seconds delay, which is fine as long as it looks smooth!
Question: How can I re-create the exact same projectile of the Ball on the other end? There are many factors, especially after it lands and rolls on grass (the decrease in velocities, etc.). I assume there is no way to make the ball stop at the exact same position, twice, despite the same initial impulse/location.
I was thinking is there any other way to improvise? e.g. I would do an Object-time scale and see exactly what happens in the future (within just 1 second). But how to re-create that on the other end?
Or any other ideas?
Thanks!