The mouse overlays another horizontal rectangle but in so doing
results in instability and spoils the rendering. Any solutions would
be welcome.
On 13/11/2020 13:17, Richard Ashbery wrote:
The mouse overlays another horizontal rectangle but in so doing
results in instability and spoils the rendering. Any solutions
would be welcome.
I am not sure I get what you want, but you could try a WAIT before
one or both the RECTANGLE statements.
You make a fair point and although WAIT does work in this example it dramatically slows down the program that this code has been ripped from.
You make a fair point and although WAIT does work in this example
it dramatically slows down the program that this code has been
ripped from.
It will do, because it seems to rely on replotting the screen many
times a frame, which is what causes the tearing effect.
WAIT simply pauses the program until the start of the next video
frame, when there's a small window of time in which to update the
screen while the video flyback is happening. If the code is
expecting to execute the REPEAT loop many more per second than the
monitor refresh rate, then the game will slow down as a result.
Unfortunately, you can't change the video refresh rate because
that's set by your monitor, so to fix the tearing you will need to
decouple the game timing from the screen update.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 307 |
Nodes: | 16 (2 / 14) |
Uptime: | 67:22:01 |
Calls: | 6,915 |
Files: | 12,379 |
Messages: | 5,431,811 |