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 Discussion / why is my text blinking

Author
Message
steve c
21
Years of Service
User Offline
Joined: 30th Jan 2004
Location: united kingdom
Posted: 25th Apr 2004 21:00 Edited at: 25th Apr 2004 21:00
well can anyone help here is my code it is in a 3d world really that is just part of my code

i used to be indecisive but now ime not so sure
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 25th Apr 2004 21:03 Edited at: 25th Apr 2004 23:57
Haven't used DB for a while, but my best guess is that you don't have

sync rate 0
sync on

at the top of your code.

"To do is to be" - Descartes
"To be is to do" - Voltaire
"Do be do be do" - Frank Sinatra
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 25th Apr 2004 23:52
umm!, if thats all you have then I am amazed it runs at all, where on earth did you get clips#### and ammo### from, they aren`t even legal, you don`t even need floats to display integers, and you are displaying the same thing regardless of the value of gun, here is more like what it should look like for the style you used...

dim Ammo(3)
dim Clip(3)
Ammo(1)=200
Ammo(2)=100
Ammo(3)=50
Clip(1)=4
Clip(2)=8
Clip(3)=2
sync on
sync rate 0
Gun=1
do
Ammoval=Ammo(Gun)
Clipval=Clip(Gun)
cls
center text 35,375,str$(Ammoval)
center text 35,360,str$(Clipval)
if upkey() and Gun<3 then inc gun:wait 300
if downkey() and Gun>1 then dec Gun:wait 300
sync
loop

this is just one way of doing it, and not the best or the fastest, you will find there are always several ways of doing things in programming, IMO the best way is one that works and that you understand, not just something you cut`n`paste and then fumble around with trying to get it to work, I hope thats some help, cheers

Mentor.

PC1: P4 hyperthreading 3ghz, 1gig mem, 2x160gig hd`s, ATI radeon 9800 pro gfx, 6 way surround sound, PC2: AMD 1.2ghz, 512mb ram, FX5200 ultra gfx, stereo 16 bit soundblaster, ups.
steve c
21
Years of Service
User Offline
Joined: 30th Jan 2004
Location: united kingdom
Posted: 26th Apr 2004 20:24 Edited at: 26th Apr 2004 20:26
yea it aint very good is it but it works so its fine whith me anyhoow i cant put sync rate 0 at the top of my code because it makes everything go at ultra speed all the sounds and movement is realy fast

i used to be indecisive but now ime not so sure
MrNick
21
Years of Service
User Offline
Joined: 23rd Feb 2004
Location:
Posted: 26th Apr 2004 20:47
your text is blinking cause you are'nt using sync. use sync, sync rate (#) and sync on and every thing should be fine:
ie:


Make games!
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 26th Apr 2004 21:25
change sync rate 0 to sync rate 40 then!!, you NEED sync, sync is your friend

Mentor.

PC1: P4 hyperthreading 3ghz, 1gig mem, 2x160gig hd`s, ATI radeon 9800 pro gfx, 6 way surround sound, PC2: AMD 1.2ghz, 512mb ram, FX5200 ultra gfx, stereo 16 bit soundblaster, ups.
steve c
21
Years of Service
User Offline
Joined: 30th Jan 2004
Location: united kingdom
Posted: 27th Apr 2004 20:48
i have got sync that was just part of my code heres all of it now can u tell me how to stop it blinking

i used to be indecisive but now ime not so sure
Peter H
21
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 28th Apr 2004 01:15
well for one you still have stuff like "clips#####"


Formerly known as "DarkWing Duck"
steve c
21
Years of Service
User Offline
Joined: 30th Jan 2004
Location: united kingdom
Posted: 28th Apr 2004 21:45
actually its clips### but whats that got to do whith it

i used to be indecisive but now ime not so sure
steve c
21
Years of Service
User Offline
Joined: 30th Jan 2004
Location: united kingdom
Posted: 1st May 2004 00:46
pls does anyone know

i used to be indecisive but now ime not so sure

Login to post a reply

Server time is: 2025-05-23 11:14:12
Your offset time is: 2025-05-23 11:14:12