Re: Timer() loses time

Started by Frank Manning May 19, 2004
From: Neil Jepsen <>

> [...]as soon as I realised that timer was not losing
> time, my "game_time" was incorrect.. I've repeated
> the offending code below, and the fix. [...]
>
> if (timer>=p) then
> p = timer + 1.0
> game_time=game_time - 1 ' bump clock each second
> end if

Yes, the good ole floating point roundoff error.

BTW this is why BasicX allows only discrete counters in
for-loops.

-- Frank Manning
-- NetMedia, Inc.