Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.acorn.programmer > #6224 > unrolled thread

Re: Instability in rectangular cursor

Started byRichard Ashbery <basura@invalid.addr.uk>
First post2020-11-15 13:20 +0000
Last post2020-11-15 13:20 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.sys.acorn.programmer


Contents

  Re: Instability in rectangular cursor Richard Ashbery <basura@invalid.addr.uk> - 2020-11-15 13:20 +0000

#6224 — Re: Instability in rectangular cursor

FromRichard Ashbery <basura@invalid.addr.uk>
Date2020-11-15 13:20 +0000
SubjectRe: Instability in rectangular cursor
Message-ID<58cfce3e97basura@invalid.addr.uk>
On 13 Nov in comp.sys.acorn.programmer, Steve Fryatt
<news@stevefryatt.org.uk> wrote:
> > 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.

Thanks Steve for the explanation. It looks as though a complete rewrite
is necessary. Steve D indicated that triple buffering may be required -
I briefly had a look at this but understanding the process is
challenging - maybe it's time for a revisit.

My simplified version does away with the mouse cursor and relies on the
wash colour to erase the verticals - it seems to work just as well but
doesn't look so pretty.

Richard

[toc] | [standalone]


Back to top | Article view | comp.sys.acorn.programmer


csiph-web