Managing 300 Characters

The CMC is expensive. See this graph for proof.

I’m trying to be as lazy as possible while still having (at most) 300 characters running around at any given time for my zombie game. I’m also using object pooling and managing various component tick intervals using a distance LOD system.

I’ve already tried a different approach with a UFloatingPawnMovement component. I figured out gravity and got the zombie to walk around successfully using AIMoveTo. The problem is stepping up small ledges like curbs, and moving up/down slopes. The CMC handles all of this flawlessly, along with penetration correction and many other things that are battle tested that I’d love to keep. It seems like a waste to throw away years of Epic developers debugging the CMC.

There has to be some middle ground between the barebones floating movement component and the hefty character movement component.

There are a few things I could use some guidance on:

1.) is this even a good approach? Am I better off figuring out Mass and swapping for characters when a zombie is a certain distance from the player?

2.) Is there a marketplace asset that will take the load off my shoulders? I’ve looked but can’t find anything that seems right.

3.) Am I not even worried about the right thing? I know skeletal meshes take a significant chunk of the game thread. I could easily be reading this graph wrong and my problem is skeletal meshes. I unfortunately don’t have this trace anymore so I can’t dig into the graph (I’ve disassembled my code to attack this issue).

4.) Any additional optimization or general tips you have about managing hundreds of AI would be amazing! I pulled off 375 zombies for a game jam and got good frame rates on high end PCs, but now that I’m working on it for steam, my optimizations won’t cut it.