Forums » Suggestions

Framerate Limiter cvar

Aug 14, 2010 slime73 link
I'm not sure how difficult this would be to add to the game, but it would be useful for people who get very high framerates in VO and have hardware which tends to get very hot.

vsync does limit the framerate to 60, but it's not the same as a true framerate limiter (Starcraft II and Team Fortress 2 have both of these options). Vsync can cause mouselag and other weirdness, whereas a framerate limiter would just cap FPS at a user-defined amount.

With my current hardware, I am forced to turn on vsync otherwise my GPU gets hot enough that it can sometimes force my computer to shutdown to cool itself off. It'd be nice to have something to limit how much extra (useless) work my GPU has to do. :)
Aug 15, 2010 Alloh link
+1
same here.
Aug 15, 2010 look... no hands link
yea, for me it just ends up heating the hell out of my room. framerates in empty sectors for me climb to near 1000, in b8, 400 abouts is normal, less if things get really crazy, stations drop it to about 150.
Aug 15, 2010 AlistairG link
LNH, do you know what you're talking about? 1000 FPS is absolutely crazy, I don't know any game to run at that. I don't even think monitors run that fast.
Aug 15, 2010 tarenty link
I get an average of 500 fps in empty sectors with a 3 year old computer. It's possible, AlistairG. Do _you_ know what you're talking about?
Aug 15, 2010 AlistairG link
I thought I did, now I'm starting to doubt my very existence. framerate = fps, right? I've never seen a game run higher than 120fps on my friend's gaming computer.

I just now downloaded fraps and was clocking in at 300 tops. Since this is a pretty old computer, I stand corrected. Still, I won't deny it, 1000 FPS sounds crazy. I've seen many high graphic games run smoothly at 60 fps, why empty sectors would need 1000 I don't know.
Aug 15, 2010 slime73 link
Your brain shouldn't notice the difference between 60fps and 1000fps, as long as there's no visual glitching or stuttering when the game is at 60fps. The GPU is just rendering all those extra frames for nothing.
Aug 16, 2010 look... no hands link
yea the display dosent even go near that high, the ones im using now are 80 hz max, which kinda sucks, but its good enough.

hopefully in the near future ill have one that does alot more, so i can get the 3d thing.
Aug 16, 2010 look... no hands link
oh the reason empty sectors run so high, is because there is so little to render, the background, and the hud don't eat much. and i run relitivly low settings, really just because i prefer it that way, the eye candy distracts me if i turn it way up.
Aug 16, 2010 Alloh link
Your CPU/GPU can render that much, but you display cant, neither your eyes and brain requires more than 24 frame/s (cinema), not even 30 frame/s (NTSC TV).

So, it is simple waste. and I bet this can help Android version too...
Aug 16, 2010 slime73 link
Ever watched a 60fps movie or show? It looks really weird and way too smooth (because we're so used to 24/30fps). You can definitely tell the difference between 24fps and 60fps.
Aug 16, 2010 igrok link
Perhaps you should stay away from the space-heater GPUs.

http://www.zdnet.com/blog/hardware/amd-warns-gamers-of-nvidia-fermi-risks/9287
Aug 16, 2010 incarnate link
That's funny, because my Radeon 5870 turns into a jet engine exhaust as soon as I run any kind of 3D game.

Anyway, yes, we'll look at the prospect of a framerate limiter. It might be a decent option to have, as well as default it to 120fps or so. It might also be useful for power savings on our mobile platforms.
Aug 17, 2010 incarnate link
We're curious about the frame limiter thing, and if anyone sees discussions on how other games implemented it (StarCraft II, etc), we'd love to hear about it.

We have some concerns over just using "sleep", as it isn't microsecond accurate in Windows (it is on other platforms), and there is some significant variability to when the Windows scheduler may return to the app when it flags itself for activity again, which might actually make for worse lag under bad situations. We can also write our own specialized sleep, in assembly. Some other platforms (like Tegra/Android) probably have their own very specific way of doing it, since they deal with the issue a lot for battery-saving reasons, we'll talk to Nvidia about that. We may be overthinking this, but some concerns came up anyway.

Anyway, we'll have to look into it a bit more.
Aug 17, 2010 slime73 link
The only things I know about the way other games did it is that in TF2, it's always on (default is 300fps max), and in Starcraft 2 there is (was?) either a bug or an undocumented limitation in the way they implemented it so that it only increments in steps of 50, ie if you set it to 60 it will cap at 50, if you set it to 125 it will cap at 100, etc.
At least that's how it was in Beta, I don't know if they've changed it since then.
Aug 17, 2010 igrok link
A lot of devs seem to get by ok with sleep(). I scanned through quite a few forums, and they all use vsync or sleep(). Of course, there's also a report that Windows sleep() can be off by 600ms!

I've always used sleep(), but I'm only a hobbyist game dev and only test on Linux...

I don't know your engine, but for most adding a sleep is only a few lines of code. Why not add it as a config option, not sleep by default, and wait for feedback?
Aug 19, 2010 vIsitor link
The sensible thing to do, if you can, would be to automatically limit the framerate to the refresh rate of the user's monitor. It doesn't matter how many frames per second the GPU can handle; they don't mean a thing if they can't be rendered.

Some games simply put the framerate cap in the configurations file; standard operating procedure for the more technically-savvy is to modify this at the earliest possible convenience (as the factory settings are so much nonsense). I'd recommend a more... user-friendly approach than that.
Aug 21, 2010 Alloh link
*** Implemented in VO 1.8.140 ***
Aug 26, 2010 look... no hands link
It seems to be working well for me atleast