[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":

starttime=TIMER
DO
LOOP WHILE starttime+5>TIMER


This code makes the program wait exactly five seconds.

last edited (March 31, 2006) by casio-games.tk, Number of views: 2390, Current Rev: 5 (Diff)

[Edit this page]  [Page history]  [What links here]  [Discuss this topic]  [Printer Friendly]  

Members

Username:

Password:


Register
Forgot Password?




Programmers Heaven - for .NET, Java, C/C++ and WEB Developers!
© 1996-2008 Community Networks Ltd. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited. Violators of this policy may be subject to legal action. Please read Terms Of Use and Privacy Statement for more information. Development by Tore Nestenius at .NET Consultant - Synchron Data.