frames animation

Hi all, i have to make an animation, for my game.

I have an array of image,and i set the frame that have to draw in gameLoop, so if i press "D" my boy run right and the frame count was incremented.

The problem is the animation is too slow becouse the time of gameLoop is 30msec and the animation is for 40 frame/sec...

If i make another thread whit smaller intevall only to draw the frame, the perfomance decrese a lot!!!

How can i do?

[466 byte] By [blowa] at [2007-10-3 2:39:31]
# 1
You'll have to interpolate and it might not be smooth if you're simply dropping/keeping frames based on times. I'd render your frames again for 30 ms. Maybe someone will have a better idea though.
SoulTech2012a at 2007-7-14 19:37:47 > top of Java-index,Other Topics,Java Game Development...