Replicating the massive-scale of tactical battles that occurred in pre-modern history has been my very first goal since learning development. The scale is usually accomplished by scaled representations (base units for table top games) and in turn-based time. Achieving this scale in real-time with individual units in a way that is both performant and controllable is a real challenge that as far as I know is only been accomplished in the Total War series or in 2D sprite games such as Scourge of War.
In any large real-time tactical with large formations of units the first thing you’ll notice is that the formations quickly devolve into either a mass of units or a zig-zag of lines with no coherency. Keeping a coherent battle line or formation was often the most critical tactical aspect of any such battle. It also becomes clear that the AI will struggle with forming and implementing decisions on a wide map with amorphous bodies of units. It quickly either becomes a loss of immersion or a chaotic mess.
So while I had spent perhaps 2 years on trying to get thousands of units simulated on a rts battlefield, once it was actually performant and functioning (with much careful optimizations) I came to the same realization that the same “messy” issues existed. Its important to not get stuck in sunken cost though, and so in 2021 I ended up entirely scrapping the old and rewriting it into grid-based tactical work.
Using a grid-based tactical map and restricting unit movement allows for greater freedom when planning things at a higher level. Now melees, bombardments, firing of large groups of soldiers can use deterministic simulations to predict the casualties. The AI can use these deterministic predictions to plan out decisions. The human player cannot “cheese” the AI with choke-points or kiting. Units don’t get stuck or lost.
Another happy discovery with the grid system simulation is that if the player is focused on a separate area of the battlefield… than the individual units of a different far-away area do not need to be simulated at all since only the grid itself is being simulated. I.e. 80 pike-men are only simulated if in the same sector as the player… otherwise the single pike-men “grid agent” will only be simulated instead, without worrying about the 80 positions of the individual soldiers. But to the player… it can still feel like individual soldiers are fighting if enough care and effort is taken. It’s like civilization hex units fighting… but much more complicated.
Large battles are now much easier to control and even more importantly understand what is going on. Instead of worrying about every single soldiers state we can instead break down the simulation into hundreds of grid agents while still visually presenting a massive scaled battle. In terms of scale… performance-wise we can achieve tens of thousands of units. Currently with an infantry company of 160 soldiers being rendered directly in the game as 4 grid agents, then a battle of 70K soldiers on each side would involve 4,000 grid agents being simulated approximately, which is feasible. This is unmanageable for the player though, so perhaps either doing 2:1 scale or breaking up the battle into separate left,center,right sectors is a better plan.
Now that I can see light at the end of the tunnel when it comes to simulation such huge battles, there’s a lot of questions on how to best model battle behaviors of the agents and the AI and the player. How do large battles get broken up into bite-sized pieces without becoming a micro-fest? Ideally a strong AI system would mean that the player could delegate and be more armchair general… but even then its always frustrating to have separate areas of the battlefield occurring away from the camera. The Ultimate General games did a good job of breaking up such large battles like Gettysburg by splitting areas to be played independently and then combining all the battle results together in the final phase. I do quite like that idea.
Other important questions remain such as how should morale, cohesion, fatigue, order, etc. be simulated? My current plan is to have company-level morale/cohesion, so that companies will retreat their 3–4 agents at the same time. Fatigue as a product of distance traveled and individual actions means its better represented as agent level, which means the company will have to use the average of fatigue for calculations. And my unimplemented system for order will be something like so: players and AI will have a certain amount of actions they can order at any given time perhaps… and if orders are changed too quickly (counteract order/cancel order) then a level of disorder will occur to agents. Perhaps this will lead to “battle orders” in which the player must draw overall strategy or orders for a regiment, and the battle plan will allow for order buffs to the agents so long as the battle plan remains in affect.E.g. an overall broad “charge” order will allow for higher order in the agents as they charge following the plan. But sudden micro-managing changes or situational changes will cause disorganization and thus higher chance of losing morale. Table-top games usually have a concept of action/command points… perhaps there’s a similar mechanic I can implement.
Other major questions include how deployment phases should play, how should units retreat and be recoverable, should there be spawn points. How do we represent battles that take course over 1–3 days while not wasting the players time… the grid-based battles can be fast forwarded deterministically which is great… but fast-forwarding can also be tedious. Do regiments of soldiers camp on the battlefield between days for multi-day battles? How would battles like Waterloo play out where there’s a chance of prussian reinforcements appearing unexpectedly? Or battles like Marengo where reinforcements turned defeat into victory? Any commander in history will tell you that battles are won operationally and not tactically. A player should win a game even if they take greater casualties if they still achieve operational success… but how to represent operational success in a real-time game?
It seems to me like there will need to be a higher-up tactical map perhaps, one in which regiments or brigades are simulated on a much larger 2D map perhaps. This will require a larger tactical map that can be broken up in sectors… which would still need to be implemented and experimented with… and will this level of complexity and layers be fun or just tedious? I certainly don’t enjoy repetitive zooming or switching map layers back and forth…
Finally here’s some tree rendering gifs (1ms rendering) to demonstrate how the large maps will be feasible as well. Trees are kinda of spread out and small scale… but I think it may be kept this way since a) allows for visualization of grid without resorting to transparency and b) I think the art design of the game will be “table-top aesthetic” so trees and units and buildings will be kept simple for indie-budget reasons and simplicity sake.