OK, I'm at a point where I really need this.
In my older networked games I always did a peer-peer setup and just to give the impression of smooth movement it was always good enough to just send the velocity of another player's vehicle or character to each other player. It's fine when you're watching someone else's character move around.
Now though I'm doing a real client/server setup ... one computer is computing all logic. The host is responsible for collisions, physics, ... all logic beside camera and local user input.
The game works ... but just by sending velocity computed by the host back to the joiner across the network is not enough ... well on my 56k laptop connection anyway. I'm not sure how all broadband machines or an LAN would react.
The laptop is reporting a ping of 190 ... so I think that's pretty slow. With that ping though and a 3rd person camera there's a lot of jitter as the car's position and velocity are adjusted. I also have a function to stop a vehicle if it doesn't recieve a new update within that machine's ping. That makes things better ... but still it's jittery (first person isn't quite as bad since the camera is hooked directly to the vehicle).
Anyway, I was hoping that with cubic splines things could be smoothed out another 90%. Basically though ... I need a fresh perspective on the concept of the cubic spline.
What I currently know is that you use 4 points. Something to the effect of using the last two positions to determine 2 new points. Then positioning the vehicle somewhere between these two new points. One of these new points is predicted with the velocity and one without or something.
Anyone who's got it down, I'd appreciate a good description of the implementation.
In my older networked games I always did a peer-peer setup and just to give the impression of smooth movement it was always good enough to just send the velocity of another player's vehicle or character to each other player. It's fine when you're watching someone else's character move around.
Now though I'm doing a real client/server setup ... one computer is computing all logic. The host is responsible for collisions, physics, ... all logic beside camera and local user input.
The game works ... but just by sending velocity computed by the host back to the joiner across the network is not enough ... well on my 56k laptop connection anyway. I'm not sure how all broadband machines or an LAN would react.
The laptop is reporting a ping of 190 ... so I think that's pretty slow. With that ping though and a 3rd person camera there's a lot of jitter as the car's position and velocity are adjusted. I also have a function to stop a vehicle if it doesn't recieve a new update within that machine's ping. That makes things better ... but still it's jittery (first person isn't quite as bad since the camera is hooked directly to the vehicle).
Anyway, I was hoping that with cubic splines things could be smoothed out another 90%. Basically though ... I need a fresh perspective on the concept of the cubic spline.
What I currently know is that you use 4 points. Something to the effect of using the last two positions to determine 2 new points. Then positioning the vehicle somewhere between these two new points. One of these new points is predicted with the velocity and one without or something.
Anyone who's got it down, I'd appreciate a good description of the implementation.