OpenXcom Forum
Contributions => Programming => Topic started by: michal on October 30, 2010, 09:49:33 am
-
Hello,
This is patch which shows fps counter in upper left corner of the screen. You can enable / disable it with F12 key. It's disabled by default.
Patch was created from src directory.
Btw, last time i programmed in c/c++ couple of years ago. And even then i didn't code much in it, so this can be buggy ;)
Also, i'm not sure if it shows correct results.
My results (ubuntu linux, Intel(R) Pentium(R) Dual CPU T2370 @ 1.73GHz) at 640 x 400:
Main menu: 150 - 160
Geoscape (doing nothing): 110 - 120
Geoscape (rotating on min zoom): 60 - 90
Geoscape (rotating on max zoom): 50 - 70
Battlescape (doing nothing): 140 - 150
Battlescape (scrolling): 135 - 140
-
Nice, it works fine here.
There is also a function SDL_getFramerate, but I don't know if that can be used here, because it only works with a "frameratemanager"?
-
I've just tested how scaling affects fps. It's so slooow :( Using 320x200 resolution gives ~480 fps on geoscape.
-
yep, using resolution 320x200 almost 2000 fps and my CPU goes to 60% ... I think if you limit the frames to 30 fps, it would only take 0,9% CPU ? :p
-
Nice, it works fine here.
There is also a function SDL_getFramerate, but I don't know if that can be used here, because it only works with a "frameratemanager"?
SDL_getFramerate doesn't do what you'd expect, it's part of SDL_gfx's FPSmanager that lets you control and lock the game's framerate.
-
Added to SVN.
-
MUCH better than the emulated original's 10 fps (or at least it feels about that :P)