This is the 2nd blog in our new series, which discusses developing our updated engine that will power the next title in the Grand Tactician-series. We’re keeping some details, like historical setting, vague on purpose to discuss at a later stage. But, we’ll keep releasing these peeks behind the scenes to let you know what to expect in terms of game play and improvements.
The New Unit System
One of the first things we developed for The Civil War (during 2016-17) was what we call the Unit System. This is how units are created and handled in the battle layer, and it has a big impact on a multitude of other things: visuals, controls, performance, AI, to name a few.
Re-building the Unit System is a key part of improving the battle layer for the upcoming title. The results are very encouraging and we’re excited about the possibilities it brings to the table, both for game play and also for performance and clunkiness (or lack of, this time around) of the battles. This will of course work hand-in-hand with terrain and movement, group-system, combat system(s), AI, and so on.
The Old System
In the old system, we built the units from what we call “company blocks”. These are sub-elements of the units, and platforms, that are moved depending on the unit’s formation and positioning. The 3D models (or as the game originally featured, sprite soldiers!) are attached to each platform.
In The Civil War (1861-1865), or GT1, each platform has 4 soldier models in 2 ranks. This is to show line formations in 2 ranks and marching columns in 4 files. Only 1 model type is supported, and all special situations are “hardcoded” (a word we use to determine something that is non-adjustable by editing the game’s preference files). Such special situations include the officer model and the artillery units’ model arrangement. The different unit formations (line, assault column, column, square) were built by determining how the company blocks are placed side by side or behind one another.
Tracking each platform allows curving and quite OK-looking column movement (“snaking”) for each unit. When resizing the unit in battle, due to changing game settings or due to casualties, the number of platforms per unit changes. In the system, the more platforms there are, the more severe the performance hit, as the company blocks are used for many combat and terrain placement calculations. The end result could be described as “clunky”, and it also limited the performance being rather CPU heavy (like the game is, in general, instead of many modern games that stress the GPU more.)
Image 1: Here you can see how the units are built in the system. The “company blocks” are highlighted in red. Each contains a set number of 3D soldier models (2×4), the officer is added as a separate block, and the 3D unit flag simply floats in the air in the coordinates where the unit is calculated to be stationed in. When giving a movement order, the positioning of each company block is calculated, as seen in the terrain (right).
With the tools we had when developing the old unit system, we had many restrictions. For example, each unit shows only one type of soldier model (except for hardcoded special situations mentioned above), and the number of soldier models in the battle is limited to a few thousand in total due to performance. This means a regiment of 1000 soldiers is normally visualized by way less than a hundred models (in the above image the unit shows some 40). This means a 1:25 scale (one 3D model = 25 real soldiers). Not very “grand”, right?
The Rebuilt System
Just tinkering with the old unit system would have improved the situation in general by a limited degree. For that reason, we scrapped the old system completely and rebuilt the new one using the knowledge we’ve gained and also modern tools that have only become available more recently.
In the updated GT engine, units are built differently. Instead of using set coy blocks like Legos, we determine the composition of whole units, soldier by soldier. Each unit can contain many different soldier types including special ones such as officers, and drummers, each with their own 3D models and animations. The per soldier data also contains info for combat simulation. What this allows, for example, is units engaging in multiple directions depending on the combat situation and using different kinds of firing systems, such as different numbers of ranks firing simultaneous volleys or in succession.
The units now have more flexible formations for different combat situations they can assume depending on conditions around the unit, the situation of the unit itself, and the training level. As an example, a cavalry unit may use different formations for marching, battlefield movement, ranged engagement, skirmishing, and a few different for charging. Together with the more flexible firing mechanisms and ability to fight in multiple directions the battle micro-AI will have fewer difficulties in countering player’s moves on the lowest, i.e. unit, level. (The battle AI is divided into unit-level “micro-AI” that reacts to surrounding conditions and a “macro-AI” that handles moving groups of units and assigning stances.)
From a management point of view, drill is more important than before, as raw troops cannot perform the more complex maneuvers as a cohesive unit. This limits their effectiveness even more compared to GT1.
Image 2: This is a sketch of a Civil War Infantry Regiment in line. With the new unit system, a more detailed unit deployment such as this can be created, including positioning of the flags, officers, NCOs, musicians, and so on.
Sounds rather performance consuming, right? On the contrary: with the new tools and much improved coding magic, instead of showing a maximum of a few thousand soldiers in a battle (GT1 upper limit), we are talking about tens of thousands – and this with better performance than in GT1!
And much of this is moddable.
How this is technically pulled off, shall remain our secret for now, so let’s not dive deeper into details. You may read between the lines we’re quite excited about the opportunities this new unit system brings to the table. But that’s not all! In the next blog we’ll take one step deeper into what it means when we use the new system to simulate ranged and melee combat on the single soldier level – as part of the improved combat model!
Most Respy,
Gen’l. Ilja Varha
Lead Designer – Grand Engineer Corps