BigBANGtheory wrote:1) Slightly controversial so I'll choose my words carefully and respectfully...
We experienced performance and scaling issues on high end hardware at release, clearly some problems have been identified and fixed because things have improved well done... So what did you find, what was causing some of the performance problems beyond hardware drivers etc I am talking about the game specifically?
We performed quite a few of tasks, mostly to
1. smartly "skip" work
2. fix threading issues ( threads blocking each other ).
3. figure out why something fast wasn't working as intended.
4. change the scenario / level.
5. new features "stealing" performance.
An example of #1 was the cpu-render side, trying to predict which objects to discard - since they wouldn't end up on the screen anyway. For example we had culling code for asteroids which worked quite well - but at one point we ended up testing 20k-30k asteroids individually each frame. Since we have a nice grid with "big groups of asteroids" this could be easily improved, which dropped the number of tests needed by roughly 70%.
An example of #2 was in our way of threading, which ended up causing many thread-switches when loading directX textures/meshes (this was fixed quite early). We had some problems where worker-threads could end up blocking our main-thread.
An example of #3 was in asteroid rendering, more specifically instancing. We can't instance models with an alpha - but at one point some asteroid-models got that. Basically resulting in all asteroids being drawn individually with thousands of draw-calls - not good.
An example of #4 was certain regions with ice-asteroids, where the level-setup was such that there were
way too many - even after all other optimizations. We ended up putting the counts down to reasonable levels.
Same for "choke-points" where too many ships ended up.
We used several approaches to spread the ships out more in these cases.
- from the AI-side trying to avoid ships going somewhere where "too much" activity is
- having more locations for certain asteroids-fields.
- add certain stations so ships will spread more nicely between them.
An example of #5 were lensflares. They could end up doing many "long-distance" raycast ( > 50km). We optimized those by doing a short 1-km raycasts (factors faster) because roughly 1/2 of those flares would be blocked by its own ship.
We did way more optimizations, but I hope this gives some insight.