Game Development Community

Getting fps count

by Robert Lohaus · in Torque 2D Beginner · 11/18/2013 (7:49 pm) · 4 replies

I don't want to use the default FPS banner provided in the sandbox framework, but I can't find anything on Google talking about getting the current FPS count. Please tell me its a simple bit of code ;)

#1
11/18/2013 (7:59 pm)
Looks like getFPS(), getMinFPS(), getMaxFPS(), and getFrameCount() are available in TorqueScript as seen in github.com/GarageGames/Torque2D/blob/development/engine/source/2d/scene/Scene_Sc...
#2
11/18/2013 (8:06 pm)
If it was a snake it would have bitten me!

I should have used Torsion to browse the various object methods from the start.
#3
11/18/2013 (9:14 pm)
Recent efforts were made by the Steering Committee to put every ConsoleMethod and ConsoleFunction in files ending with ..._Scriptbindings.h.

As Nathan pointed out, the Debug functions like getFPS(), getMaxFPS() and so on are found in \engine\source\2d\scene\Scene_ScriptBinding.h.

From there, it is quite easy to jump to the C++ functions and see exactly what's going on "under the hood".
#4
11/19/2013 (8:58 am)
I bookmarked it right away.