[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] Time-based interpolation :: jitter problem



Hi !
I am trying to use an interpolation based on time.time() to create
smooth animations with Pygame and OpenGL.
The idea is to get time-based motion tween, instead of frame-based.
It seems like there is still jitter in my interpolation. The motion is
not uniform.
Anyone can propose a more accurate way to measure time
(human-perceived time, not CPU time) than time.time()?
...or maybe it is my Tween class code that is wrong. It is based on
the excellent Robert Penner easing equations. Maybe there is something
wrong with my Tween.tick(t) method.
Can you guys take a look ?

You can download my tweening test here :
http://alexandre.quessy.net/static/pygame/tween_progress.tar.gz
(this code is part of toonloop.com)
-- 
Alexandre Quessy
http://alexandre.quessy.net/