Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / [LOCKED] [SOLVED] Flickering screen

Author
Message
fogunsakin
1
Years of Service
User Offline
Joined: 27th Aug 2023
Location: Lancashire, ENGLAND
Posted: 9th Oct 2023 17:06
This post has been marked by the post author as the answer.
Hi All,
Thank you for your help.
The issue that I am currently having is as follows: When I write a program such as:-
PRINT "HELLO"
WAIT KEY
END

The program runs fine.

However, when I write a program such as:-
TEXT 100, 100, "HELLO"
WAIT KEY
END

The screen continues to flicker at a very fast rate and it's difficult to read the output. This happens whenever I write any program that uses the TEXT method to position text on the screen.

I will greatly appreciate your help to resolve this issue. The setting being used is 640x480x32

Thank you.

The author of this post has marked a post as an answer.

Go to answer

Kevin Picone
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 10th Oct 2023 14:22

The flickering is most likely a by product of the automatic sync doing a double buffer. To stop this behavior you use a command called "SYNC OFF" (from memory) , this places the screen buffering control in your hands. Which means we render our graphics we want; then call SYNC to flip the invisible screen to the visible screen so the user can see it.. Search for Double buffering (either here or on google)

eg.

SYNC OFF

PRINT "Hello World"

SYNC
WAIT KEY


PlayBASIC To HTML5/WEB - Convert PlayBASIC To Machine Code

Login to post a reply

Server time is: 2024-11-17 22:14:16
Your offset time is: 2024-11-17 22:14:16