LSCS: Components

In the following every Component for the Large Scale Formation System is shortly explained

  1. Neccessary Managers / Controllers
CameraControllerControlls the Camera movement and rotation based on player input
FormationControllerControlls the formation placement by the player aswell as highliting and visualizing formations.
GameManagerControls spawning and gameover conditions. Handles Unity Jobs. Calculates Player and Enemy strength
UIManagerHandles every UI except Minimap

2. Formation and Movement

FormationThe main script that manages a group of units. It controls the status (Idle, Moving, Engaged), the waypoints and the grouping of the units.
FormationColliderRecognizes other formations and initiates combat
CohesionJobA Unity job that adjusts the speed of individual units based on their distance from the waypoint.
FindClosestEnemyJobA unity job that calculates the nearest enemy for each unit in a formation.
RotationJobA Unity job that calculates the rotation of all units in parallel, based on their state and speed

3. Unit and Combat

UnitThe core script that represents a single unit. It manages the health status, the status (Idle, Moving, Fighting) and is a middleman.
UnitDataSOA scriptable object that stores the basic statistics and settings of a unit (e.g. health value, movement speed, weapons).
CombatBehaviourSOA superordinate class for combat systems.
MeleeCombatSOThe implementation of melee movements and attacks.
AcherCombatSOThe implementation of Archer movements and attacks as well as melee.
CavalaryCombatSOThe implementation of Cavalrymovements and attacks.
ElephantCombatSOThe implementation of Elephant movements and attacks as a Example.
CombatPlacementSOA superordinate class for the placement of units in battle.
MeleeCombatPlacementSODefines the boids logic and the placement of melee units in combat.
MeleeCombatPlacementSOoldDefines the position of units in combat not on boids but based on an algortihmus
DamageModifierSOA script that adjusts the damage as some formations are better or worse against other formations. Calculates the total damage.
UnitTypeSOUsed by the DamageModifier and AITactic to define general Unit Types
RangedWeaponRanged Weapon on the Unit
RangedWeaponSOA superordinate class for the creation of Ranged Weapons.
IBowSOBow Weapon

3. Animation

AnimatorLinkCalls the actual Animation on the Animator. Can be used to switch between Unitys Animation system and a Custom Animation system
AnimatorLinkCavalryAnimationLink for Cavalry
AnimatorLinkLODManagerControls the automatic switching betwen Unitys Animation system and a Custom Animation system
RelayAnimationEventRelays Animation events to the Unit script or Unit Audio

4. AI

AICommanderThe central manager who makes decisions and assigns tactics to the AI formations.
AIStrategySOA scriptable object that stores the rules and tactics for the AI.
AITacticSOA superordinate class for all AI tactics.
Tactic_EstablishFrontLineA specific tactic for forming the front line and attacking enemies.
Tactic_ArcherTargetSelectionA specific tactic for Archers to attack best targets.
Tactic_FlankWithCavalryA specific tactic for flanking.

5. Army

ArmyThe actual Army data. Holds formation and current Troop data.
ArmySpawnerSpawns a army

6. Other UI Scripts

MinimapControllerCreates and Controlls the Minimap.
MinimapIconFormation Icon on Minimap.
FormationUIUI Element for every Formation, selects Formation on click.
HoverUIDisplays Formation data on Formation Hover

7. Other Animator Scripts

AnimatorLODManagerControls the Animators framerate based on distance
AnimatorLODSettingsSettings used by the AnimatorLODManager
AnimatorLODScript on Unit that holds the Animator reference

8. Audio

AudioManagerManages the Playing of Audio
AudioDefintionSOStores Audio data and settings
UnitAudioStores references to choosen Audios
UnitAudioArcherStores references to choosen Audios + Archer shooting Audios

9. Flag

FlagManagerRotates all Flags to the camera
FlagControllerHolds the Flag reference

10. Visualizer

VisualizerHolds the reference to the Linerenderer and VisualizerSO
VisualizerSOA superordinate class for visualizing.
PathVisualizerSOShows the path a Formation takes
MeleeDetectionVisualizerSOShow the FormationColliders current size position and rotation
ArcherVisualizerSOShows the Archers Detection trapez