I developed a pretty basic system for client side replication, but it doesn't work well enough at all.
Basically, the game I am making has multiple users, and the level contains geometry such as boxes that need to be in the same position and orientation for each player. The players can interact and push around the boxes as well. This makes client side prediction necessary, as I can't simply replicate the transforms or player input will be delayed when pushing the boxes.
Pushing boxes around smoothy with 150 ping is my goal.
Now let me tell you about the system I have. Imagine a level with a box in it. The client stores the position, rotation, velocity, angular velocity and world time of that box every tick into an array. This is a history of information for the object. The server sends the same information across the network frequently (for testing, as frequently as possible). This information takes time to arrive on client (150ms for testing) so the client looks 150ms into the past in order to find out his values at the same time as the server's values. The client calculates the difference between what his velocity was and what the server's velocity is, and adds that to his velocity (the difference is multiplied by a factor that I can modify). On top of that, the difference between positions is multiplied by a different factor and added to the velocity.
There is no need to worry about angular velocity just yet. With the current system, I get sloppy results. Is there anyone out there that understands client side prediction enough to help me?
Thanks.