how to solve the shaking problem?

Started by qjvictor, November 21, 2006, 09:14:07 PM

Previous topic - Next topic

qjvictor

I have some objects moving in my 3D game, but when the objects move, the whole screen looks a little bit shaking, which is not acceptable. Could I adjust some parameters in the Config or World or Camera to solve such a problem?

thanks.

cyberkilla

That is interesting.
I have no idea what you are referring to, but I do recall
this happening if your backbuffer isnt used properly.

When superimposing sprites onto the map, changes to the positions of
them were done, and you end up with things shaking as the positions
of some where altered before the redraw, and some missed it and were left behind by a pixel or to.

I would imagine you are speaking of a different phenomenon, but
I thought id mention this:)
http://futurerp.net - Text Based MMORPG
http://beta.rpwar.com - 3D Isometric MMORPG

EgonOlsen

Hard to tell what you are experiencing here and what do you mean with "shaking"? Are you by any chance manipulating objects and/or the world from another thread than the rendering takes places in when moving?

cyberkilla

http://futurerp.net - Text Based MMORPG
http://beta.rpwar.com - 3D Isometric MMORPG

qjvictor

A thread reads position data from database, and move the objects to the position. The problem is when the objects move to the specified position, the objects keep on shaking. That means the movement is not smooth as excepted.
Any body can give me some tips about this question?

cyberkilla

I might not grasp what you are saying, but it looks like what me and egon just said:).

If you manipulate the positions of them in one thread, and it isnt synchronised with the thread that does the painting, you end up with shaking.
Its hard to explain.

You NEED to translate the objects, THEN paint.

If i dont understand you still, my bad:P
http://futurerp.net - Text Based MMORPG
http://beta.rpwar.com - 3D Isometric MMORPG

Melssj5

I think that your thread are always moving the object, maybe validating the last position with the one obtained from the database!

If you are doing so then the problem may be the precition, for example you store 2.34, 3.5678, 2.564 on you database but you get 2.34, 3.57, 2.56 then there will be a small difference between the saved and the loaded data, that may make your object to move small distances on each iteration!
Nada por ahora

qjvictor

Thanks for your reply.
It is because the defferent speed of every object.
for example:
    due to the different speed, the distances between the leading object and other objects are changing per 10 ms, and my camera is always looking at the leading object, so from this camera's view, the other objects are shaking,  for example, the first 10 ms, object 2 is behind 3 pix to the leading one, after 10 ms, object 2 is behind 5 pix to the leading, and maybe after another 10ms, object 2 is behind 1 pix to the leading.  I make the camera focus on the leading one, so it seems that the object 2 keep on shaking.

But I don't figure out how to solve this.

qjvictor

after I change the speed, make sure every step is small enough, the shaking problem is solved.
thanks.