Discussion forum for the BasicX family of microcontroller chips.
|
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. |