Spellcaster Studios

Make it happen…

Optimization

I wasn’t happy with the performance of the game in certain points, with drops to 30 or 40 FPS, as measured by Fraps…

So, I decided to dust off my profiling tools and try to figure out where were the bottlenecks, but when I was running the initial benchmarks I got a very strange issue:

screen568

So the game is reporting that a full frame takes 3 ms to render (333 FPS), but the frame rate reported by Fraps is 47 FPS… My first thought was that my profiling system was wrong for some reason, but other simpler tests (just time it directly and output the result to a file after 200 frames) corroborated this data…

My second thought was that I was losing time because of the monitor couldn’t take more than 50 frames per second, but that should be registered below the “Swap” meter, and I was able to play a YouTube video with Fraps showing 60 FPS.

Switching to Direct3D and setting the presentation interval to immediate, the results were even stranger:

screen569

I’d say the zero in render time is impossible and doesn’t make any sense whatsoever…

So I’m still diving into the code, trying to figure out exactly what’s happening with the timers/profile code… There has to be something I’m missing that explains this… Anyway, the frame rate is better than I thought, so I may not need to really go into optimization for now!

Now listening to “Maniacal Renderings” by “Jon Oliva’s Pain”

Link of the Day: When this goes up, everybody has already seen this, I’m sure, but this is fresh at time of writing, and I’m such a fanboy, I need to share my excitement:

Comment