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.

Newcomers DBPro Corner / Major Newb Question About Sync Commands

Author
Message
Rwilson
21
Years of Service
User Offline
Joined: 19th May 2003
Location: United States
Posted: 1st Sep 2003 04:35
I'm proboly going to insult myself by asking this, but how exactly does one use the sync commands, including Sync On and Sync Rate. Every time I've used them with my (Currently) text only game, they turn the screen pure black, so I'd stopped using them. However, I have a feeling that using sync commands would both be easier and more efficient than using the CLS commands I'm using now. Any help Appreciated.
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 1st Sep 2003 04:44
You have to manually SYNC the screen to reflect text changes
an example:

sync on
sync rate 100
backdrop off

intLoop as integer

For intloop=0 to 100
set cursor 0,0
print str$(intloop)
sync
wait 1000
Next intloop

the above code will print the numbers from 1-100 at position 0,0 with a 1 second delay between numbers. the Sync statement after the print statement tells the screen to refresh.

-RUST-
Rwilson
21
Years of Service
User Offline
Joined: 19th May 2003
Location: United States
Posted: 1st Sep 2003 04:51
That didn't work to well when I ran it, CattleRustler. While the numbers did print, they were all blurred together. Very odd indeed. Defintely agravating. Any suggestions?
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 1st Sep 2003 05:52 Edited at: 1st Sep 2003 05:57
for some reason the original code didn't work here either (was all mashed together)

very strange. I am sure I am just an idiot but this makes no sense as I use code like this all the time to debug development by printing variable data to the screen, and it always works fine.

I am sure I am over tired and being stupid
ask around
(for now use sync off (default) it will update the screen for you)

-RUST-
Rwilson
21
Years of Service
User Offline
Joined: 19th May 2003
Location: United States
Posted: 1st Sep 2003 06:01
No worries! I do all sort of stupid things when I'm tired, like stay up even later ! Yeah, I'll make a post over in the DPPro discusions area and see what they say. In the end, I'll figuare out this sync stuff, even if it kills me!
GOD
21
Years of Service
User Offline
Joined: 23rd Apr 2003
Location: right there
Posted: 2nd Sep 2003 06:13
i ahve the answer. you have to clear the old number before you put the new 1 up

sync on
sync rate 100
backdrop off

intLoop as integer

For intloop=0 to 100
set cursor 0,0
cls
print str$(intloop)
sync
wait 1000
Next intloop

that should work, but you still have to use cls

Login to post a reply

Server time is: 2024-09-20 21:32:49
Your offset time is: 2024-09-20 21:32:49