So one of the biggest issues with B.U.R.N.: Swarm was that it was lacking in the "swarm" department. Performance was crap. I was getting about 10fps with 20 enemies on screen. I knew the issue was with Fixed/Late/Update. I was invoking repeating coroutines in start/awake and performance was the same. Then I found an article on AI taking about Doom. And this is where I met my new friend FSM. So I learned how to do case statements and did this:
MyCaseStatements: [1,2,3}
Start()
{
invokerepeating("MyCaseControl");
}
MyCaseLogic()
{
Case 1; DoThis().
Case 2;OrDoThis().
Case 3;OrThis().
}
MyCaseControl()
{
If this
{
Do this
}
If this
{
Do this
}
}
DoThis()
{
Whatever I want to do.
when this is done...
}
OrDoThis()
{
Stuff goes in here...
}
OrThis()
{
More goes here. When it's done do this.
}
Notice there are no updates at all. So when you see screens of B.U.R.N.: Swarm, you will REALLY see the SWARM part. I'm currently overhauling my boss AI as well. With this HUGE performance boost I can do much, much more on the iOS.