Starkium
(Starkium)
March 20, 2020, 2:12am
26
JTXPbrah:
Hey man so when I was testing out 50+ AI in my game, I noticed that the constant ticking is from the movement component thats default on the character. When the AI stops moving/pathing and is idle for a bit, the component would stop ticking and performance would jump. So figuring out how to better optimize the movement component would be huge. Plus the other performance fixes you’ve done and I think you’ll nail the problem.
I’ve also noticed that just having a navmesh, even if its only 1x1x1 in my map, causes the ram of my server to jump up to about 1gb. Removing the navmesh and the game is only about 150mb. Is this normal? Does the navmesh simply require a ton of resources? Maybe dependent on map size?
I agree thats definitely a huge hit. Skeletal mesh was as well. I have a working version of the animation sharing set up going now and that has helped a ton.
midix:
Awesome stuff, I hope it will work out in the end.
This would be very much needed for my project. But there’s an optimization possible. For example, when AI is in the rendering range, I would need more detailed set of scoring functions. For example, an NPC goes into a cafe where the player is. Now NPC has to evaluate if it wants to drink some coffee or to chat with the shop assistant or another NPC. But if the same AI is not visible, it should not run through those detailed scoring functions - the player only needs to know that an NPC agent left its home at 9 AM, visited a cafe for 10 minutes and continued its way. No need to run through all those “should I have one more coffee?” and “should I chat with the shop assistant?” scoring functions if the NPC is out of rendering range.
I guess, for this to happen, at first, we would need some abstract system to push/pop a set of scoring functions depending on some event. And if we have that done, we can treat “leave/enter rendering range” as one of those events and so developers can then decide which set of utility scoring functions to push/pop.
I’ve been thinking about this a bit, but I don’t have an answer I’ve liked yet. Maybe some sort of data table only based stuff.
Hey thanks, I’ve been taking stabs at this when I can. Here’s a screenie from my last test. Sorry for the bad quality, had to dig it off of discord.
I got 200 AI running at 144 fps with the animation sharing plugin, but in blueprint only. I can’t wait to see what performance I get when it’s brought to c++.