Overview: my bots are ultra laggy in UE4 I was thinking about getting a simulated bot from client or something that predicts…
If anyone ever did this and gets no laggy bots “AI controllers” please tell me. Such as titles like mount and blade 2 and Rome total war have bots that do not transmit laggy bad experiences.
How to do it properly?
Ok the things I need are then? Is there any plugin already?
A client brainless character that just follows non random lines ?
A client brainless character that will automatically attack when player close synching like with server one?
When it comes to the character base class, you could make a lot of optimisations. But if it’s something like a colony-type enemy, or you have more than 200 enemies on screen at the same time (depending on your mesh complexity), it’s best to avoid using the actor class entirely and start exploring Niagara systems. If you are using UE5, you could push the limit to 500-1000 actors on the screen without the need to use Niagara.
Polygon count will affect performance. But to be honest, the “character movement component” is already considered expensive. If you could tackle the tick function of this component, and since you are using UE4, shadow deactivation can help a lot, too.
My best guess for that total war is that they are using a different game engine with totally different frameworks. The software does not work the same as Unreal Engine. Their custom-made engine was specifically designed for an extreme number of pawns visible on screen. The closest example you could get with Unreal’s colony-type enemy is the World War Z game.
But yeah, they are not rendering individual default character classes. Otherwise, the game will not be supported in mid hardware specs. It’s either Niagara or a custom-made character class with C++.
Actually, with the built-in classes, you already have tons of things you can do with it. It’s not as limited as you think it is. They are already optimised and very reliable classes for you to use without any issues when packaging. The trick is to know which parts of the components you can disable or optimise for your needs. For example, if the character is at a distance, you can actually increase the ticking time; you can disable physics, disable shadows, and LODs, or even remove it completely and start rendering it as static.
Unreal already has most of these settings exposed as parameters for you to use and customise to your own needs. I would still recommend you use them wisely instead of creating the base class from scratch.
Optimizing individual ACharacter instances and tweaking tick/shadow settings is a great start, but you’ll hit a hard wall pretty fast (250us in cpu tick is still 250us*Entities xD )
For massive bot counts comes from changing the architecture to batching entities into squads/groups.
UE4
Squad / Leader-Based Pathfinding Instead of having 100+ bots all running heavy NavMesh queries and CharacterMovementComponent ticks individually, assign 1 leader (or an invisible squad pivot) to run the pathfinding. The remaining units in the squad simply calculate their positions relative to the leader using light vector math offsets (e.g., LeaderTransform + OffsetVector).
Offload the Heavy Lifting The “follower” bots don’t need full-blown character movement logic. They only need simple local avoidance (like RVO/ORCA) and visual rendering. Stripping out physics sweeps and movement ticks for 90% of the squad saves massive amounts of CPU budget.
Hybrid Movement LOD (Mixing 1 & 2 with CMC) If you really want to dive deep, you can build a hybrid system! Keep CMC on your units, but keep its tick, physics, and sweeps disabled by default while they’re marching in formation. When a specific bot gets engaged in close combat, takes knockback, or needs complex navigation, smoothly interpolate (Lerp) its transform from the squad offset over to active CMC control. Once they re-group or finish the fight, toggle CMC back off and pull them back into the squad math. Best of both worlds! xD
UE5
Same here but with a epic plugin
UE5 Mass Framework (ECS) If you ever move to UE5 down the line, check out the Mass Framework. It’s built on ECS (Entity Component System) specifically for processing thousands of entities in parallel. It completely bypasses standard AActor overhead, which is how games push into thousands of visible units smoothly.
Switching from micro-optimizing individual actors to batching logic at the squad level is usually what unlocks those Total War army sizes without melting the CPU!