Game Development Community

Game rendering dramatically dragged down

by Dane McGreevy · in Torque Game Engine · 05/21/2007 (5:26 pm) · 4 replies

Hi all,

I found a tricky phenomenon on the TGE 1.4.2 version that we currently use. When it was activated (I mean either the win32 console or the OpenGL canvas for the PlayGUI was on), the game was rendered fine (e.g. FPS reached up to 120). However, its rendering speed was noticeably reduced (FPS down to around 5 even less) when I deactivated it by clicking the mouse on anywhere else on the screen or pressed the "Start Menu" key on the keyboard. All in all, the game rendering got much irregularly broken when it lost the focus. The reason I have to leave Torque for some application else is that I need to activate that application and send messages to Torque.

Has anyone else noticed this issue? I would guess it's something to do with the thread stuff. Well, I can be wrong anyway. Any pointer would be appreciated!

#1
05/21/2007 (5:32 pm)
This is a feature which has been in the engine forever.

look in Platform::process() for a line like this:
// If we are in background or minimized, sleep for 100ms or until message is recieved
#2
05/21/2007 (5:59 pm)
Thanks heaps, Orion. I'll have a look then.
#3
05/23/2007 (6:59 pm)
IIRC, you can tweak this by setting different value to $pref::backgroundSleepTime variable.
#4
05/24/2007 (11:48 pm)
Thanks bank. This is what I wanted. I changed it to 10 then the grame speed went up. :)