Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Dennis

Horrible Framerate Problem

This topic is 6939 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

My "game" is way too slow. Even when I draw nothing, I get a framerate of 83. Any ideas anyone?

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Remember that games only flip between pages on a vertical retrace on the monitor. So if your monitor is refreshing at 85Mhz then that absolute maximum frame rate is going to be 85 fps.

Why not use the QueryPerformanceCounter to find the time it takes you to perform all the processing before the flip and calculate how many pages you could process per second. Then you can compare this values between changes.

Share this post


Link to post
Share on other sites
What ? 84 frame is EXCELLENT! This is very fast! Why is it too slow ? You''re talking about 83 frames per second aren''t you ?

Anyway, what do you use ? C++ ? VB ? OpenGL ? DX ?



Prosper / LOADED corporation

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
If 84 fps is excellent, then what about the game I''m working on? It is only halfway done, but the framerate is around 300! Since I use blitting instead of flipping, it is possible to draw surfaces faster than the monitor can display them.

The question is if this is a good thing or not?

Share this post


Link to post
Share on other sites
Anynomous Poster is right, it depends on the monitor''s refresh rate. For instance, running my game at work (oops, hehe) I get a frame rate of 85 *tops* on a PII 500MHz machine with 128 megs of ram. At home, on my P233 with 64 megs of ram I get a framerate of 100.

Why? Because my monitor at work can only go up to 85 MHz. My monitor at home goes up to 180MHz or somesuch (I know, i should have spent some money on the processor =p)

Anyways, your monitor is constantly drawing. It starts the gun and moves down the screen. Once it gets to the bottom, it moves back to the top and restarts. During that move is when the IDirectDraw->Flip() takes place.

What is, in effect, happening is that you say Flip! and it tries... then tries... then tries... then tries until the monitor gun is moving back to the top. IIRC, DirectDraw/3d put the flip() command in a queue (on the card if it can) and then returns. Then it tries and tries until it can flip.

It might not be exactly what happens, but it''s at least a start... If anyone could correct me (if I''m wrong) I''d be greatly appreciative!

random

---
Wait, you mean I have to actually... THINK?!

Share this post


Link to post
Share on other sites
Of course you can do MUCH MORE than 84 fps if you don''t flip! But you must flip if you want something cool and smooth.

However, avoiding flip can allow to test your engine speed.



Prosper / LOADED corporation

Share this post


Link to post
Share on other sites
Wow, your monitors must be the best in the world...well i mean 180MHZ
My KFC (Not the best in the world) can do 75Hz at 1024*768

//Metus

Share this post


Link to post
Share on other sites
You guys are crazy about being so concerned about this. The human eye can''t tell the difference when you are getting that high! It is great that you are getting more performance than you need, but why not add some things to your game to slow the frame rate down so you have some more real cool effects and the eye still wont be able to tell the difference.

If you can''t win, make sure the one that beats you breaks the record!

Share this post


Link to post
Share on other sites
Thaynx and InFerNo are correct. I think I heard once that the "average" adult sees at ~30fps, children see at ~45fps, and older people see at ~20fps. That would be the majority of people. I''d have to agree that as long as your framerate is between 30 and 60 you''re perfectly fine. I''m realistically shooting for 45 (but hoping for 60).

Then again, I have a *Long* way to go before I have to worry about framerate... *shrug*

random

---
Wait, you mean I have to actually... THINK?!

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!