Displaying metrics (such as FPS) from the console
While building a game, it can be useful to see various performance statistics from Torque 3D. Examples include frames per second (FPS) and milliseconds per frame (mspf) counters, as well as the number of polygons rendered. In this recipe, we will learn how to display these performance statistics as a heads-up display by entering commands into the console.
Getting ready
For this recipe, we will be working with the console while a game is running. Start up your own game or launch the
FPS Tutorial
game that comes with Torque 3D, and load a level to run your character through.
How to do it...
In the following steps we will display various metrics on the screen:
Open the console using the tilde (~) key.
Enter the following at the bottom of the screen:
metrics("fps gfx");
A white box containing a number of FPS and GFX counters appears at the top of the screen. The following screenshot shows the FPS and GFX metrics displayed over the top of the FPS...