Battlefield AI and Simulation
Kingmakers uses a custom multi-threaded AI system that controls every soldier's decision-making, pathfinding, and loyalty in real time. Battles run as fully real-time simulations with thousands of soldiers fighting simultaneously, combined with a GPU-based procedural animation system for rendering at scale.
Overview
The battlefield AI and simulation system is one of the defining technical achievements in Kingmakers. Every soldier on the battlefield is controlled by a custom multi-threaded AI that governs their decision-making, pathfinding, and loyalty. Battles run as fully real-time simulations with thousands of soldiers fighting from the moment a mission begins. Soldiers are not spawned on demand or triggered by player proximity; they exist and operate independently across the entire battlefield from start to finish.
The developers at Redemption Road Games, led by co-founders and programmers Ian Fisch, Paul Fisch, and Daniel Balazs, built the simulation on top of Unreal Engine 4.27 but layered extensive custom systems for AI, animation, and physics. The result is a game that can render thousands of individually simulated combatants at 60 frames per second on mid-range PC hardware, without relying on frame generation techniques.
Multi-Threaded AI
The AI in Kingmakers is described by the developers as "next-gen multi-threaded AI" that controls three aspects of each soldier's behavior: decision-making, pathfinding, and loyalty. Multi-threading means the AI calculations are distributed across multiple CPU cores simultaneously, which is what allows the system to handle thousands of soldiers without grinding the game's performance to a halt.
Decision-Making
Each soldier evaluates their situation and makes independent choices about what to do next. This goes beyond simple "attack the nearest enemy" logic. Soldiers can assess the battlefield, choose to engage, retreat, flank, regroup with nearby allies, or surrender depending on conditions. The developers have confirmed that troops adapt to the player's tactics; if you overwhelm a formation with superior firepower, soldiers may lay down their arms. If you leave a flank exposed, enemy troops will attempt to exploit the gap.
Pathfinding
Pathfinding in Kingmakers uses Unreal Engine's navigation mesh (navmesh) as a foundation, but the team has built custom solutions on top of it. The custom pathfinding layer allows thousands of soldiers to navigate complex environments simultaneously, including multi-story castles with multiple floors, staircases, and interior rooms. The level of pathfinding fidelity is comparable to what you would expect from a modern first-person shooter, applied across thousands of agents at once.
This is a significant technical challenge. In most games, detailed pathfinding is reserved for a handful of AI characters. Kingmakers applies it to every soldier on the field, which means the navigation system must handle thousands of simultaneous pathfinding queries without introducing stutters or delays.
Loyalty and Morale
Loyalty is the third pillar of the AI system and ties directly into the faction system. Each soldier has a loyalty value that can shift based on battlefield events. Troops who witness devastating attacks (such as artillery barrages or attack helicopter strafing runs) may lose morale and rout. In extreme cases, soldiers can switch allegiances entirely. This means the player's choice of weapons and tactics has consequences beyond direct kills; using overwhelming force can break enemy formations psychologically, causing them to flee or surrender.
The morale system also works in the other direction. Troops fighting near their home territory or alongside a charismatic commander may have higher morale and be harder to break. The interplay between modern weaponry and medieval soldiers' reactions to it creates dynamic battlefield narratives where routing enemies, taking prisoners, and managing surrendered forces are all part of the tactical picture.
Prisoner System
When soldiers surrender or are captured, the player has options for how to deal with them. The developers have confirmed a prisoner system where captured enemies can be ransomed, tortured, or executed. Civilians are also present on the battlefield, adding another layer of decision-making. These choices tie into the game's broader narrative and faction alignment consequences.
Scale and Performance
Kingmakers targets a simultaneous soldier count in the thousands per battlefield. Developer interviews have referenced figures around 4,000 NPCs on the field at once, with the possibility of pushing toward 8,000 in certain scenarios. The game also aims to render "tens of thousands" of soldiers in total during the largest engagements when counting soldiers across the entire map.
Metric | Detail |
|---|---|
Target soldier count | Thousands per battlefield (referenced up to 4,000-8,000) |
AI threading | Custom multi-threaded, distributed across CPU cores |
Pathfinding base | Unreal Engine navmesh with custom solutions layered on top |
Pathfinding scope | Multi-story castles, complex interior environments |
Performance target | 60 FPS on mid-range PCs (RTX 2060+) without frame generation |
Engine | Unreal Engine 4.27 with heavy custom modifications |
Console target | 60 FPS performance mode on PS5 and Xbox Series X|S |
GPU Animation System
Rendering thousands of individually animated soldiers requires a non-standard animation approach. Kingmakers uses a dual animation system that switches between GPU-based vertex animation and traditional CPU-driven skeletal animation depending on context.
Vertex Animation (Distant Soldiers)
When soldiers are far from the camera or from the player's direct interaction, the game uses GPU-based vertex animation. This technique focuses on the position and rotation of meshes rather than calculating a full skeletal rig for each character. The GPU handles the animation work through a custom shader, while the CPU sees these characters in a T-pose. This dramatically reduces the per-character cost of animation and is what allows thousands of soldiers to be visible and animated simultaneously.
Skeletal Animation (Nearby Soldiers)
When a soldier enters the player's immediate vicinity, or when the player aims a weapon crosshair near them, or when a vehicle approaches, the character transitions seamlessly from vertex animation to full skeletal animation. This gives nearby soldiers the same level of animation fidelity you would expect from characters in a single-player third-person shooter. The transition is invisible to the player.
Skeletal Limits
The developers have noted that the system ideally keeps fewer than 100 fully skeletal models active at any given time. Skeletal computations are handled on the CPU, which makes them the bottleneck rather than the GPU's draw calls. By limiting the number of simultaneous skeletal characters and using vertex animation for everyone else, the game balances visual fidelity with performance.
AI Adaptation
The AI is designed to react intelligently to the anachronistic presence of modern weapons on a medieval battlefield. Enemy commanders employ swarming tactics, using superior numbers to counter the player's technological advantage. Troops attempt flanking maneuvers, form defensive formations, and coordinate attacks rather than charging blindly into gunfire. The developers have stated that "not all of your bullets will have an easy time taking down all enemy types," emphasizing that the armor and penetration system means heavily armored knights can absorb significant gunfire and keep advancing.
Destructible Environments and AI
The simulation extends beyond soldiers to include destructible environments. Buildings, walls, and fortifications can be destroyed during battle, and the AI pathfinding system dynamically updates when the environment changes. If a wall is breached by a grenade or a vehicle drives through a building, soldiers recalculate their routes in real time. This integration between destruction physics and AI pathfinding means that battles genuinely reshape the terrain and force both the player and the AI to adapt.
Tips
Use overwhelming firepower against massed formations to trigger morale breaks and mass surrenders.
Pay attention to the enemy's flanking attempts. The AI will exploit gaps in your lines if you focus too heavily on one area.
Heavily armored knights resist bullets, so adjust your weapon choice or target weaker units first to break formation cohesion.
Breaching castle walls creates new pathfinding routes for both your troops and the enemy, so plan your siege carefully.
In co-op, coordinate with teammates to attack from multiple directions and trigger faster morale collapses.