Game Development Community

How can I get frame rate?

by Architecture@Uni Melbourne · in Torque Game Engine · 11/25/2003 (6:31 pm) · 9 replies

Hi, everyone.

I'm doing a project on Torque. Have to say Torque is really a huge package for me. I'm trying hard to understand it.

Now, I need to display the frame rate and polygon count onto the GUI. Can anyone tell me how can I get those data and display them during run time?

Thanks so much!

#1
11/25/2003 (8:12 pm)
Int he console you can type "metrics(fps);" to get the FPS there are other commands you can pass to this function to get other information. Look in the metrics.cs file.
#2
11/26/2003 (5:23 pm)
Thanks! It works!

But how can I change the "metrics.cs" file? I want to have another way of display. But It seems Torque only recognizes the DSO file, any changes I made in the source code are ignored!

How can I modify the "metrics.cs" file?
#3
11/26/2003 (6:41 pm)
Delete the dso file, and if its not recompiling, then you made an error. So look int he console for a big red block, that will tell you whats wrong.
#4
11/27/2003 (5:52 am)
Another problem with "metrics.cs":

When I'm running the FPS game, TC, PC, T_T, etc. are always 0. But they are supposed to be the triangle count, primitive count, terrain triangle count, etc. Right? How can they be zero?!
#5
11/27/2003 (8:46 am)
I've not checked, but it could be that that information is only available in a debug build. Try running the debug build and see if the info is available there.

T.
#6
11/27/2003 (4:48 pm)
... I am running it in the debug mode....

call the metrics("video"); and got: TC: 0 PC: 0 T_T ....etc...

Seems not working.... :-(
#7
11/29/2003 (11:37 am)
Did you compile it as a debug build? There are several different "debug" semantics in Torque; the one we're talking about is where you compile it with TORQUE_DEBUG defined. If you're using Visual Studio, that means the output file should be called torqueDemo_DEBUG.exe
#8
11/29/2003 (4:26 pm)
...Thanks! But I think what I built up is actually "torqueDemo_DEBUG.exe". Everytime, I run it by typing c:/torque/example/> torqueDemo_DEBUG. Then on my GUI, I only got fps, mspf, but not TC, T_T, etc.

Might because I did some other things wrong?...:-(

Anyway, thanks!!
#9
11/30/2003 (1:08 pm)
Or maybe the values aren't being updated. Go find the code that changes them and see if it's being run. :)