Sunday 27 October 2013

Sunday Slicerthon

Priority Performance 

As you know, Lee has gone paranoid on performance, and looking at the engine as one big speed making machine.  To that end, I have been working through the ideas I have to speed everything up. You can think of it akin to a statement from the previous blog comments which I quite liked:

Project Manager: "Amazing, how did you get a 1000% speed increase?!"

Coder: "Simple, I just switched everything off!"

To that end, I have added a new slider panel called "Graphic Options" which allows me to selectively switch of hungry sub-processes, and eventually allow different 'modes' of operation yielding various speed vs benefits to choose from.  Right now they just switch stuff off gracefully in real-time.


I have also extended the performance monitor a little more with polygon and draw call readouts, as this will also be vital in understanding whether objects are being rendered needlessly.

I also got a tip that the IDE was draining performance in the background, and on investigation it turns out a rogue mouse update function call was (and this you won't believe), reading a file for two strings and producing a formatted string from them. The code then proceeded to do nothing with that string! Amazing.  Anyhoo, removed that code and the IDE went from 25% usage down to 0% usage when in test game mode :)

Signing Off

My latest screen shot shows 144fps, which is what I get with an empty terrain and grass level with no reflections, shadows or light rays.  Turns out the test game was also being capped at 80fps which I have now fixed, allowing the engine to run as fast as it can.  Next is top investigate each of the 575,000 polygons and 191 draw calls to see what they are contributing.  Once I have stripped everything back to the bare walls, and introduced Graphic Option controls for them, I can start putting everything back in an optimized way.  

Not been brave enough to touch the NSIGHT tool yet. I also have the Intel GPA tool on standby too, so plenty of back-up if things get sticky.  I figured before turning to these assistants that I should proceed to implement my own tried and tested techniques for speed gain (that is, to remove all the stupid code) ;)  I have also managed to obtain a low-end dedicated NVIDIA card over the weekend (under 1000 score) so will be able to conduct some remote testing with NSIGHT a little sooner than anticipated!

15 comments:

  1. Hi Lee,

    Thanks very much for that and the hard work once more.

    I just love the 144fps (heaven) and ignore anything else for a moment.


    :-)

    ReplyDelete
  2. Excellent, excellent work, Lee! Very happy with everything you have in this post :) I hate the fact that you have to force yourself back to a <1000 card, but at the same time I'm so glad that you're putting so much effort into performance :)

    ReplyDelete
    Replies
    1. I mean, sub-1000 passmark-rated card. Not <$1000 (even though it would be, obviously). Phew, imagine a $1000 card! Wish I had that kind of cash....

      Delete
  3. As the saying goes "You Know it Makes Sense" Its best in the long run I would think. Just think of the benefits.

    :-)

    ReplyDelete
  4. Great Update Lee!
    You done it again!

    ReplyDelete
  5. Nice to here things are going well lee.

    ReplyDelete
  6. hey nice post meh, You are one of the best writers I've seen of recent. I love your style of blogging here. this post reminds me of an equally interesting post that I read some time ago on Daniel Uyi's blog: How To Take Actions Everyday .
    keep up the good work friend. I will be back to read more of your posts.

    Regards

    ReplyDelete
  7. @Lee great work work
    and nice to see drawcalls and polygoncount counts

    i would like to suggest adding a option to cap fps @ 60fps
    in some cases/ games it would proof to be usefull
    nomore words - just waiting for the beta :)

    ReplyDelete
  8. Reloaded was capped - it needs to be uncapped unless there's a good reason for it not to be. If it can be optional then fair enough.

    :-)

    ReplyDelete
    Replies
    1. that is why i wrote *option as in optional

      Delete
  9. I've added a new field in the SETUP.INI called VSYNC=1 so you can choose to cap to the monitor refresh or go full throttle!

    ReplyDelete
  10. I personally dont plan to have too much shadow detail in outdoor scenes so hopefully when i tone down the shadow quality it helps with the FPS. Looks like it would.

    Good work so far

    ReplyDelete