PlaneShift
Gameplay => Wish list => Topic started by: Xayton on July 21, 2005, 04:00:42 pm
-
I\'ve searched in the whis-list but I\'ve not found any thread on limiting fps (frame per second) and why it should be implemented in the game, so I posted this thread (I think it\'s in the right place).
The point is that I\'ve noticed that the game has no fps limiter and if the CS engine has not much to draw the fps may be very high (200 or more); this is not a good thing since it\'s only wasting cpu power. If your monitor RR (refresh rate) is, for example, 85Hz, any fps greater than that value is a waste of cpu because you can\'t actually see what has been drawn by the graphic engine.
If rr is 85hz the image on the monitor will be refreshed by the graphic card approximately every 11 milliseconds (1sec/85 = 0.011sec), but if in the same moment the fps is 200 the engine will redraw the scene every 5 milliseconds and about half computed images will be never shown (a big waste!).
I think this should be fixed since it\'s annoying to have the cpu getting very hot while the fps is 200 or more. Of course this is not the only thing that can be improved to save cpu time, another problem is that when the game is not the active window (in windows you can switch using ALT+TAB) the cpu is still completely active, at least when the game window it\'s not visible, the game should skip drawing.
I don\'t know how it\'s structured the game drawing loop (I\'ve not looked at the sources yet) but I think a simple check can handle the fps problem. The real problem may be getting current rr for the system (the CS has a function that does it?).
I don\'t know if this may be usefull, but I know an easy way to fix the high fps problem using directx graphic libraries: the structure D3DPRESENT_PARAMETERS used with the intialization function CreateDevice() has a member called \"PresentationInterval\" that can be set to avoid drawing too many times.
If any part of this post is not clear... I\'m here.
-
Look here: http://www.planeshift3d.com/wbboard/thread.php?threadid=17327&boardid=17 (http://www.planeshift3d.com/wbboard/thread.php?threadid=17327&boardid=17), especially at Androgos reply:
Originally posted by Androgos
If a hard FPS limit is a feature you want, create a Feature Request on the tracker and assign it to me.
there already is a limit on the login screen / char creation, so it shouldn\'t be any problem mkaing it apply ingame to
Cheers
The magic words were: fps cpu heat
-
I don\'t know if this may be usefull, but I know an easy way to fix the high fps problem using directx graphic libraries: the structure D3DPRESENT_PARAMETERS used with the intialization function CreateDevice() has a member called \"PresentationInterval\" that can be set to avoid drawing too many times.
If any part of this post is not clear... I\'m here.
Im pretty sure CS uses openGL, so you wouldnt be able to use a directX function.
Anyway, with so many people complaining about low fps, i dont think this is too much of a problem.. if your FPS is over 100 or so, then you must have a pretty damn good computer.. just compile the source code in the background or de-fragment your hard drive at the same time, and problem solved.
-
Again, as I triied to say in the post Wired_Crawler quoted above:
To be able to limit the maximum framerate is a basic function.
A huge number of people have marginal cooling, especially on their video cards, and long-term, this could damage their hardware.
I am also intensely curious to know what is sucking up so much memory and so many cpu cycles.
No other program I have seen, maxes my machine for more than a moment.
Except, of course, Burn-in Test.
-
P.S.
I have attempted to reach the sourceforge tracker without success, and have actually seen a post saying it had not been functional for a while.
Where is the dialog with the Devs located?
Is wish list all there is?
-
Androgos was referring to this page http://planeshift.oodlz.com/bugtracker/
here you can submit bugs or, as stated \"feature request\" and you can even assign it to Androgos, as he told.
I too agree that, limiting fps can be a workaround considering that the code isn\'t optimized at all; after all, who wants 333 fps? (the human eye works at 25fps or so, or i remember wrong?)
-
*whispers to nilrem*
\"the human eyes works at 30fps.. 30\"
-Easton
-
The fact that it uses 100% of the CPU 100% of the time is, I think, a somewhat related but seperate issue. Anyway, i have been told that they are working on this. As for the FPS issue, it sounds like Androgos will get to this, as long as someone does the bug-tracky thing.
-
Mmmm... I can\'t leave it alone. At least we all will learn something new.
Originally posted by Nilrem
(the human eye works at 25fps or so, or i remember wrong?)
Originally posted by Easton
*whispers to nilrem*
\"the human eyes works at 30fps.. 30\"
Nononono. Human eye is not a digital camera. It is analog \"device\". We do not see the world frame by frame, the picture is continuous. Read this: Human Eye Frames Per Second (http://amo.net/NT/02-21-01FPS.html), and this: Human Eye Frames Per Second 2 (http://amo.net/NT/05-24-01FPS.html), and also this: 100fps.com (http://100fps.com/how_many_frames_can_humans_see.htm)
Well, 333 fps is too much, but 30 fps and 60 fps do makes difference (I can see the difference, really).
(BTW: use search button in google too ;) . I pasted here first three results of searching for \"human eye fps\" words)
-
Well, 333 fps is too much, but 30 fps and 60 fps do makes difference (I can see the difference, really).
That is true, even if the human eye perceive 30fps as a continuos moving image, I\'ve tryed, you can easly notice the difference between 30 and 60 fps.
Anyway I still remain on the point that having fps greater than refresh rate is a waste (and of course is not noticeable).
-
Originally posted by Xayton
Of course this is not the only thing that can be improved to save cpu time, another problem is that when the game is not the active window (in windows you can switch using ALT+TAB) the cpu is still completely active, at least when the game window it\'s not visible, the game should skip drawing.
Are you sure it\'s doing this? If the canvas is not visible then rendering will not occur. Try minimizing the window and seeing if there\'s a difference, but it should stop as long as the entire window is covered.
-
Originally posted by aarobber
Originally posted by Xayton
Of course this is not the only thing that can be improved to save cpu time, another problem is that when the game is not the active window (in windows you can switch using ALT+TAB) the cpu is still completely active, at least when the game window it\'s not visible, the game should skip drawing.
Are you sure it\'s doing this? If the canvas is not visible then rendering will not occur. Try minimizing the window and seeing if there\'s a difference, but it should stop as long as the entire window is covered.
Unluckily now the server is down :( so I can try only the login screen (window version of ps), you\'re right, if the window is minimized it doesn\'t use any cpu, but if it\'s only hidden behind another window (and no part of it is visible) it still use 100% of cpu.
Anyway it\'s absurd that the login window, that doesn\'t have any advanced graphic, uses 100% of cpu (still the problem of limiting fps).
-
Originally posted by Wired_Crawler
Nononono. Human eye is not a digital camera. It is analog \"device\". We do not see the world frame by frame, the picture is continuous.
I\'ll for sure take a look at that, but, unfortunately we don\'t process information in an analogic way, we, for sure work with frames, internally.
For instance, we don\'t notice things that are faster than our processing capacity or we see them but in a wrong way.
This conversation is getting a little of topic, but, as the server is out, we all can have some laughs.
As an example for the first, i can say:
there\'s a bird (name in english unknown for me) that moves its wings really fast, it\'s a little bird, and, when you see it, you only notice its body. You don\'t see wings, but they are there; using a camera capturing lots of frames per second allows us to view that detail when the movie is played at low motion.
Another thing is the monitor, we don\'t see it blink, but, again, use a camera and play the tape, you\'ll see how the image of the monitor refreshes.
As an example of the second, our \"eyes lying to us\", that the sentence says, i\'ll say the wheels. Yes, the wheels of the cars, given a certain speed, we can see how actually those wheels seem to twist backwards, but the car advances. The explanation comes again with the fact that we, indeed, interpret the sorrounding world with discrete variables, not analogical ones.
If we capture images every 30ms, then imagine the wheel makes a complete turn in 30ms, we won\'t see the wheel move!
Now let\'s imagine that wheel in 4 steps, guided by a known mark. The first one is label at the top, second at the right, 3d at the bottom, and 4 at the left.
Let\'s say that our capturing speed (30ms) is equal to 3/4 of the weel speed, so the wheel makes a circle every 40 ms. First capture, label is up. Second one, the wheel has covered 3/4 of the way, so we capture left. 3rd capture the wheel has covered 3/4 more so we capture down... etc. We see the wheel going backwards.
So, to sum up, i don\'t know if it\'s right at the eyes, but, what is for sure, is that at a certain step, we work with discrete signals and not continuous.
Sorry for that long post.
Edit: Used bottom two times at the wheel :P
-
the bird is called a humming bird.
I also did take a video of my comp screen once with a digital camera. it is wierd how it looks....
-
Yes aarobber,
the windows client maxes the CPU, and the Vid card, and uses almost a gig of ram if running, no matter what. No variations for load, being minimised or context, and not an interaction with any other program.
This is more than a lack of optimization, and you can forget the usual suspects, too. The network load is very low, and the hard drives aren\'t thrashing, either.
WinXP SP2 32bit, on AMD64, dual channel PC500, raid.
Thank you for responding.
The Dark Lady
Verrliit
-
Off-topic
@Nilrem
Sorry, You are totally wrong. Why ? Because You write about watching TV/monitor picture, not the reality, or the reality lightened by strobe light. Please, first read the articles, which I mentioned.
1. Hummingbirds (wikipedia link (http://en.wikipedia.org/wiki/Hummingbird)) - You can\'t see their wings, because You can\'t see single frames. Retina cells do not send the whole image to the brain simultaneosly at the same moment, so the image is blurred.
2. The monitor - hehe, don\'t You really see the difference, when the refresh rate is 60Hz and 85Hz ? I do. At 60Hz screen blinks. At 75 Hz blinking is still noticeable. Even at 85 Hz You can see flicker when looking at the screen from a distance.
3. Wheels - hehe, try to observe wheels in natural, sun light. I guarantee, You will not see this effect, no matter, how hard You will try. You can only see it on tv/monitor screen or when using strobe light. It is NOT the eye/brain, which slices the reality to frames.
Back to the topic.
Originally posted by Xayton
Anyway it\'s absurd that the login window, that doesn\'t have any advanced graphic, uses 100% of cpu (still the problem of limiting fps).
Agreed. I haven\'t noticed it until now, it is really crazy (I use Linux). I think it is a bug, not necessarily related to high fps rate. After turning on the driver option \"sync to vblank\" (I get constant 85-90 fps) the cpu usage is still 100% all the time, no matter, how the rendered scene is complicated. It should be posted to bugtracker, I think. It may be CS bug though.Originally posted by aarobber
If the canvas is not visible then rendering will not occur.
True. When the planeshift window is completely obscured by other windows, cpu usage drops to 0% (I use Linux)
-
Originally posted by Wired_Crawler
Off-topic
3. Wheels - hehe, try to observe wheels in natural, sun light. I guarantee, You will not see this effect, no matter, how hard You will try. You can only see it on tv/monitor screen or when using strobe light. It is NOT the eye/brain, which slices the reality to frames.
Aaaghhhhh this is a war!!! ^_^
Agree with you in your 2 reasons given above, it\'s true a camera is used, so you can say i used wrong examples.
But, in the third case, come on! Just look at the wheels of the cars when you\'re in a highway, you\'ll see that; at some moments it will seem to you that the wheel turns backwards.
Anyway, this discussion is pretty complex, because it reffers to how the brain interacts, and that, for sure, it\'s still pretty unknown.
After all, we can all share our thoughts, but, mine is, that the brain can\'t be working \"in real time\" with the images that the eyes are sending it; hey, that\'s a lot of data processing. We can adventure: you say the eye sends data continuously to the brain (because eye, as you say, is analogic) then perhaps the brain, every given amount of time, takes all the images from the \"buffer\" and compones the image as a ponderation of the ones in the buffer; but then it\'s only that image what you see. I keep my theory.
I\'m using a tft monitor, and i changed to 60Hz, i honestly don\'t see the screen blink. I\'m under 75Hz normally and the screen doesn\'t blink to me.
But, again, it\'s a too specialliced conversation; I\'m not the right man. :P
But we\'ve been mixing some concepts, one is the blinking thing, and the other is the feeling of smoothness.
Some of the links given, threat the human eye as the top of the top, well, we\'ve to be proud of what we have, but, for sure, we don\'t distinguish ourselves because of our eye capability, but for our brain; yes, although some discussions might make think the countrary :D
There are lots of things we can\'t see, but we know that exist (i think it\'s called infrared and ultraviolet, so we only have a piece of visible spectrum)
That reminds me of sound, it\'s said that we can hear from 20Hz-20KHz, in fact that\'s what CD uses, it records the information at 40KHz (well, it\'s a number beyond that to make it hard to copy) and we really enjoy the experience of a CD, at least, I don\'t hear anything missing. Of course there are the ones that buy DVD-Audios, and expensive speakers that claim to go far beyond, but, honestly noone hears a tone at 30KHz. Perhaps not even at 20KHz ;)
Again, the topic is very interesting imo, but still too complex, at least, for me, as to claim for a big truth.
Anyway, there\'s a sentence you said, and yes, this is almost looking too at the word you said, but, well i feel I\'ve too (*evil face*) \"Retina cells don\'t send the whole image at the brain simultaneously at the same moment\"
Well, in that sentence there\'s implied the meaning of discrete=digital, if they don\'t send it at the same time, that means that there are fractions of time, where some of them are inactive, that is, not capturing, so then, it destroys the analogic term.
But then, back to the topic, now the server is running again :P see you in game, it seems noone\'s really interested in this ;)
TOPIC:
Verrliit, you can submit that petition to the bugtracker whenever you want, after all, Androgos seemed to want that petition handled by himself.
-
Originally posted by Nilrem
Originally posted by Wired_Crawler
Off-topic
3. Wheels - hehe, try to observe wheels in natural, sun light. I guarantee, You will not see this effect, no matter, how hard You will try. You can only see it on tv/monitor screen or when using strobe light. It is NOT the eye/brain, which slices the reality to frames.
Aaaghhhhh this is a war!!! ^_^
No, it is not!! It is discussion (very interesting topic for Hydlaa Plaza imo). To make some things clear: the scientists do not know ALL about eyes and seeing, so the statements I make are based only on most reliable knowledge atm.Agree with you in your 2 reasons given above, it\'s true a camera is used, so you can say i used wrong examples.
But, in the third case, come on! Just look at the wheels of the cars when you\'re in a highway, you\'ll see that; at some moments it will seem to you that the wheel turns backwards.
Belive me, I tried it many times, as a child, and later, no luck. Well, it is possible, if a highway is lit by artificial light (those big lanterns). Or if the car has a neon lamp under the floor :) There are other explanations. The eye ball makes very small, quick moves all the time. If the eye moves in the direction in which the wheel rotates, you can have an impression, that it stops for a short moment. Also, those pretty rims can reflect sunlight and produce some kind of strobe effect, when the angle, at which light reflects, changes (for example you drive faster or slower then other car).Anyway, this discussion is pretty complex, because it reffers to how the brain interacts, and that, for sure, it\'s still pretty unknown.
Yes, that\'s true. Some eye-specialists say, that nobody knows, how the world looks like, and that every person sees the world in different way.After all, we can all share our thoughts, but, mine is, that the brain can\'t be working \"in real time\" with the images that the eyes are sending it; hey, that\'s a lot of data processing.
Of course! The speed of chemical reactions is limited, but...We can adventure: you say the eye sends data continuously to the brain (because eye, as you say, is analogic) then perhaps the brain, every given amount of time, takes all the images from the \"buffer\" and compones the image as a ponderation of the ones in the buffer; but then it\'s only that image what you see. I keep my theory.
...no. There is no clock, like in computers, which forces the brain to take snapshot of the image.I\'m using a tft monitor, and i changed to 60Hz, i honestly don\'t see the screen blink. I\'m under 75Hz normally and the screen doesn\'t blink to me.
Argh. I was writing about CRT monitors. LCD displays work differently.But, again, it\'s a too specialliced conversation; I\'m not the right man. :P
Well, You have opportunity to wider Your knowledge and beat me on this field :))That reminds me of sound, it\'s said that we can hear from 20Hz-20KHz, in fact that\'s what CD uses, it records the information at 40KHz ...
Actually, it is 48kHz and it is sampling rate, not the maximum frequency of the sound. It means, 48000 sound samples are taken every second. You need at least 2 samples to hear sound (because we hear changes in the air preasure) so the maximum sound frequency is about 20kHz.Anyway, there\'s a sentence you said, and yes, this is almost looking too at the word you said, but, well i feel I\'ve too (*evil face*) \"Retina cells don\'t send the whole image at the brain simultaneously at the same moment\"
Well, in that sentence there\'s implied the meaning of discrete=digital, if they don\'t send it at the same time, that means that there are fractions of time, where some of them are inactive, that is, not capturing, so then, it destroys the analogic term.
Now we talk about single cells. Well, a single cell can not work continuosly, because it works on chemical reactions basis. It needs to \"regenerate\" after sending signal to the brain. But the eye as a whole - it hasn\'t defined active/inactive periods (well, maybe blinks of eyelids).But then, back to the topic, now the server is running again :P see you in game, it seems noone\'s really interested in this ;)
Oh, they are, I\'m sure. They simply don\'t know, what to write... ;) See you :)
Sorry, no on-topic part this time. Beat me.
EDIT: probably i did not understand You correctly in the part about sound. Let\'s leave it, and let my reply be simply an information for readers.