App fps

Started by
2 comments, last by Solomon 21 years, 5 months ago
Hi, i´ve got a SMALL question. I´ve created my app (MSVC++6.0, DX8.1) and a frame counter returns something like 150 fps when i execute app (CTRL+F5) and about 90-100 fps when debugging (? F5). Why I´ve got these low fps values when all what app doing is computing fps, nothing else. I forum´s topics aroun i read obout 400, 1000 or more fps. What´s wrong! If anybody knows whers the problem, plz help. This is my function for calculating fps(I hope it´s right): void CTEngine::CalcFPS() { FLOAT fTime = DXUtil_Timer( TIMER_GETABSOLUTETIME ); ++m_dwFrames; // Update statistiky jednou za sekundu if( fTime - m_fLastTime > 1.0f ) { m_fFPS = m_dwFrames / (fTime - m_fLastTime); m_fLastTime = fTime; m_dwFrames = 0L; m_fMaxFps = (m_fMaxFps < m_fFPS) ? m_fFPS : m_fMaxFps; } } Thx with help Solomon
Advertisement
running your program under a debugger might slow it down because debugger must catch debug events, such as breakpoints, and therefore has to get its hands on the program. if you want to see how fast your app really is, make a release build with optimizations on and run that instead.

reasons for people getting 500+ fps:
*) they only render blank screens
*) they have better hardware, but still render small quantities of stuff
*) they have really good hardware
*) they render in small windows, such as 320x240
or a combination of the above.
Another determinant is your text output. The DrawText function is pretty slow, try outputting a bunch of text using this function and watch your FPS dip to hell. Try using the textured font functions for increased speed.
"Let Us Now Try Liberty"-- Frederick Bastiat
If you want to just calculate FPS, you could save the value of your FPS in a text file. Just redirect std::cout and that should give you a better estimate.

I don''t know what you are rendering on the screen, but here are my specs from my developing game. I think my hardware is lowspec enough to give you are rough estimate as to what you may be able to achieve.

All screens are at 640x480 32bits.
Card is a GeForce2MX400 64MB.
Using DirectX8.1.
410 : Nothing
390 : FPS Only
230 : Numerous textures(4 512x256, 2 256x256, 60+ 32x32)

This topic is closed to new replies.

Advertisement