After 9 years of working for everyone else, I am trying to go out on my own. The games I've thought up over the years now have to come out for everyone to enjoy. Hopefully I made the right choice.

Report RSS Hey, where's the "Swarm"?

Posted by on

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.

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: