flicker
ftornay at ugr.es
ftornay at ugr.es
Tue Oct 14 15:15:20 UTC 2003
Flickering is a common problem when one tries to program animation or present
brief images, no matter which software is used. It may appear every time only
one part of the screen is updated. The general solution is to copy a large
portion of the screen or even the whole screen. First try waiting for a
vertical display and clearing the wole screen before drawing the second
presentation:
display.waitforverticalblank
presentation1.draw
sleep 33
display.waitforverticalblank
display.canvas.clear
display.waitforverticalblank
presentation2.draw
sleep 33
display.waitforverticalblank
display.canvas.clear
With this code you may skip a refresh cycle for every presentation. You may be
better off shortening the sleep times to, say, 30 ms if your refresh rate is
about 60, as is usually the case. The real presentation time would be about two
refresh cycles, so 33 ms, more or less. Take into account that erasing the
screen between presentations would take an extra refresh cycle.
There are ways of recording the actual presentation times. If this doesn't work
you should consider using canvas, rather than display objects, which I think is
the best method for presenting very brief images. In either case, I could help
you with the details of the code if you let me know more about your procedure.
Hope this helps,
Francisco J. Tornay
Universidad de Granada
More information about the Eprime
mailing list