Image Flicker?
Author |
Message |
Felix
|
Posted: Sun May 21, 2006 3:05 pm Post subject: Image Flicker? |
|
|
I have this program that draws a face and moves it around the screen... HOWEVER, whenever it moves, it experiences some severe flickering and looks like junk...
What do I have to adjust to get it to not flicker? |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Cervantes
![](http://compsci.ca/v3/uploads/user_avatars/1023105758475ab2e040bde.jpg)
|
Posted: Sun May 21, 2006 3:12 pm Post subject: (No subject) |
|
|
You'll need to use double buffering. That means, set the "offscreenonly" option, like this:
code: |
View.Set ("offscreenonly")
|
This only needs to be done once, at the start of your program
Then, whenever you want your drawings to be flipped into the front buffer (shown all at once), do a
This will probably go inside your loop after all your drawings.
Check the Turing help file (press F10 in turing) to learn more. You can also search through [Turing Tutorials]. |
|
|
|
|
![](images/spacer.gif) |
Felix
|
Posted: Sun May 21, 2006 3:12 pm Post subject: (No subject) |
|
|
By the way, I've seen those View.Set ("offscreenonly") and View.Update ideas, and all they do is completely mess up the part of my program that works ![Confused Confused](http://compsci.ca/v3/images/smiles/icon_confused.gif) |
|
|
|
|
![](images/spacer.gif) |
Cervantes
![](http://compsci.ca/v3/uploads/user_avatars/1023105758475ab2e040bde.jpg)
|
Posted: Sun May 21, 2006 3:22 pm Post subject: (No subject) |
|
|
Then you're not using them properly. Post the code (with View.Update and offscreenonly). They're probably mispositioned.
That, or you're using an old version of Turing that doesn't support View.Update. (A version prior to v4, I think.) |
|
|
|
|
![](images/spacer.gif) |
Felix
|
Posted: Sun May 21, 2006 3:29 pm Post subject: (No subject) |
|
|
Oh... Nevermind, I just figured out what messed my prog up... View.Set ("offscreenonly") and View.Update worked fine... thanks Cervantes[/u] |
|
|
|
|
![](images/spacer.gif) |
Felix
|
Posted: Sun May 21, 2006 3:30 pm Post subject: (No subject) |
|
|
Yes, I mispositioned them my bad! |
|
|
|
|
![](images/spacer.gif) |
|
|