I need to create an interactive animation with smooth playback in Java 2D.
The performance of Java 2D seems quite good in general, so I can easily use
this API to achieve the framerate I need.

But my concern is that playback is jerky. The computer halts quite often
when showing the animation. Even the simplest animation, say of a small
ball moving across the screen, will not move smoothly. It will move
smoothly for a second or two, then jerk, then move smoothly again. I have
tried many approaches to get rid of this jerky movement, but failed. The
problem seems to be deeply buried in the JVM itself, and I suspect what is
going on is very frequent garbage collection of garbage created by the JVM
itself. I have noticed this same behavior in all Java 2D related examples,
also the examples from Sun. My old Java applets also suffer the same
problem when running in a Java 2 environment, even though they ran smoothly
in previous Java environments.

I recognize Java 2D as a powerful API for multimedia production, but if it
does not allow smooth playback the usefulness is drastically lowered. I
hope I do not need to return to a previous Java version to solve the problem.

Does anyone have any experience or thoughts about this?

Regards,

- Tonny Espeset


Plutonium Software
http://www.plutoniumsoftware.com

Reply via email to