— I combined the bullet behavior with an adapted algorithm by rojohound that pushes objects away from each other.
Every iteration, each of those green guys is given a very basic order that determines how close they should attempt to get to the player, which prevents them from all competing for a space within attack range. It isn't optimized yet, but it does work.
Currently, the push away algorithm works well, but is extremely costly when dealing with a large number of enemies.
For perhaps 16 or so, this should run fine on most devices.
Hence I'm trying to think of ways to streamline how "collisions" are handled. Currently, it is implemented by iterating through each and every object and testing its relative position to every other object besides ones that have already been checked.
I know there has to be a better way that looks just as good. Otherwise I'd settle for capping numbers of entities.