- Home /
Sudden frame rate drop during rendering
I used the GUI to render some tiles across the screen with a sidescrolling offset. Everything ran fine at about 80 FPS.
However about a few minutes in the framerate suddenly dropped to about 40 FPS and stayed there.
What's really strange is that if I let my computer rest for a few minutes and run the program again the same thing happens (starts at 80FPS). If I relaunch it straight away the FPS is around 40.
Same number of draw calls, no randomly generated events, why is this?
Is there something I can change in the quality settings to rectify this problem?
Answer by glider521al · Jan 16, 2013 at 09:48 PM
Please, this issue is actually so severe to me it's making me consider switching to XNA/Monogame.
I think it's something to do with how much resources the game requests from the computer. I noticed that games like Bastion would cause my computer to heat up faster (and my computer fan to work harder). Whilst running this game, barely causes the computer (windows 7 ASUS laptop) to make a sound.
I have a feeling it's possible because another game made by Unity: Edge of space Rendered just as much to the screen, caused my computer to work harder, without the infuriating framerate drop a few minutes later: http://www.desura.com/games/edge-of-space
Take a look at the stats before and after the slowdown. Anything obvious change? Anything being output to the console? If you have Pro, run a deep profile and see what is taking time. Try running System.GC.Collect(); every few seconds. Take a look at the processes running with Windows Task $$anonymous$$anager. Is something other than Unity pulling a chunk of CPU time when the FSP srops. Try your app on a different machine.
Oh, and you might want to verify the frame rate drop by calculating frame rate a couple of different ways. There is a script here:
Thankyou robertbu.
I've been using FRAPS to verify my framerate.
I've also noticed that compiling the game as a standalone makes it run about 25-40% faster.
The mysterious frame rate drop seems to happen only when my computer heats up, so it could be something with the GPU.
Still I would prefer the game to run as fast as possible, so any other tips are appreciated.