Hi!
In a 2D game where the enemies are coming along the same "line" (axis), how do you handle the enemy AI when it comes to attacking something? Do you let them pileup inside each other or do they wait for their turn to attack? So far I have come up with 3 ways do handle it:
1) Let the enemies pileup inside each other when they stop to attack. Problem: Can be difficult to know how many enemies there are in a pile.
2) Don't let them go inside each other. Stop enemy B when it hits enemy A that is already attacking, but have enemy B either waits to attack until A is gone or add the damage to the damage A is taking. Problem: This can create a very long train of enemies.
3) A mix