Silent-Death
Unregistered
I'm sick of useing the crappyish Pause = TIMER stuff to slow my game down.
Can anyone explain to me how the WAIT Statement works (I read the QBasic Help but that kindof confused me).
Thanks
Posts: 90
Threads: 8
Joined: Aug 2003
Perhaps wait is not the solutions to your problem, anyway wait what does is await the change of a bits from a given port, the vertical retrace wait can be done with two waits.
Take a look at "on timer gosub", etc.
Posts: 3,616
Threads: 287
Joined: Jan 2003
Quote:I'm sick of useing the crappyish Pause = TIMER stuff to slow my game down.
Can anyone explain to me how the WAIT Statement works (I read the QBasic Help but that kindof confused me).
Thanks
For a nice set delay to the hundredths or thousandths of a second, the method you've been using works beautifully.
WAIT doesn't do delays - well, it sort of does. Xhantt explained.
Vertical Retrace, if that's what you're thinking of, reduces flicker and also adds a nice delay that locks you at about 60FPS.
Code:
WAIT &H3DA,8
WAIT &H3DA,8,8
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Silent-Death
Unregistered
Hmmm..... well ok.
The only thing is I think the Timer thing i'm doing only goes into the hunderiths...
Code:
Pause = TIMER
DO
LOOP UNTIL Pause + .01 = TIMER
So is that pretty much the best delay type thing I can get?
If so how do I make it so it won't screw up at midnight?
Posts: 3,616
Threads: 287
Joined: Jan 2003
Rellib has an excellent little delay function that goes up to milliseconds.
The midnight thing: just use the absolute value of the subtraction of TIMER, with the other method...
Code:
IF ABS(TIMER) - T! >= Delay! THEN
'Do the stuff that you only want done once every Delay! seconds
T!=TIMER
END IF
And btw! Haven't seen ya in a while, SD, how're ya?
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Silent-Death
Unregistered
Zack, doing pretty good... I have been somewhat active here... just not doing to much in qbasic. Actally I have been working on that tank game I posted a while ago (so far made it alot less flickery).
How have you been?