Re: Speaking of Speed...
Quote from Forum Archives on December 18, 1997, 12:00 pmPosted by: president <president@...>
I'm not sure about checking the speed of the host processor but using the FN
TICKCOUNT routine you can make sure your program doesn't run too fast.DIM OldCount&
DIM CurrentCount&do
OldCount& = FN TICKCOUNT
' your program in here.
do
CurrentCount& = FN TICKCOUNT
until CurrentCount& > OldCount&+5until programends
I think this should make sure that at least five ticks have past since your
program last looped. Of course you'll need to fix the bug that the counter is
reset at midnight, otherwise this will just freeze at midnight.P.S. Sorry if this code is wrong. I'm a bit tired and confused at the moment.
Terence Jordan wrote:
>
> Speaking of Speed, is there a way to do an automatic calculation on how
> fast the host processor is, and automatically adjust your "time-waster"
> loops accordingly? Ie, you'll notice that some games coded for a 25Mhz
> Quadra are pretty unplayable on a G3 because they are too fast.
>
> Dave, this one's for you!
>
> -- Terence Jordan (tatewake@usa.net)
> Inspired Software. inspired.netstreet.net/
> Macintosh, Dos, Windows, and BeOS software solutions.
> Phone: 407-728-7563
> ............................................
> . New: Renegade Space Ninja for Macintosh! .
> . Visit our page for more info. .
> ............................................
>
> --
> To unsubscribe, send ANY message to <futurebasic-unsubscribe@welovegod.org>--
____________________________________________________________________
Laurie Murphy president@foxchange.comFoxchange Productions foxchange.com
____________________________________________________________________
Posted by: president <president@...>
TICKCOUNT routine you can make sure your program doesn't run too fast.
DIM OldCount&
DIM CurrentCount&
do
OldCount& = FN TICKCOUNT
' your program in here.
do
CurrentCount& = FN TICKCOUNT
until CurrentCount& > OldCount&+5
until programends
I think this should make sure that at least five ticks have past since your
program last looped. Of course you'll need to fix the bug that the counter is
reset at midnight, otherwise this will just freeze at midnight.
P.S. Sorry if this code is wrong. I'm a bit tired and confused at the moment.
Terence Jordan wrote:
>
> Speaking of Speed, is there a way to do an automatic calculation on how
> fast the host processor is, and automatically adjust your "time-waster"
> loops accordingly? Ie, you'll notice that some games coded for a 25Mhz
> Quadra are pretty unplayable on a G3 because they are too fast.
>
> Dave, this one's for you!
>
> -- Terence Jordan (tatewake@usa.net)
> Inspired Software. inspired.netstreet.net/
> Macintosh, Dos, Windows, and BeOS software solutions.
> Phone: 407-728-7563
> ............................................
> . New: Renegade Space Ninja for Macintosh! .
> . Visit our page for more info. .
> ............................................
>
> --
> To unsubscribe, send ANY message to <futurebasic-unsubscribe@welovegod.org>
--
____________________________________________________________________
Laurie Murphy president@foxchange.com
Foxchange Productions foxchange.com
____________________________________________________________________