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 / CLS problem, or is it me?

Author
Message
Jedi Padawan
17
Years of Service
User Offline
Joined: 17th Jun 2009
Location: None of your business
Posted: 17th Mar 2010 01:33
Every time I run my program, things go smoothly. It simulates random movement w/ sprites (like balls). However, at the end, When I want to display some text I use tho following:


When It gets here, the screen simply flashes and for a moment I can see the text. Then it resumes the frozen screen of the running program.

Is there a different way to do it?

Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 17th Mar 2010 01:38


Windows 7 32-Bit Home Premium Intel Pentium Dual-Core @ 1.46Ghz 2038mb RAM
Kira Vakaan
17
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 17th Mar 2010 01:39 Edited at: 17th Mar 2010 01:40
I think your problem is that the backdrop turned on by the sprites constantly refreshes itself when syncing is controlled by the OS. Try adding a backdrop off command before cls. And if you don't want to completely clear the screen, you could just replace cls with set cursor 0,0.

Edit: Mad Nightmare makes a good point, in that you need to actually tell the program to wait, but I assumed you were going to replace that comment with actual code.
Jedi Padawan
17
Years of Service
User Offline
Joined: 17th Jun 2009
Location: None of your business
Posted: 17th Mar 2010 01:41
nope, no result

Jedi Padawan
17
Years of Service
User Offline
Joined: 17th Jun 2009
Location: None of your business
Posted: 17th Mar 2010 01:41
lemme try yours Kira

Jedi Padawan
17
Years of Service
User Offline
Joined: 17th Jun 2009
Location: None of your business
Posted: 17th Mar 2010 01:44
still no result

is "backdrop off" only for 3D or also for 2D?

Jedi Padawan
17
Years of Service
User Offline
Joined: 17th Jun 2009
Location: None of your business
Posted: 17th Mar 2010 01:45
here is that part of the code in its entirety:



BillR
23
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 17th Mar 2010 07:24 Edited at: 17th Mar 2010 07:27
There really are MANY ways to do this, here is one of them
Jedi Padawan
17
Years of Service
User Offline
Joined: 17th Jun 2009
Location: None of your business
Posted: 18th Mar 2010 01:18
thanks BillR

Maple Engine
16
Years of Service
User Offline
Joined: 26th Jan 2010
Location:
Posted: 18th Mar 2010 09:34
Couldn't you just use something like this:

Or would the text command not work after you clear the screen?

Login to post a reply

Server time is: 2026-07-26 21:12:14
Your offset time is: 2026-07-26 21:12:14