LSCS: Components
In the following every Component for the Large Scale Formation System is shortly explained
- Neccessary Managers / Controllers
| CameraController | Controlls the Camera movement and rotation based on player input |
| FormationController | Controlls the formation placement by the player aswell as highliting and visualizing formations. |
| GameManager | Controls spawning and gameover conditions. Handles Unity Jobs. Calculates Player and Enemy strength |
| UIManager | Handles every UI except Minimap |
2. Formation and Movement
| Formation | The main script that manages a group of units. It controls the status (Idle, Moving, Engaged), the waypoints and the grouping of the units. |
| FormationCollider | Recognizes other formations and initiates combat |
| CohesionJob | A Unity job that adjusts the speed of individual units based on their distance from the waypoint. |
| FindClosestEnemyJob | A unity job that calculates the nearest enemy for each unit in a formation. |
| RotationJob | A Unity job that calculates the rotation of all units in parallel, based on their state and speed |
3. Unit and Combat
| Unit | The core script that represents a single unit. It manages the health status, the status (Idle, Moving, Fighting) and is a middleman. |
| UnitDataSO | A scriptable object that stores the basic statistics and settings of a unit (e.g. health value, movement speed, weapons). |
| CombatBehaviourSO | A superordinate class for combat systems. |
| MeleeCombatSO | The implementation of melee movements and attacks. |
| AcherCombatSO | The implementation of Archer movements and attacks as well as melee. |
| CavalaryCombatSO | The implementation of Cavalrymovements and attacks. |
| ElephantCombatSO | The implementation of Elephant movements and attacks as a Example. |
| CombatPlacementSO | A superordinate class for the placement of units in battle. |
| MeleeCombatPlacementSO | Defines the boids logic and the placement of melee units in combat. |
| MeleeCombatPlacementSOold | Defines the position of units in combat not on boids but based on an algortihmus |
| DamageModifierSO | A script that adjusts the damage as some formations are better or worse against other formations. Calculates the total damage. |
| UnitTypeSO | Used by the DamageModifier and AITactic to define general Unit Types |
| RangedWeapon | Ranged Weapon on the Unit |
| RangedWeaponSO | A superordinate class for the creation of Ranged Weapons. |
| IBowSO | Bow Weapon |
3. Animation
| AnimatorLink | Calls the actual Animation on the Animator. Can be used to switch between Unitys Animation system and a Custom Animation system |
| AnimatorLinkCavalry | AnimationLink for Cavalry |
| AnimatorLinkLODManager | Controls the automatic switching betwen Unitys Animation system and a Custom Animation system |
| RelayAnimationEvent | Relays Animation events to the Unit script or Unit Audio |
4. AI
| AICommander | The central manager who makes decisions and assigns tactics to the AI formations. |
| AIStrategySO | A scriptable object that stores the rules and tactics for the AI. |
| AITacticSO | A superordinate class for all AI tactics. |
| Tactic_EstablishFrontLine | A specific tactic for forming the front line and attacking enemies. |
| Tactic_ArcherTargetSelection | A specific tactic for Archers to attack best targets. |
| Tactic_FlankWithCavalry | A specific tactic for flanking. |
5. Army
| Army | The actual Army data. Holds formation and current Troop data. |
| ArmySpawner | Spawns a army |
6. Other UI Scripts
| MinimapController | Creates and Controlls the Minimap. |
| MinimapIcon | Formation Icon on Minimap. |
| FormationUI | UI Element for every Formation, selects Formation on click. |
| HoverUI | Displays Formation data on Formation Hover |
7. Other Animator Scripts
| AnimatorLODManager | Controls the Animators framerate based on distance |
| AnimatorLODSettings | Settings used by the AnimatorLODManager |
| AnimatorLOD | Script on Unit that holds the Animator reference |
8. Audio
| AudioManager | Manages the Playing of Audio |
| AudioDefintionSO | Stores Audio data and settings |
| UnitAudio | Stores references to choosen Audios |
| UnitAudioArcher | Stores references to choosen Audios + Archer shooting Audios |
9. Flag
| FlagManager | Rotates all Flags to the camera |
| FlagController | Holds the Flag reference |
10. Visualizer
| Visualizer | Holds the reference to the Linerenderer and VisualizerSO |
| VisualizerSO | A superordinate class for visualizing. |
| PathVisualizerSO | Shows the path a Formation takes |
| MeleeDetectionVisualizerSO | Show the FormationColliders current size position and rotation |
| ArcherVisualizerSO | Shows the Archers Detection trapez |