Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: fix FPS showing bogus values during pause  (Read 1221 times)

Kogut

  • Bay Watcher
  • Next account: Bulwersator
    • View Profile
fix FPS showing bogus values during pause
« on: March 19, 2012, 01:04:01 pm »

Especially visible after setting uncapped FPS. It is a bit irritating as showed FPS is moving average, so it is necessary to wait around 20 seconds after disabling pause to see real speed of game.

I reported it as http://www.bay12games.com/dwarves/mantisbt/view.php?id=5671 but was closed as feature request.
Logged
The worst bug - 34.11 poll
Tired of going decades without goblin sieges? Try The Fortress Defense Mod
Kogut, the Bugfixes apostle of Bay12forum. Every posts he makes he preaches about the evil of Bugs.

nxcho

  • Bay Watcher
    • View Profile
Re: fix FPS showing bogus values during pause
« Reply #1 on: March 19, 2012, 01:30:25 pm »

+1
A normalized moving average would show a more "true" value.
Logged
Banana!

Elone

  • Bay Watcher
    • View Profile
Re: fix FPS showing bogus values during pause
« Reply #2 on: March 20, 2012, 05:39:39 am »

But when you uncap the FPS value, your CPU outputs as much FPS as possible. When you pause the game, CPU can output even more FPS because it's not having to calculate AI/terrain in realtime. You may not like it, but it's working just as one would expect, and there's nothing to be done about it whatsoever.

-1025
Logged
▼ It's all their fault. ▼

King Mir

  • Bay Watcher
    • View Profile
Re: fix FPS showing bogus values during pause
« Reply #3 on: March 20, 2012, 07:49:00 am »

This is easy enough to fix by resetting the FPS on PAUSE/UNPAUSE, or by keeping a separate FPS for the paused an unpaused data (so it would average in data from the last time the game was pause when unpaused).

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: fix FPS showing bogus values during pause
« Reply #4 on: March 20, 2012, 11:22:34 am »

Actually, yes there is a reason not to do it this way - the FPS being talked about is not the graphic FPS (which is a different measurement), it's the number of game-ticks being calculated per second... and when the game is paused, the game-ticks being calculated are zero.

The FPS meter is only useful as a measurement of how much the game is lagging while the game is running - showing bogus values because the game was paused completely destroys the entire point of having an FPS meter in the first place.

Further, there is something very simple to be done - just stop sampling FPS when the game is paused!  It's that simple!
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

Elone

  • Bay Watcher
    • View Profile
Re: fix FPS showing bogus values during pause
« Reply #5 on: March 20, 2012, 03:11:35 pm »

Further, there is something very simple to be done - just stop sampling FPS when the game is paused!  It's that simple!

You mean, keep the counter history in a stack, and just suspend pushing while paused? I thought that they want it to keep counting WHILE paused, which is a no-go. But your idea would have much more utility than currently, I like your way of thinking! =)

Spoiler (click to show/hide)

Wait, Kogut is the op?
« Last Edit: March 20, 2012, 03:13:22 pm by Elone »
Logged
▼ It's all their fault. ▼