FPS normally 30, but sometimes 10?

I have my monkey running on my windows and normally all my tests go at FPS = 30, but sometimes, after a hard-day working for my computer, I find that suddenly FPS = 10 or less, not 30 anymore, and then the only way to go back to FPS = 30 is by re-initiating my lovely windows-managed computer.



I tend to think it has to be with some kind of windows issue, but that would also happen to my Java3D developments and that's not true, only the monkey goes down in performance… maybe, I think, it has to be with GL and its issues with the monkey getting in bad performance after a long day working? I hope not, because I need my monkey production to be working 24/7 and without distortions in performance soon…



Any idea why is this happening?

Maybe other apps are eating up your memory/resources.  When I didn't have enough RAM in my computer I would have to reboot before I could do anything else, after exiting a memory intensive game like World of Warcraft.  (WoW ran fine while it was on, but once it was closed it was almost as if it didn't clean up all the resources it was using immediately, and rebooting was the only way to fix it)

Hmm… I did check my memory on win and seems to be ok, same as before. And I have a nice 2GB memory in my laptop, which always seems to be stable and enough to run the monkey as many times as required. So, I think about the monkey's GL win native interface libraries… may its behaviour be to decrease performance when running for a long time?



What do you think?

I even think 30FPS is way too low for current systems. Are you sure your video drivers are updated? Can you tell us your hardware and software specs?

I even think 30FPS is way too low for current systems.


Then what's the "normal" frame-rate you get? 60 FPS?

Is there any way to set a target frame-rate to StandardGame?

Are you sure your video drivers are updated? Can you tell us your hardware and software specs?


My laptop is only one-&-half years old. The hardware is: laptop -> Asus 2GB RAM, Centrino Duo 1.6GHz / graphics card -> nVidia GeForceGo 7300 256MB 

Most of the examples run on my computer in hundreds of FPS and I do not even have a decent video-card… mediocre shader support and acceleration I think.

eg. The HelloModelLoading in the tutorial section of jME test package runs at around 500 FPS. And my computer is way too slow for a complex program that renders decent stuff that has shaders applied. So at some point I will have to get a new PC just to continue working on my project.



Anyways my specs are:

Intel Core Duo T2400 1.83GHz

2GB 533MHz DDR2 RAM

256 MB NVIDIA Quadro NVS 110M with TurboCache (More suitable for 3D CAD graphics design applications than gaming, designed for rendering. Said to roughly = Go7300)



If you really get that low FPS, perhaps you have a virus?

MY only guess would be a faulty driver that just eats up a lot of resources while running and does not free them appropriately.

eg. The HelloModelLoading in the tutorial section of jME test package runs at around 500 FPS.


For me  too, I did try it and get arround 500 to 1000 FPS... so my driver is not the problem, I guess, but my StandardGame-extension implementation is consuming much, then... ?

My game statistics on screen (DebugGameState) are: FPS: 30 - Counts: Mesh(101) Vert(8466) Tri(7103)
And the sample HelloModelLoading statistics are when Maggie face fully on-screen: FPS 760 - Counts: Mesh(5) Vert(681) Tri(1240)

May this difference in 3D on-memory load between my game and the sample HelloModelLoading be the reason why FPS is so small in the first, and so high in the second?

Is there any way to set a target frame-rate in StandardGame, asuming not always could be kept constant?

PS In my game I also have JMEDesktop load...
PS In my game I also have JMEDesktop load...

Ahhhh... There's your problem probably. There are some issues with your JMEDesktop stuff I guess.

Question 1: The way you can lock a framerate is to syncronize to the monitor refresh rate. You do this in the initialization, by choosing vertical sync: true.

Question 2: I thinks there's some major flaw in your JMEDestok stuff anyway. Did you try to profile your code and see where's the bottleneck?
Ahhhh... There's your problem probably. There are some issues with your JMEDesktop stuff I guess.


I have temporary removed all JMEDesktop instances from my game, and still I get a constant 30 FPS rate... so, may it be that 30 FPS is a target already setted somewhere inside?  :?

If you are using StandardGame then you can set the FPS, also make sure v-sync is off to get a true FPS.

If you are using SimpleGame then it is set to render as fast as it can, which should be way faster than 30fps.



Maybe run some of the tests and see what your FPS are there.

Can you run TestDebugGameState!?



When I run that test, which is very simple, it has a very simple 3D scene (only one cube), I ONLY GET 60 FPS!!!



May DebugGameState be the cause why I am getting so low FPS of 30?



I will check, but I would apreciate if you can test it to check if you also do get the same low FPS running this sample test.



Wha't the FPS you get?



:?

60!  Becuase it is using standard game



Try testBoxColor (I get almost 400FPS)

You can disable video sync and it will go faster. :o



Why are so many people so concerned about FPS in massive numbers above what the human eye can perceive and even the video refresh is?

I think what people (including me) are concerned about is the fact that simple scenes can push the fps down to 100 or even 30 or whatever - what would happen down the line, when scenes get more complex. We want to identify problems early on.

manuelbarzi said:

Can you run TestDebugGameState!?

When I run that test, which is very simple, it has a very simple 3D scene (only one cube), I ONLY GET 60 FPS!!!!


That sounds a lot like vsync is enabled.
Mindgamer said:

I think what people (including me) are concerned about is the fact that simple scenes can push the fps down to 100 or even 30 or whatever - what would happen down the line, when scenes get more complex. We want to identify problems early on.


Again, the point has been missed...it is not that a simple scene "can push the fps down to 100 or even 30", but rather that the FPS is locked at that value because it doesn't need to waste time rendering a thousand times a second when there is absolutely no benefit except wasting CPU cycles. Video Sync causes your FPS to run at the same speed as your monitor's refresh rate...this is why you're seeing those low numbers.

Yeah, I agree DF; however dropping to 10 (and staying there until reboot) is kinda odd…

Yeah, I think that doesn't have to do with StandardGame. :wink:

60!  Becuase it is using standard game


Yeah, I NEED to use StandardGame, as recommended by other hero members.

You can disable video sync and it will go faster.
That sounds a lot like vsync is enabled.


I just instantiated StandardGame with its default values... I guess by your comments then that vsync = true is a default value... Ok, I will check...