Game Development Community

Player jitter

by Maxime Jouin · in Torque Game Engine · 06/11/2007 (2:27 am) · 10 replies

Sometimes when a player is standing on a sloped surface and not moving, it starts to jitter up and down as if collision detection were going haywire. ANy idea why this happens? And more importantly, how can I fix this?

For info, I am using TGE 1.5.2

#1
06/12/2007 (1:34 am)
Update on the problem: this only happens on distant players and never with the controlled player! The controlled player on the local machine never has this problem, but its ghost on the distant machine does. Maybe something to do with the collision detection on the server? I am completely stumped, any help is welcome.
#2
06/12/2007 (3:10 pm)
I don't know the answer to this question, but I have noticed that distant players can do a little teleportation as they are moving. I take it as a kind of LOD for networking kindof thing, since more distant players would generally be less relevant to you.
#3
06/13/2007 (12:50 am)
I probably worded my question wrong: what I mean by "distant player" is players that are controlled on another machine and connected to the same server as me, or "ghosts" if you will. I did not mean players who are far away in the distance. It's the word we usually use and I just noticed it can be ambiguous, sorry :)

To give an accurate example: I am standing on a hill, surveying the terrain and everything looks peachy, no animation problems or anything. On another machine, another player connected to the same server, is sneaking up on me from behind to deliver a fata blow. On his machine, my player is jittering up and down like mad, whereas on mine, my player is standing perfectly still. Should I post this as a bug? Is it a known issue? Am I the only one to have this problem? I can't find anything about it on these forums...
#4
06/13/2007 (1:56 am)
It's a tough call, but there's obviously something going wonky server-side.

So... in basic troubleshooting fashion...

Does it happen in starter.fps for 1.5.2?

What were the last changes you made to the engine prior to this problem arising?

What are the differences between your project and 1.5.2?

While I've never encountered such a problem directly, I have quite frequently done something that I thought was unrelated to a problem I was witnessing, while in reality goofed something vital without realizing it.

Find the change between your code and 1.5.2 that makes this problem occur.
#5
06/13/2007 (2:22 am)
The first thing that came into mind was "What changes did I make to break TGE? Are my .dts files corrupt?" So I fired up starter.fps from a clean install of the TGE 1.5.2 and I'm sorry to say, the problem appears there as well... The problem is a torque problem after all...
#6
06/13/2007 (2:59 am)
There are two primary types of "jitter":

--extremely rapid, basically at frame rate speed. This is normally due to improper use/modifications of ::interpolateTick (which handles render positions per frame, at frame rate speed, between physics ticks). It can also be caused by a faulty camera offset--using the wrong transform of the player for example (although this usually happens in an orbit cam mode of some sort)

--"not quite so rapid"--basically, one way to describe what this looks like is "slippage"--the model seems to slip, and then recover to the old position, slip again, then recover, etc. etc. This is normally caused by the client and the server disagreeing about where the player/object should be, and can be caused by a variety of things, but most commonly the client's simulation being out of synch with the server. It happens most often with modifications to the client side terrain which don't happen server side, but can happen due to network issues as well.

Neither of these issues are apparent in TGE 1.5.2 stock in normal circumstances in 99% of the users, so I honestly don't know what to say, but if you can describe which of the two above you are seeing, it may help us help you troubleshoot.
#7
06/13/2007 (5:36 am)
I posted a video of the problem here. I use the starter.fps to do this, unmodified and untouched after a fresh install. What's more, the client is running the starter.fps from a copy of the server's folder to make sure that all data are exactly the same. You can clearly see the orc in the middle of the screen jitter up and down, but on the machine of the player controlling that orc, the player is steady. What the video doesn't show however is, if I look at the orc from another point of view (move away or closer) the jitter disappears! It reappears again when I get back to the same position; Really wierd... Whenever this problem occurs, it happens for a certain camera position which can be very close to the player or pretty far away. If I had to guess, i'd say it's a "not quite so rapid" jitter type :)

I agree that there is something wonky happening on the server, but I have absolutely no clue what it is. Both the client and server on this video are running on the same LAN so bandwidth and connection speed si not an issue.

I'd be happy to post any more details anybody needs, because this is starting to be a big issue in the development of our project, since a lot of close up interaction with other users is frequent, and the jittering makes the experience very tedious.
#8
06/13/2007 (6:45 am)
That's really odd. When a player is standing still on the terrain, it should be very difficult for it to jitter since small forces are negated inside updateMove () for the sake of gravity.

Are you sure that's not the animation? Try printing the render position of the orc. Watch it and pay attention to any changes.
#9
06/13/2007 (6:52 am)
It is definitezly not the animation, sinc this does not happen all the time like I said. It only happens sometimes, at certain camera angles none the less. And it happens in the starter.fps with the stock TGE 1.5.2, with the stock .dts and stock .dsq, but it also happens in our modified version of the engine, with our own .dts for the player and our own .dsq animations.

I could print out the renderPosition of the orc if you want me to (but it's going to be a pain to get it just in the right position for the jitter to happen :) ). Just tell me exactly where in the code do you want me to print out the position and what do you want me to print out.
#10
06/19/2007 (12:41 am)
Shameless self bump. Anyone?