Skip to main content

jerky animations

1 reply [Last post]
bradmiley
Offline
Joined: 2005-08-29
Points: 0

My animations are consistently not smooth. A create an animation of duration one second. Below is an example of the of the fraction of the percent of the animation elapsed. Note the huge jump from 0.381 to 0.629 that causes the jerky behavior. I consistently get these huge jumps. Do you have any suggestions? Thanks.

0.0
0.02
0.04
0.06
0.081
0.1
0.12
0.14
0.16
0.18
0.2
0.22
0.241
0.261
0.281
0.301
0.321
0.341
0.361
0.381
0.629
0.643
0.662
0.682
0.702
0.722
0.742
0.762
0.783
0.802
0.822
0.842
0.862
0.882
0.902
0.922
0.943
0.963
0.983
1.0

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
rustyknight
Offline
Joined: 2006-03-24
Points: 0

Without more to work with it's difficult to point the finger.

Because the framework is (very basically) simply providing you the amount of time that has passed, it can sometimes get caught up while other things are going on in the background (repaint, system updates, etc).

Try not to do to many updates to the EDT if possible, forcing multiple repaints could cause a pause in the EDT, which causes a delay with the progress notifications.

The system uses a clever design (weather deliberately or not) that allows users to develop animations that look similar on different types of systems.

From what I can remember, it's using a Swing base Timer (I could be horribly wrong), which might make it difficult to use a separate timing thread for the animation, you'd have to check the code. If it's using a standard Timer, you could try using a separate thread to launch the animation and then sync it back into swing with invoke later call.

Try, also, not to have to many animators running...this will make things run very choppily...

That's a couple of (loss) ideas...hope that helps...