Archived

This topic is now archived and is closed to further replies.

QBasic - Slow Down

This topic is 5310 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

My friend has a bunch of stuff in QBasic but it runs too fast. Anyone know how to slow it down?
Rob Loach Current Project: Go Through Object-Oriented Programming in C++ by Robert Lafore "Do or do not. There is no try." - Yoda

Share this post


Link to post
Share on other sites
A klugey language demands klugey constructs.

FOR I = 1 TO 10000
NEXT I


How appropriate. You fight like a cow.

Share this post


Link to post
Share on other sites
you can use qb''s timer to slow the program down by a certain degree (it''s only 18 ticks per second though).

delay! = .1
t1! = TIMER
DO
t2! = TIMER
LOOP WHILE t2! - t1! < delay!

Is that code going to run? (haven''t done this in a while)

Anyway, that should delay the program for 1/10th of a second but you can only really go up to 1/18th of a second without using a better timer (search the web for a timing lib for qb). You won''t be able to use libs unless you have version 4.5 or above.

Share this post


Link to post
Share on other sites
quote:
Original post by Rob Loach
My friend has a bunch of stuff in QBasic but it runs too fast. Anyone know how to slow it down?


Hmmm... I have a suggestion: don''t use QBasic.

Share this post


Link to post
Share on other sites
quote:
Original post by mittens
quote:
Original post by Rob Loach
My friend has a bunch of stuff in QBasic but it runs too fast. Anyone know how to slow it down?


Hmmm... I have a suggestion: don't use QBasic.

Hmmm... I have a suggestion:


I made a Tanks clone in QBASIC.

EDIT: Hey! I can post piccies!
EDIT: Nested quotes too! I'm in troll heaven!

[edited by - ShoelessManiac on June 3, 2003 12:50:51 AM]

[edited by - ShoelessManiac on June 3, 2003 12:52:18 AM]

Share this post


Link to post
Share on other sites