I’m just running some tests now and I think the last one I had roughly 120 enemy NPCS attacking me at once. The game was obviously noticeably slow even though the enemies themselves or my character don’t have an excessive polycount (enemy mesh around 7k - fully armored somewhere around 12 I guess, main character 25k plus armor somewhere around 35-40k).
Does anyone have any experience with game performance when packaged as opposed to playing in the editor/pie?
Also, I’m noticing some slowdowns in my main char blueprint as it starts to get somewhat extensive (working on the blueprint, playing the game is fine), and I think it has to do with some tests I ran with three different inventory systems that seem to have clogged up some references. I’ve since removed two systems but it seems something is still bogging it down (this started before I added my current system). Anyone have any tips for cleaning up my project?
Should add that I’m playing on an Nvidia 1070ti, with i5 3,6 ghz and 32 gig ram (considering processor upgrade to i7 but I want something that can at least relate to a mid-range rig at release time).
Generally speaking, your packaged game should be more performant than when PIE. A shipping game should be faster than a development or debug game too.
I’m not quite sure what you’re asking about your scenarios (are you seeing it noticeably slower when in PIE than packaged?), so here’s some general advice:
- If you’re comparing build specs, make sure that you’re running both at similar resolution and settings
- Use stat Unit command as well as the GPU and CPU profiler. That’ll help you understand exactly where your problem is and to figure out if you’re CPU or GPU bound.
- You say you have 120 NPCs. I assume these are all running some sort of AI logic and this could be expensive. This might be the real cause of any slow down so again, use the CPU profiler to see what’s going on. Remember that 1ms of additional processing which could be optimised out per NPC would be 120ms with that number being active at once.
- You said that your poly count is reasonable, but by your specs it’s probably over 1million polys just for your characters. That’s not a small amount but on it’s own, the number of polys isn’t a very useful gauge of performance. Look at your draw calls as a starting point and again, use the GPU profiler.
Hi there, thanks for answering.
It was more a general interest question than anything, as I don’t intend to have hundreds of active npcs at a time of course. If I did they would be far less detailed than they are. I haven’t actually packaged the game, it was more a curiosity question while I was just stresstesting performance.
Also I don’t use behavior trees for AI, it’s all done through blueprints, and I know this may have some effect on performance. For processing it jumped up to roughly 44% usage when playing in editor with 100 active NPCs with tick interval of 0.2. Setting tick to 0 is little difference, gets around 48-50% usage. So there’s plenty to go on as far as the processor itself is concerned.
Will definitely have a look at the profiler. Looking at stats right now I can see that the engine is actually rendering something while playing, which shouldn’t be there. This has to do with enemy customization (I have a random equipment system for them), whereby if a helmet is selected for example, the hair will not only be hidden, but I actually clear the mesh. Yet it’s still rendering for some reason.
Actually I may be looking at the wrong thing here, stats don’t show my own character while playing.
Also dragged in 200 of the NPCs there, it ran like ■■■■ of course (sub 10 fps), but the fact that it was actually able to run it at all I take as a positive sign that things can’t be too bad.
Considering all of them running AI on tick I was a bit worried, but even on frame tick it seems alright. Player character has literally nothing running on tick.
Did you ever find a solution for this? I have a non vr game that has a bottleneck of 10ms in the editor, but the packaged version is 17ms.