Timing/Framerate anomalies...

General FreeBASIC programming questions.
Dr_D
Posts: 2375
Joined: May 27, 2005 4:59
Contact:

Timing/Framerate anomalies...

Postby Dr_D » Mar 20, 2019 21:38

Since there has been a new FB release, I've been messing around with my old kart demo a bit. I'm noticing some odd timing stuff. I remember a while back we had issues with Timer... needed to use Double, etc... I've done that, but I'm still getting choppy/inconsistent frames. I was just kinda wondering if anyone has any bits of information, something you may have discovered to alleviate the problem? My PC is a bit dated, so that could be an issue as well. I'm just testing... it used to be so smooth. It's pretty choppy now. Thanks for any advice.
paul doe
Posts: 913
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: Timing/Framerate anomalies...

Postby paul doe » Mar 20, 2019 22:03

You may want to take a look at this (it was a real eye-opener for me):

The elusive frame timing

Depending on how you implemented your game loop, it can be a major pain in the rear. I noticed this too with the metaballs demo (which compares two different loop designs on a totally render-bound app).

Oddly enough, the laptop where I coded that demo ran it smooth as silk. On this craptop (with an Intel HD GPU), it stutters a lot (even when the demo is using purely software rendering), and when implementing the GL rendering backend for my entry on Lachie's compo, I also noticed that the display slows down (and that with a modest number of polys on screen), even though the framerates don't report any changes (!!). So, the issue may be caused either by stalling the GPU pipeline (which can be -somewhat- easily solved by batching the render calls), or because the GPU's fillrate is utter crap -most likely the case with my card. Unfortunately, this is something one can't do a damn thing about except, well, getting a better card =D

Other issues may be at play here. I also noticed that there are slight differences between fbc 1.05.0 and the 'unofficial' 1.06.0 (didn't tried the new, official release yet, so I can't comment on it).
Dr_D
Posts: 2375
Joined: May 27, 2005 4:59
Contact:

Re: Timing/Framerate anomalies...

Postby Dr_D » Mar 20, 2019 22:47

Yeah... It must be my card or priority setting that I missed or something. It makes me want to go back to DOS. lol
paul doe
Posts: 913
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: Timing/Framerate anomalies...

Postby paul doe » Mar 21, 2019 2:06

Dr_D wrote:... It makes me want to go back to DOS. lol

Nah, it's not that bad =D

Another interesting thing to consider: last night, my IP crapped out (again). I noticed because I was running some code and, suddenly, the frame rate more than doubled from one frame to the next (the main app loop was unbounded)...
Dr_D
Posts: 2375
Joined: May 27, 2005 4:59
Contact:

Re: Timing/Framerate anomalies...

Postby Dr_D » Mar 22, 2019 20:21

paul doe wrote:
Dr_D wrote:... It makes me want to go back to DOS. lol

Nah, it's not that bad =D

Another interesting thing to consider: last night, my IP crapped out (again). I noticed because I was running some code and, suddenly, the frame rate more than doubled from one frame to the next (the main app loop was unbounded)...



Hmm... weird.

Return to “General”

Who is online

Users browsing this forum: No registered users and 5 guests