I wrote a program that draws a circle, paints it, then clears the screen and draws a -3 smaller circle, paints it, etc. It's doing what I want, but because of the CLS, it's VERY flickery. Is there a way to get the same result without the flicker? Thanks, Richard
One thing that you could do (that is less confusing than double buffering)...
Just make a black box around the circle that you want to delete:
Line (x,y)-(x2,y2),0,BF
then it's like clearing the screen but it only blots out what you don't want, reducing flicker. It's not perfect, and it's not as nice as double-buffering, but it works quite well for simple stuff.
put this before your loop repeats
Code:
Wait &H3da, 8
Wait &H3da, 8, 8
Thanks for the suggestions!
cha0s, might I suggest telling him what this piece of code does?
What it does is waits for your monitor to clear the current cycle and start afresh, so your program is drawing with the monitor on it's cycle than having it draw 1 frame over two monitor cycles, or two over 1 cycle...
Insert that into your loop right before you start drawing. Using this in combination with double buffering, ie: before the page flip, makes things a whole lot smoother.
Good luck.
search the forum gfor my name and that code snippet.
you can only say the same thing so many million times, so... you can do it now ^^
Quote:...come again? o.o
Topic title.