Motion isn't smooth, it... shivers a bit

For lack of a better word, my motion “shivers”.

I have just a smple little scroll going. Words and text just scroll across the bottom of the screen. The performance is great, no matter how much I dump anti-aliasing, tranparancy, whatever into the scroll. But as it moves alone, every so soften there is a little flicker. The text (well, it’s all just 2-d textures, not real “text”) seems to almost imperceptibly jiggle back and forth a little bit.

It’s not Garbage collection. I am watching the GC run and nothing major is going on there. It shouldn’t be frame rate. I’m scrolling it at less than 40 fps (limited with a Java util.Timer. It never even uses more than 10% CPU at the most.

I have tried everythign to fix it… Even merging all the images into one huge texture, playing with double buffering (even forcing swapBuffers)… no good.

Any ideas?

Oh, and just to add soemthign, when the mouse enters and exits the window, the entire thing jumps like crazy for a second. Could that be related?

Do not use the java.util.Timer. You want to use a game loop for rendering and a hires timer to update the text. With a hires timer a mean something like the java 5 nonoTime function that you use to mesure how long it took to render the previous frame.

[quote] But as it moves alone, every so soften there is a little flicker. The text (well, it’s all just 2-d textures, not real “text”) seems to almost imperceptibly jiggle back and forth a little bit.
[/quote]
That sounds like double-buffer flicker (happens when the image buffer is dumped to the component and mis timed with your monitors refresh rate). It’s most likely not your fault and there is probably not something you can do anything about. You could try lowering your monitors refresh rate, it will probably help some, but it usually isn’t enough to sweat over anyways. All JOGL/LWJGL programs do that on my computer a little bit as well. I have a high refresh rate monitor…a little to high :wink:

I have no problems with the normal java 1.4.2 timing to avoid stuttering etc. But as mentioned it could be the monitor :slight_smile: