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 / [SOLVED] Text flickers when displayed on screen

Author
Message
statichash
14
Years of Service
User Offline
Joined: 22nd Sep 2009
Location:
Posted: 6th Dec 2018 01:13
When I display text on the screen with;
CENTER TEXT 320, 240, "Once upon a time ..."

The text flickers.

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

Go to answer

Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 6th Dec 2018 02:45
Is likely an issue with with sync or cls, would need to see more of your code around your main loop
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
Derek Darkly
12
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 7th Dec 2018 23:58

I hope you didn't wait 9 years to ask this question.
Send your parents to noisy sprite demo hell... enter the D-Zone
Bored of the Rings
User Banned
Posted: 8th Dec 2018 05:56
Sometimes u nèed 2 use 2 syncs together.
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
Derek Darkly
12
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 12th Dec 2018 00:50

No one else found this post odd? LoL.. i mean... a 9 year member with such a question? It boggles me mind, mateys!

@DerekDarkly
Send your parents to noisy sprite demo hell... enter the D-Zone
Bored of the Rings
User Banned
Posted: 12th Dec 2018 09:31
yes very odd, maybe it was a buy DBPro now and then 9 years later .... errrr ok I'll start learning DBPro now type situation
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
gamerboots
15
Years of Service
User Offline
Joined: 8th Dec 2008
Location: USA
Posted: 13th Dec 2018 11:13
sometimes people come back to dbp years later ….. .... (and for those who did not know applications made with it seem to work ok on win 10)
anyway, questions are what this forum is for so let us begin:

@statichash
As Ortu said, post your code
gamerboots~
statichash
14
Years of Service
User Offline
Joined: 22nd Sep 2009
Location:
Posted: 19th Jul 2020 03:48
Sorry for the two year pause there. I have been battling throat cancer and just recently recovered well enough to continue exploring game programming.
Anyway, I still have the screen flicker problem with Dark Basic. Below is the code that does it.
Set window on
Set window layout 1,1,1
Set Window title "Hello World"
Set window position 100,200
Set window size 640,480
Print "Hello, World!"
wait key

If I take out all of the Set lines, the screen doesn't flicker at all. Why is it doing that when I use the Set commands on the window?
Do I need some other code here to prevent that from happening?
Thanks

Scorpyo
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 19th Jul 2020 07:20
This post has been marked by the post author as the answer.
Doesn't flicker at all on my side therefore I cannot tell the difference but try this:

Set window on
Set window layout 1,1,1
Set Window title "Hello World"
Set window position 100,200
Set window size 640,480
do
Print "Hello, World!"
wait key
sync
loop
statichash
14
Years of Service
User Offline
Joined: 22nd Sep 2009
Location:
Posted: 20th Jul 2020 17:17
This is how it was solved. Thanks to Bored of the Rings and Scorpyo for their input.

sync on
sync rate 30
sync
Set window on
Set window layout 1,1,1
Set window title "Hello World"
Set window position 100, 200
Set window size 640,480
Set text size 60

do
Print "Hello, World!"
sync
wait key

loop
Scorpyo
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 21st Jul 2020 07:08
Yeah right..my bad, sync was meant to be before "wait key"
Glad it helped.

Login to post a reply

Server time is: 2024-04-19 13:09:34
Your offset time is: 2024-04-19 13:09:34