[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
QbasicFAQ_RunDifferent
Why does my program run differently on other computers?
Back to QBasic FAQ Main Page.
Color: Not everyone has their screen contrast, warmth and brightness values set to the same settings.
Sound: Not everyone has a TRUE SoundBlaster compatible. And for PC Speaker tunes... not all PC Speakers are speakers, or of the same quality.
OS: Not everyone has the same operating system, if you use SHELL to access OS commands, make sure you use standard default commands, and then test them on a variety of systems.
Speed: This is one that often overlooked. So many times programmers neglect to think that different machines can perform the exact same calculations at different speeds. BASIC has always been processor dependent due to the nature of it's runtime interpreter. Obviously compiled code will run faster, but faster is not always better. In the case of user interaction with a program, and especially games, you will want the program to perform the allotted task at almost the exact same rate of speed on every machine. Doing so will require you to write code that is "processor independent". One simple way to do this is to use a "TIMER-loop":
This code makes the program wait exactly five seconds.
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
QbasicFAQ_RunDifferent
Why does my program run differently on other computers?
Back to QBasic FAQ Main Page.
Color: Not everyone has their screen contrast, warmth and brightness values set to the same settings.
Sound: Not everyone has a TRUE SoundBlaster compatible. And for PC Speaker tunes... not all PC Speakers are speakers, or of the same quality.
OS: Not everyone has the same operating system, if you use SHELL to access OS commands, make sure you use standard default commands, and then test them on a variety of systems.
Speed: This is one that often overlooked. So many times programmers neglect to think that different machines can perform the exact same calculations at different speeds. BASIC has always been processor dependent due to the nature of it's runtime interpreter. Obviously compiled code will run faster, but faster is not always better. In the case of user interaction with a program, and especially games, you will want the program to perform the allotted task at almost the exact same rate of speed on every machine. Doing so will require you to write code that is "processor independent". One simple way to do this is to use a "TIMER-loop":
starttime=TIMER DO LOOP WHILE starttime+5>TIMER
This code makes the program wait exactly five seconds.
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
