Wednesday, 28 May 2014

First Win Goes To Ravey

As part of our renewed quest for even more performance, we have been drawing our plans as you will have read in previous blogs. While I continued researching how the engine scene was being built thanks to NSIGHT and Simon was busy getting confused with his weed and grass issues, Ravey the third technologist in our mighty trio made a tweak to the DarkAI subsystem that did not adversely affect the AI system but virtually eliminated the cost of calling what was the most expensive function to call.  The humble result for me personally is that I went from 25 fps to 37 fps and my AI UPDATE call went from 25% of all cycles to less than 3% (and sometimes 0%).

The frame rate difference might be slight right now, but the smoothness of the game play is very noticeable. Furthermore when I switched off reflections, my frame rate jumped over 60 fps (on a 9600 GT card) which is just where I wanted it to be.  My mission, partly thanks to NSIGHT, will be to target the reflection render system to ensure it only works when it needs to, and not in the scene above where it is quite clear there is no water to reflect anything.

Other discoveries included the conclusion that static batching, large object draw order and occlusion will all play a part in speeding up the level, and for the engine as a whole.  These are planned for later in the week.

In other news, we have fixed the shader issue so HIGH and MEDIUM behave themselves and resemble their HIGHEST and LOWEST counterparts. Water is now fogged properly so it emerges from the mist just like everything else, and we are on the verge of halving the number of grass objects being rendered which will help performance even more.

I continue to haunt the forum this week to ensure I try to answer all our V1.007 concerns, and don't forget there is a Live Interview next week planned which will include some of your worthy questions you have posted last week. It will be on the subject of Indie Developers, but I might sneak some mentions of Reloaded while I am in the spotlight ;)  Great to hear than V1.007 is being received well and we hope to improve on this version without too much delay, so watch this space for more news soon!


  1. "In other news, we have fixed the shader issue so HIGH and MEDIUM behave themselves and resemble their HIGHEST and LOWEST counterparts."

    Does that now mean I have lost the visual quality I was getting on my terrain as I am using all medium settings throughout and had gained an important visual enhancement the way it was. Now presumably not being able to use settings above medium for performance reasons I will have to go backwards and suffer unacceptable terrain visual quality again at the medium terrain shader setting just when things were looking up?

    What was the problem with it as it was? Why could you not improve visual qualities above Medium and leave the Medium and lowest settings alone which users were getting a benefit from. In fact improve them all and not make them worse now you had them at a decent quality level for large numbers of non top of the range system users.

    Not wanting to take anything away from those able to use the highest shader settings at all just make them better. Why do we keep reducing qualities somewhere or other along the line taking from one and giving to another and sometimes back the other way.

    Visually V1.07 was the best there's been by a long way and just about getting there as I could see it on my system anyway.


  2. It was Rick's idea to align all the shaders so they do not look drastically different from each other, and in all fairness the MEDIUM and HIGH techniques did use some older code which should not have made it into V1.007. UMAN, email directly and I will send you the new shader 'tweak' so you can let me know if it messed you up. Cheers.

  3. Hi Lee. A question. When I turn to an area, in my competition level, that has a lot of geometry and entities, the frame rate drops, although this area is hidden from camera view. Is this the occlusion problem?

    When I put the occlusion slider up to 100, it seems like nothing changes. Is it possible to get more performance before the competition deadline? Thanks, and I love the new character shaders. It makes my custom characters look incredible!

  4. Yes it is an occlusion issue. We're looking at performance improvements now, so hopefully you will get a small FPS boost by the time the competition is judged! Fear not though, everyone is in the same boat ;)

  5. that would be great! Something to note: when I press F9, and then go back out of the edit mode, it seems that the frame rate increases a few frames, strange? Cheers

  6. Michael, I don't have Reloaded. But if the scripting system supports hiding and showing objects (making objects visible and invisible), you could set up a trigger zone occlusion system yourself.

    For example, if there's a large area where those high poly/entity objects are all blocked by a wall or something, then you could script where you are as a trigger zone to hide (make invisible) all those unseeable objects. Just make sure you restore them when you leave that trigger zone.

    Or you could do it the other way...

    ...Have trigger zones where all objects are hidden except those that are potentially viewed. For example, a room: Entering that room would show only that which is inside of that room and visible by looking through doorways from anywhere within that room. All else would be hidden/invisible. Do the same for various "areas".

    So this is a way to manually build an occlusion system into the map, as needed, until Lee does the automatic equivalent.

    Anyway, it sounds like it's one main area or so you'd need to focus on for the greatest benefit. Probably no need in this context to do it for your whole map.

  7. see Lee I told you that the reflection was the cause of the frame rate drop.

  8. Great! Quick suggestion: Valve puts all the slides from their GDC (as well as others) presentations on a website for public viewing. Some of them provide some excellent solutions to problems, and may provide inspiration for you.

    AI systems from L4D: