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

Re: [pygame] [Pygame] How can I have an accurate timing when I am showing an image?



On May 23, 2008, at 3:38 PM, Francesco Martino wrote:
I am using Pygame for building a psychological experiment.
The code should do something very easy: it should display an image for
a limited amount of time, then show a blank screen and then another
image. Images are stored as bitmap files (470 Kb each).
The main requisite for this program is that timing needs to be very
accurate, namely if I say that an image should be displayed for 800
msec the amount of error should be as little as possibile.

Anywhere you need that kind of timing accuracy, python is probably not the right tool for the job. I would recommend using plain SDL in C, you will likely find it much more stable timing-wise.

--Noah