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

Re: [pygame] How to make a (fast) smooth movement on 30 frames



DR0ID wrote:
For the movement I would recomend time based movement because then they move on every machine at same speed :-).

I've been using time.sleep(.05) or something like that; it greatly reduces CPU usage. Using that in combination with a time-getting function can make the speed constant on all machines.


For a really smooth movement I think you would have to use motion blur, but I do not know how to do that.

Whoa, interesting concept for Pygame. I'm going to resist the temptation to run off and program it, but I guess what you'd do is save the previous frame (using Pygame's existing double-buffering ability?) and for moving objects, blit it beneath the current frame with high alpha, leaving a ghost of it on the screen.


Kris