Swarm
This is my 2D project while learning Unity. I’ve always liked tower defense games and I think it was a fun game to practice what I have learnt.
I also wanted to convey the feeling of being overwhelmed by hordes of enemies but emerging victorous in the end.
-
State pattern implemented for ally units AI
· Movement state: attacking, moving or idle.
· Attack type state: attacking closest target to unit or attacking closes target to ground point. -
3 enemy types are implemented. Two of them have special abilities:
· Clever Alien (medium size): bullet detection field around it with a medium chance to dash to a nearby position and dodging the bullet.
· Razer Alien (the big one): attraction field for standard aliens (small ones). They orbit around to defend it. -
2 ally types are implemented. One of them has special abilities:
· Freeze Unit: bullets freeze enemies on impact for a custom amount of time depending on the enemy. - Post-processing for bullets effects.
-
Unit selection system
· Clicking ally units select them.
· For each unit selected, its enemy target and ground point (if any) are shown.
· Massive selection of ally units (RTS styled). - Shader for line connecting an ally unit and its enemy target.
- UI: buttons to spawn units (disabling them when reaching the maximum), timer and enemy kills stats.
-
Enemy respawn points and enemy hordes system:
· Respawns can be easily customized in Unity editor (enemy type, quantity, spawn time, position range).
· A horde is composed by several respawns which are created one by one.
· Following horde is started when previous horde is cleared.