![]() |
|
Magical number.. |
type568
Member #8,381
March 2007
![]() |
The number is: 63. It is the frame rate, of a game. A lot of games. THE game had been working at around 100fps. (fps limit was set to 96..). than it dropped to 63. And LOCKED, on any computer checked: 2.4, 3.0 x2(2 different systems), Duo 6600. I didn't change anything related to the frame rate in the game, i had this frame rate in some other visual "games".. (A twisting pentagram with circling palette i.e.). Also, in a commercial game, Counter Strike (v1.6..) I had this issue(FPS locked at 63, and never went above this). In all cases, the computers are using Nvidia graphic cards. 6600-7900. I used this program to compare performance. In some cases i had above 400FPS. Not 63!!! I don't know what to do.. I don't want 63FPS. I want more. Thanks..
|
Tobias Dammers
Member #2,604
August 2002
![]() |
Quote: In some cases i had above 400FPS. Not 63!!!
No, you did not. No monitor money could buy can display such a high frame rate. 63fps is fine. --- |
ImLeftFooted
Member #3,935
October 2003
![]() |
Quote: I don't know what to do.. I don't want 63FPS. I want more. Less is more. |
Kris Asick
Member #1,424
July 2001
|
You probably added an Allegro command in your code that's vsyncing. Some of the palette commands do that, as will page flipping code. Triple buffering will cap your framerate at the monitor refresh. 63 is probably a miscalculation too. It's more likely 60, as that's the refresh rate of many LCD monitors. 400 is unreasonable with a non-hardware accelerated Allegro application. All you have to do is add a few more graphical commands and that number will drop like a stone. And as was already said, no monitor on the face of this planet can actually show a framerate of 400. (The highest my monitor goes is 120 at 640x480 or lower, and most LCD's can only hit 60, 75 or 85 at 640x480.) --- Kris Asick (Gemini) --- Kris Asick (Gemini) |
type568
Member #8,381
March 2007
![]() |
The monitor refresh is 75Hz. Of course, frame rate would drop if i add something more moving than a circle and few lines. I don't need 400 anyways, but i would like to have around 100. I did not add Vsync. In Counter-Strike Source, my frame rate is 80-300, depending on a lot of things, in fastest case above 300. I don't see see the refresh, which is above 75Hz, but higher FPS decreases delay- Faster program reaction time. The only slow thing here, is an almost full screen blit, at a 32bit depth. I am not worried about the performance of the game- it runs great, I just don't understand the phenomenon. About video card refresh limit: where can it be, I tried but didn't find it.(Nvidia driver, pretty new..) Also, i am sure i didn't touch it. The number is 63, I am sure. It calculates frame rate taking average of 10 frames.
|
Kris Asick
Member #1,424
July 2001
|
If you added any rest(1) statements, that could be it too. You could always try rest(0) instead. (Passing 0 to rest() is usually better. I used to do rest(1) instead to get around certain I/O issues, but I'm perhaps one of the only people to experience them and rest(1) actually degrades performance considerably on lower-end systems, so I'm not so concerned about that anymore.) To find the maximum refresh rate capable of your video card, try the box it came in. If your video card came with the computer, finding out the limits may be trickier. One method you can try is to go to your advanced display properties and look for a combo box dealing with refresh rate. That drop down should show all compatible refresh rates of your video card + monitor for your current resolution. In either case, if the framerate drop was immediately after compiling certain changes to your code, try commenting those changes out until you get your framerate back, then narrow down exactly what you're doing that's dropping the framerate. --- Kris Asick (Gemini) --- Kris Asick (Gemini) |
Tobias Dammers
Member #2,604
August 2002
![]() |
Again, the physical retrace rate is the absolute maximum, no matter what any FPS counter tells you. If your monitor is set to 75 Hz, that is the fastest refresh rate you can ever get. If the FPS counter gives you higher results, you will not be able to see or feel the difference - because there is none. It's just a higher number, and it probably means that the game could run at that refresh rate in theory, if the monitor were able to keep up. Quote: The number is 63, I am sure. It calculates frame rate taking average of 10 frames. Maybe post some code? How about this:
Which frame rate does this display for you? --- |
type568
Member #8,381
March 2007
![]() |
Quote: If the FPS counter gives you higher results, you will not be able to see or feel the difference I disagree. Higher FPS will decrease the program reaction time to my input. Also, as I see the true FPS, I can know the approximate FPS that a weaker computer would get. I will try this program, thanks Tobias. About the code: My project is attached.
ALL the function debuff()
FPS calculation for display:
The program is ~700 lines, too big to paste here. but is uploaded.. heavy because of images. Actually 1 image,which is the "about". Attachment stuck at uploading, i will try again. Quote: Which frame rate does this display for you?
The program doesn't get threw compilation. (VS6)
|
Tobias Dammers
Member #2,604
August 2002
![]() |
Quote: I disagree. Higher FPS will decrease the program reaction time to my input. Also, as I see the true FPS, I can know the approximate FPS that a weaker computer would get.
Not true. It is physically impossible to display more frames than your monitor can handle, therefor the minimum reaction time to user input is always 1 / retrace_rate. If your monitor is set to 75 Hz, you always wait at least 1 / 75 sec, which, by the way, is way below the human time slice (13.3 ms; we humans consider everything happening within ~20 ms to be simultaneous). What you really want to do is separate logic from drawing, and use the extra time for logic. For the profiling part, the FPS on a fast computer doesn't say much about that of a slower computer, because a number of factors go into the equation. If a 2000 MHz CPU can render 400 fps, that doesn't automatically mean that a 500 MHz CPU can do 100. The only way of knowing is to test. --- |
gnolam
Member #2,030
March 2002
![]() |
Quote: I disagree. Higher FPS will decrease the program reaction time to my input. No, since you shouldn't be mixing logic and drawing. -- |
type568
Member #8,381
March 2007
![]() |
Oh, thanks about the info. I couldn't compile your program. About FPS compare: If i checked it already, and 1 computer does 99 fps, other 33. I assume that improving the frame rate to 120 on the fast, would improve to about 40 on the slow.. Of course, there are a lot of factors except for CPU.. i.e. FSB of the CPU, as well as ram buses, and dual channel technology. I shouldn't but i did. I don't get the connection though. I'll try to separate that.
|
Tobias Dammers
Member #2,604
August 2002
![]() |
Quote: I couldn't compile your program.
I could. g++ proggy.cpp -lalleg -o proggy.exe -W -Wall What does it say? ...oh dear, forgot one tiny detail myself:
main() should of course return something. Quote: I assume that improving the frame rate to 120 on the fast, would improve to about 40 on the slow..
I'd say you shouldn't be assuming. --- |
type568
Member #8,381
March 2007
![]() |
Oh, all right. Thanks for the info again. Now, about the input.. If the input from the keyboard is read at the frequency of 75Hz. (monitor's refresh rate..) Than, for my program to react to my input, it needs: 1) Input. Now 3), is affected by the fps, if it's 400 will be faster than 75.. Am I wrong? Quote:
I could. g++ proggy.cpp -lalleg -o proggy.exe -W -Wall Do this where? :|
|
Tobias Dammers
Member #2,604
August 2002
![]() |
You are wrong. It doesn't work like this at all. Rather: while (!end_of_game) { read_input(); while (timer > 0) { logic(); --timer; } if (must_redraw) redraw(); else rest(1); }
So what happens when you press a key is this: There is no additional delay here; the only delay is in the drawing, and there is no way around that. You can't read and process input in mid-frame, and it would be silly to do it, since you can't change the frame anyway. Quote: Do this where? :|
Oh dear. --- |
type568
Member #8,381
March 2007
![]() |
window+r / cmd -know. Can't compile your program though. And, i understood. If the game loop is smart(the 1 you showed me, or the one i was referred to before..), works good. In my case it doesn't, as i have a fixed delay.(Well, it varies depending on the last frame performance time..) I just had an own idea, that generally does work.. And.. So what is it? rest(0) or rest(1)?
|
|