• Advertisement
Sign in to follow this  

What am I forgetting to optimize?

This topic is 1338 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

My game slows down to 24 fps in 1920x1080 fullscreen mode. Other games like Company of Heroes or Dawn of War or Simcity 5 probably have more things on screen yet they're able to run at 30 fps. Why?

 

2014-05-26%2004-29-35.jpg

 

It only happens when I zoom up to here or closer:

 

2014-05-26%2004-34-04.jpg

Share this post


Link to post
Share on other sites
Advertisement

As sole indie dev you should always be happy with the 80% part of the pareto principle (80-20 rule), and 80% of 30fps is 24 fps, therefor all is fine wink.png

Edited by Ashaman73

Share this post


Link to post
Share on other sites

Profile all of dat code and youll find out.

 

Could it have something to do with the camera angle relative to the ground? Do you have LoD for everything?

Share this post


Link to post
Share on other sites

profile.png

 

All of the top slow downs are part of the Intel OpenGL driver.

 

DrvSetCallbackProcs appears to just set the pointers to the standard OpenGL functions. But why is it being measured? I only started profiling after the map loaded.

 

http://dri.freedesktop.org/doxygen/gallium/stw__icd_8c.html#51f95005fe32929028a8d35cb8d3019b

Share this post


Link to post
Share on other sites

I made a mistake. DrSetCallbackProcs outputs debug information or something.

 

 

 

void APIENTRY DrvSetCallbackProcs ( INT  nProcs,     PROC *  pProcs     )      

 

Definition at line 199 of file stw_icd.c.

References debug_printf().

00202 {
00203 debug_printf( "%s( %d, 0x%p )\n", __FUNCTION__, nProcs, pProcs );
00204
00205 return;
00206 }

 

This is the mesa OpenGL driver source though I think. 

Share this post


Link to post
Share on other sites

If you zoom in and get FPS drop that's probably becouse you're fillrate bound by your Particle System.

 

There's small chance that you're ALU bound(heavy pixel shaders) but i woudln't count on that.

Share this post


Link to post
Share on other sites

1. Reducing the shadow map from 2048x2048 to 1024x1024 was the first thing that caused FPS to increase to 30

2. Having the camera amidst the exhaust particles caused lag, possibly because of sorting, but I don't see why sorting would need to do more work

3. Removing bump and specular on 200 units

 

But now the shadows are missing on the trees. A minor detail, messed something up.

Share this post


Link to post
Share on other sites

Your screenshot indicates you're running on Intel graphics, if you're on a laptop with dual graphics, make sure your app uses the right GPU.

Share this post


Link to post
Share on other sites

1. Reducing the shadow map from 2048x2048 to 1024x1024 was the first thing that caused FPS to increase to 30

2. Having the camera amidst the exhaust particles caused lag, possibly because of sorting, but I don't see why sorting would need to do more work

3. Removing bump and specular on 200 units

 

But now the shadows are missing on the trees. A minor detail, messed something up.

 

 

 Whenever there is blending occurring multiple times over the entire screen, like when the camera is inside a bunch of particles, that typically causes a slowdown. Blending is expensive, which usually isn't a problem when it's only over a small portion of the screen. Especially since particles are drawn back-to-front, meaning there is lots of overdraw, which is unfortunately necessary for it to look right, but expensive!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement