Hi guys, I have a relatively demanding and probably under optimised open world game with around 100 NPCs in. It really crawls (10fps) when I go up to a high point and look at my entire city (no lods yet or any major form of optimising apart from occlusion culling)… It goes down to about 10fps, but Windows task manager says the CPU is only in use by 35%. Shouldnt it go up to like 80% to give me a better frame rate? Can you force it? Will a PS4 or similar sort of console try to utilise all of its CPU, or will some sit idle like this? How do I know it’s using all of my graphics card and not holding back there either? My set up is Haswell i7 4790K @ 4ghz & NVIDIA GeForce GTX970. Of course my main aim is to make it run fast on this (and lesser) machine the way it is, but I am quite curious why so much CPU is wasted if the game is struggling to maintain a playable FPS.
Actually, it’s not supposed to overload your CPU. That would happen if and only if you had a relatively slow processor or used some complex calculations on multiple threads(talking about time complexity, like calculating the paths for all the NPCs at the same time in different threads(in a single thread, if you’re doing it in the update function or something like that, this would result in low fps+low CPU usage, just like what you have)). The rendering is done on GPU and I bet it’s the thing that’s being overloaded. Just add the LODs. It helps a lot. Also, try manually turning off some lights that are far away(if that is not done automatically) and reduce the particle count over the distance. Haven’t done any decent sized open worlds, but from my experience, that could really give some decent performance benefits. And… 100 NPCs(or any other type of skinned meshes and especially rigidbodies) on screen is way too much unless you do some optimisations (like LODs, really low geometry, and similar things).
Apart from this kind of things, just use baked lightmaps and light probes wherever you can. This takes away tones of calculations(shadows have one of the biggest impacts on the performance, at least they had the last time I was working on something).