Interpolation problems? (Jumpy players)
by Robert Nall · in Torque Game Engine · 02/19/2004 (1:01 pm) · 122 replies
Bare with me here as I attempt to describe this, heh.
Basically, for any client connected to the game (including the super/server-client) the engine seems to have trouble positioning the other clients in the game. So say you're driving around a track and another racer shows up in your view, they will appear to be spastically warping around their general position. It's as if there were serious lag on the other player, except that nothing else is showing signs of lag. Now if you head over to that other player's screen, you'll see the opposite. His car is moving just fine and the first player's car is all over the place.
I've looked for this in the starter.racing package and not noticed anything. I seem to recall reading somewhere that the speed of an object can affect it's interpolation negatively in the TGE, might that be what's going on here? I'm also using a resource that seperates the camera from the control object, so I suppose that could be causing me problems as well.
So I was basically wondering if anyone else has run into this and knows what it is. If not, I guess I'll have to go test it more throroughly myself, heh. I just have other things on my plate right now and was hoping someone else had already run into and solved this problem before. ^_^
Thanks,
-Rob
Basically, for any client connected to the game (including the super/server-client) the engine seems to have trouble positioning the other clients in the game. So say you're driving around a track and another racer shows up in your view, they will appear to be spastically warping around their general position. It's as if there were serious lag on the other player, except that nothing else is showing signs of lag. Now if you head over to that other player's screen, you'll see the opposite. His car is moving just fine and the first player's car is all over the place.
I've looked for this in the starter.racing package and not noticed anything. I seem to recall reading somewhere that the speed of an object can affect it's interpolation negatively in the TGE, might that be what's going on here? I'm also using a resource that seperates the camera from the control object, so I suppose that could be causing me problems as well.
So I was basically wondering if anyone else has run into this and knows what it is. If not, I guess I'll have to go test it more throroughly myself, heh. I just have other things on my plate right now and was hoping someone else had already run into and solved this problem before. ^_^
Thanks,
-Rob
#62
I've noticed this happens with cameras too
perhaps its only on certain (popular choice it seems)network configurations? or OSes (win xp)
05/17/2004 (5:02 pm)
That would be awesome... I dont understand how this wasnt uncovered before.. it seems to be a pretty serious issue many people are havingI've noticed this happens with cameras too
perhaps its only on certain (popular choice it seems)network configurations? or OSes (win xp)
#63
05/17/2004 (6:50 pm)
Tim took a good look at this problem today, and he seems to have a beat on it. So, that's good. We'll see what happens the next few days.
#64
There were so many issues mentioned in this thread that we'll have to lean on you guys to test out your particular situations and let us know if problems remain. But the main hopping problem should be solved (we believe). It should get checked in to HEAD in the next couple days, and from there you all can test it and let us know.
Thanks for the patience on this issue. It was quite a bear to track down, but Tim did a really nice job, it looks like.
05/18/2004 (1:09 pm)
Tim believes he has the main problem solved here. There were so many issues mentioned in this thread that we'll have to lean on you guys to test out your particular situations and let us know if problems remain. But the main hopping problem should be solved (we believe). It should get checked in to HEAD in the next couple days, and from there you all can test it and let us know.
Thanks for the patience on this issue. It was quite a bear to track down, but Tim did a really nice job, it looks like.
#65
05/18/2004 (1:34 pm)
I just checked in a fix for a client/server vehicle syncing bug. There was a problem with resetting the client's vehicle state when receiving a server control update packet. The incorrect state would cause the client to further deviate from the server, instead of syncing up. Because of the way move updates are replayed, the deviation was exacerbated by server lag. This problem only affected vehicles and was introduced when I added the Vehicle datablock center of mass offset.
#66
05/18/2004 (3:56 pm)
The fix I just put in doesn't directly address any collision issues, though it would have made multi-player vehicle collisions behave worst than they normally do. There still appears to be some issue with the player's network syncing, though I'm not sure if this is just a problem with the player, or all control objects.
#67
so I dunno, sounds like all control objects
05/18/2004 (7:00 pm)
Well as I said I'm having problems with the player and the camera too (alt c)so I dunno, sounds like all control objects
#68
05/19/2004 (1:58 pm)
Well, the problem I thought I had with the players was just do to some test code I put in to see if there were any warping problems. Without the test code, the player and the camera behave fine :) So I don't see any warping problems with either the player or camera classes.
#69
Incidentally, to whoever it was who had lights and particles appearing in the wrong place: You're probably better off creating/positioning your particles and lights and whatnot at the object's render transform -- especially if your vehicles are getting up to high speeds.
05/20/2004 (3:34 pm)
This might be a long shot but... Has anyone checked the quaternion code that's used to handle rotations for vehicles? I haven't looked at it myself but non-slerp interpolation can sometimes cause "pops" with a rotation.Incidentally, to whoever it was who had lights and particles appearing in the wrong place: You're probably better off creating/positioning your particles and lights and whatnot at the object's render transform -- especially if your vehicles are getting up to high speeds.
#70
As I skim down through this huge Thread (that I stumbled across for the first time today), I am noticing that there has been some speculation that the problem occurs only with faster moving vehicles, or that it only happens with AI vehicles.
Not so.
We have the Momentary Lag - Hopping Forward problem described above with a vehicle project we're working on... But our vehicles are big, extremely SLOW-Moving vehicles!
Our game, (always played on an Office Lan), has 7 to 10 PLAYER vehicles...many of which are always visible to all other Players. (No AI Vehicles yet). We've been seeing this Lag-Hop problem since day one, (about 2 months ago) but Ive been assuming that it was somthing we've been doing wrong that we would eventually sort out.
I guess I somewhat relieved (?) that it's probably a more widespread problem than I originally thought, and that theres a good number of folks looking into the problem. I'll be watching this thread closely in the weeks to come.
05/20/2004 (7:19 pm)
For what its worth...As I skim down through this huge Thread (that I stumbled across for the first time today), I am noticing that there has been some speculation that the problem occurs only with faster moving vehicles, or that it only happens with AI vehicles.
Not so.
We have the Momentary Lag - Hopping Forward problem described above with a vehicle project we're working on... But our vehicles are big, extremely SLOW-Moving vehicles!
Our game, (always played on an Office Lan), has 7 to 10 PLAYER vehicles...many of which are always visible to all other Players. (No AI Vehicles yet). We've been seeing this Lag-Hop problem since day one, (about 2 months ago) but Ive been assuming that it was somthing we've been doing wrong that we would eventually sort out.
I guess I somewhat relieved (?) that it's probably a more widespread problem than I originally thought, and that theres a good number of folks looking into the problem. I'll be watching this thread closely in the weeks to come.
#71
I've tried on half a dozen computers with different internet connections
And no I dont believe it has anything to do with movement velocity, the interesting thing is sometimes I can get into a game and it works just fine, the next time it wont.. somethings obviously getting out of sync here.. I'm not sure if its the same for vehicles
05/20/2004 (8:18 pm)
I just hope they havent ruled out most shapebase objects to have this problemI've tried on half a dozen computers with different internet connections
And no I dont believe it has anything to do with movement velocity, the interesting thing is sometimes I can get into a game and it works just fine, the next time it wont.. somethings obviously getting out of sync here.. I'm not sure if its the same for vehicles
#72
05/22/2004 (11:04 am)
Yes. But you should still buy it twice. Bwahahahaha...
#73
For best results, send me/Josh reproduction cases that are as simple as possible. I already fired some of them off to Tim to good effect - he fixed a bug or two. Other issues he's having trouble reproducing. Instructions to replicate and journal files are both good things!
05/22/2004 (3:33 pm)
TNL is a bit cleaner and nicer than TGE. :)For best results, send me/Josh reproduction cases that are as simple as possible. I already fired some of them off to Tim to good effect - he fixed a bug or two. Other issues he's having trouble reproducing. Instructions to replicate and journal files are both good things!
#74
That said, there is a certain level of functionality that Torque should be providing, and it includes vehicles that don't jitter like mad. :)
05/22/2004 (5:36 pm)
Good luck with that. There's a lot of freedom to be had when your code is broken out in a seperate library and you're NOT actively using it for a major game engine. :)That said, there is a certain level of functionality that Torque should be providing, and it includes vehicles that don't jitter like mad. :)
#75
Anyway, just did some playing around, and found an interesting repro case in Torque HEAD - set lag moderately high and drive around and the camera goes nuts. So I'll see if I can get someone to look at that.
Also, you should modify the editor to render the client side bounding boxes - the server side boxes will always lag, as they're showing a view out of synch with the client. :)
05/25/2004 (10:20 pm)
Dave, are you sure that this isn't just because the boxes updated at different rates? Server side boxes (the yellow ones, I think) are updated at a fixed rate of 32Hz, so they naturally look a bit jerky. Due to interpolation, lag is also normal. However, it's possible there is too much.Anyway, just did some playing around, and found an interesting repro case in Torque HEAD - set lag moderately high and drive around and the camera goes nuts. So I'll see if I can get someone to look at that.
Also, you should modify the editor to render the client side bounding boxes - the server side boxes will always lag, as they're showing a view out of synch with the client. :)
#76
Would help my case I wasnt the only person with these specific problems :) thanks
05/26/2004 (3:33 am)
Digital dave have you tried moving around as a player avatar? have you noticed any jitters.. sometimes its so subtile you wouldnt notice if you blinked, but other times it can be game stopping in my base the way I tested it was to get an orc and run paralell to him strafing and keep my crosshair on him, that way I can test if im jittering muchWould help my case I wasnt the only person with these specific problems :) thanks
#77
well this makes me feel alot better :)
One thing I continue to notice is it appears random, sometimes I can join the server and it works almost perfectly, yet another time its unplayable, I think its a case of getting out of sync... oh well thanks for letting me know anyways :)
05/26/2004 (4:46 am)
YEAH the turning! thats the big problem for me, it keeps warping back grrrwell this makes me feel alot better :)
One thing I continue to notice is it appears random, sometimes I can join the server and it works almost perfectly, yet another time its unplayable, I think its a case of getting out of sync... oh well thanks for letting me know anyways :)
#78
Here is my db settings
oh yea, TGE crashes with these insane settings.. "bad range! in getBinRange"
05/28/2004 (12:21 pm)
Some toss me a "How to reproduce" the particle issue. I just made loaded the starter.racing and created a new flat terrain mission. I also cranked my datablock settings whicked high, the racing buggy takes off like a farging rocket now!! I see particles and they seem to be coming from each wheel.. as I turn I see four distinct particle trails.Here is my db settings
datablock WheeledVehicleData(DefaultCar)
{
category = "Vehicles";
shapeFile = "~/data/shapes/buggy/buggy.dts";
emap = true;
maxDamage = 1.0;
destroyedLevel = 0.5;
maxSteeringAngle = 0.785; // Maximum steering angle, should match animation
tireEmitter = TireEmitter; // All the tires use the same dust emitter
// 3rd person camera settings
cameraRoll = true; // Roll the camera with the vehicle
cameraMaxDist = 10; // Far distance from vehicle
cameraOffset = 1.5; // Vertical offset from camera mount point
cameraLag = 0.1; // Velocity lag of camera
cameraDecay = 0.75; // Decay per sec. rate of velocity lag
// Rigid Body
mass = 200;
massCenter = "0 -0.5 0"; // Center of mass for rigid body
massBox = "0 0 0"; // Size of box used for moment of inertia,
// if zero it defaults to object bounding box
drag = 3; // Drag coefficient
bodyFriction = 0.3;
bodyRestitution = 0.3;
minImpactSpeed = 0.1; // Impacts over this invoke the script callback
softImpactSpeed = 5; // Play SoftImpact Sound
hardImpactSpeed = 15; // Play HardImpact Sound
integration = 8; // Physics integration: TickSec/Rate
collisionTol = 0.1; // Collision distance tolerance
contactTol = 0.1; // Contact velocity tolerance
// Engine
engineTorque = 15000; // Engine power
engineBrake = 10000; // Braking when throttle is 0
brakeTorque = 13000; // When brakes are applied
maxWheelSpeed = 800; // Engine scale by current speed / max speed
// Energy
maxEnergy = 100;
jetForce = 3000;
minJetEnergy = 30;
jetEnergyDrain = 2;
// Sounds
// jetSound = ScoutThrustSound;
// engineSound = BuggyEngineSound;
// squealSound = ScoutSquealSound;
// softImpactSound = SoftImpactSound;
// hardImpactSound = HardImpactSound;
// wheelImpactSound = WheelImpactSound;
// explosion = VehicleExplosion;
};oh yea, TGE crashes with these insane settings.. "bad range! in getBinRange"
#79
so if you just launch a mission it will work ofcourse
you need to create a dedicated server, and then launch a seperate client and connect
05/28/2004 (12:30 pm)
This deals with online issues...so if you just launch a mission it will work ofcourse
you need to create a dedicated server, and then launch a seperate client and connect
#80
I'll have to fire up the dedicated server on my win2k box and and do some testing.
-Ron
05/28/2004 (1:45 pm)
That explains why I am chasing my tail then ;)I'll have to fire up the dedicated server on my win2k box and and do some testing.
-Ron
Torque Owner Westy
*hopes*