Page 1 of 1

Besides WAIT &H8D3, what's another way to to reduce flic

Posted: Thu Jan 17, 2008 5:05 pm
by Mentat
I used WAIT, but everything drawn last still flickers horribly. Is there a way to get rid of it in screen 12? If not, what is the closest screen to 12 that can do it? I'm revisiting QB, and I can't seem to find the stuff I need.

Thanks.

The reason that I'm asking this is because of two reasons:
I'm writing a pac clone (but with path-finding and other types of AI)
And I want to make a moving 1st person perspective demo in QB

And both are going to flicker when I convert (they are currently in FB).

Posted: Thu Jan 17, 2008 11:13 pm
by burger2227
What exactly are you erasing? Are you using CLS? CLS will cause flickering.

SCREEN 9 can use page flipping to stop flicker. Screen 12 cannot.

How does it look in FB? It might be better to use that.

Ted

Posted: Fri Jan 18, 2008 4:51 am
by BadMrBox
You could take a swing at using Future.Lib if you are into lib's. http://www.petesqbsite.com/downloads/libraries.shtml

Posted: Fri Jan 18, 2008 7:22 am
by Mentat
burger2227 wrote:What exactly are you erasing? Are you using CLS? CLS will cause flickering.

SCREEN 9 can use page flipping to stop flicker. Screen 12 cannot.

How does it look in FB? It might be better to use that.

Ted
They both are currently in FB, and work very well. The demo doesn't use CLS, but the game does. I was hoping to convert these two (but only part of the demo) to QB.

Posted: Sat Jan 19, 2008 1:50 pm
by Nemesis
You could try double buffering. Although in SCREEN 12
you'd need a large array. I'm not sure if there are works
around this. Sounds like something I might look into
when I get some time.

Cya,

Nemesis

Re: Besides WAIT &H8D3, what's another way to to reduce

Posted: Sat Jan 19, 2008 3:18 pm
by Mac
Mentat wrote:I'm revisiting QB, and I can't seem to find the stuff I need.
WAIT &H3DA, 8:WAIT &H3DA, 8,8

This waits one screen refresh and often reduces flicker.

Also, do not erase icon from position P1 and then compute P2 and then, finally, write in P2. Instead, do all computing before the decision to erase.

Code: Select all

OldX = X: OldY = Y
GOSUB ComputeMove
IF OldX <> X or OLDY <> Y THEN
   CIRCLE (OldX, OldY), R, 0
   CIRCLE (X, Y), R, 15
   WAIT &H3DA, 8:WAIT &H3DA, 8,8
END IF
See? Only erase/write/wait if absolutely necessary. As opposed to erasing right away and then discovering it wasn't needed. And the time from erase to write is as small as possible.

Mac