Limiting FPS
by Jeremiah Fulbright · in Torque Game Engine Advanced · 04/28/2009 (9:35 pm) · 4 replies
I saw information about this in the past, but can't seem to find it via search (not a fan of the search, but better than before).
In working thru some Atlas stuff it hit me that maybe limiting how fast the engine actually would try and render, etc.. would keep everything in better sync. I can't remember exactly where I needed to look or what needed to be done though
In working thru some Atlas stuff it hit me that maybe limiting how fast the engine actually would try and render, etc.. would keep everything in better sync. I can't remember exactly where I needed to look or what needed to be done though
#2
Vsync would be sufficient possibly, at least for testing cases
04/29/2009 (3:53 pm)
Haven't looked into the GFXFences settings, since its relatively new and wasn't what was mentioned before..Vsync would be sufficient possibly, at least for testing cases
#3
S32 sgBackgroundProcessSleepTime = 25;
S32 sgTimeManagerProcessInterval = 1;
They're in milliseconds - so in the background, you're limited to 40fps, and in the foreground 1000.
edit: Actually - you can adjust these in script also:
Con::addVariable("Pref::backgroundSleepTime", TypeS32, &sgBackgroundProcessSleepTime);
Con::addVariable("Pref::timeManagerProcessInterval", TypeS32, &sgTimeManagerProcessInterval);
04/29/2009 (4:11 pm)
In platform.cpp, you can adjust these to limit your frame rate:S32 sgBackgroundProcessSleepTime = 25;
S32 sgTimeManagerProcessInterval = 1;
They're in milliseconds - so in the background, you're limited to 40fps, and in the foreground 1000.
edit: Actually - you can adjust these in script also:
Con::addVariable("Pref::backgroundSleepTime", TypeS32, &sgBackgroundProcessSleepTime);
Con::addVariable("Pref::timeManagerProcessInterval", TypeS32, &sgTimeManagerProcessInterval);
#4
I'll experiment with them
04/29/2009 (4:15 pm)
Ah okay.. I had saw those, but they we're new so wasn't 100% sure on calculations or how they processed.I'll experiment with them
Torque Owner Stefan Lundmark