Controlling framerate when the window is unfocused

Torque exposes a configuration variable, $Platform::backgroundSleepTime, which can be used to control the game's update rate when it is not the focused window. By default it is set to 200ms, which means you'll get about 5 FPS when the window is in the background. By setting it to 0, you can force your game to run at full speed when the window is in the background. This is helpful for testing multiplayer locally with two instances of a game!

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License