TimeBasedMovement vs FramesPerSecond (PBsnake as example)

Advanced game related topics
User avatar
IceSoft
Addict
Addict
Posts: 1699
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

TimeBasedMovement vs FramesPerSecond (PBsnake as example)

Post 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
Belive! C++ version of Puzzle of Mystralia
Bug Planet
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
User avatar
Hroudtwolf
Addict
Addict
Posts: 803
Joined: Sat Feb 12, 2005 3:35 am
Location: Germany(Hessen)
Contact:

Post 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
User avatar
IceSoft
Addict
Addict
Posts: 1699
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

Post 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.
Belive! C++ version of Puzzle of Mystralia
Bug Planet
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
Thalius
Enthusiast
Enthusiast
Posts: 711
Joined: Thu Jul 17, 2003 4:15 pm
Contact:

Post 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
"In 3D there is never enough Time to do Things right,
but there's always enough Time to make them *look* right."
"psssst! i steal signatures... don't tell anyone! ;)"
User avatar
IceSoft
Addict
Addict
Posts: 1699
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

Post 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.
Belive! C++ version of Puzzle of Mystralia
Bug Planet
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
Post Reply