Page 1 of 1

TimeBasedMovement vs FramesPerSecond (PBsnake as example)

Posted: Fri Dec 07, 2007 11:51 am
by IceSoft
Here PBsnake in 2 variants:

TimeBased and with SetFrameRate(15) implemented.
What is your opinion?

PBsnakeTBM.exe = PBsnake TimeBasedMovement
PBsnakeFPS.exe = PBsnake FramesPerSecond

Download:
PBsnakeTBMvsFPS.zip

Posted: Fri Dec 07, 2007 12:07 pm
by Hroudtwolf
Hi,

I think the time based movement could be better if you would use a hires timer.
'Cause EllapsedMilliseconds is updating in 15/16 milliseconds-steps.

Best regards

Wolf

Posted: Fri Dec 07, 2007 12:24 pm
by IceSoft
Hroudtwolf wrote:Hi,
I think the time based movement could be better if you would use a hires timer.
'Cause EllapsedMilliseconds is updating in 15/16 milliseconds-steps.
Right! I will make a better example at home.
With this (new) example you will see why a TBM implementation gives you a smooth look an a game like PBsnake.

Posted: Fri Dec 07, 2007 4:44 pm
by Thalius
'Cause EllapsedMilliseconds is updating in 15/16 milliseconds-steps.
Sadly hehe... I stumbled across this oddity also ( under linux its 1ms ). Under win2k also delay(1) is more like 10 ms.

Thalius

Posted: Fri Dec 07, 2007 5:26 pm
by IceSoft
Thalius wrote:
'Cause EllapsedMilliseconds is updating in 15/16 milliseconds-steps.
Sadly hehe... I stumbled across this oddity also ( under linux its 1ms ). Under win2k also delay(1) is more like 10 ms.

Thalius
Thats bad! We need a solution which is working for all supported OS.
I want port PBsnake to all supported OS versions at a later time.