Making a Boss!

The game is almost ready to be released! Woo! Right now I’m going through a playtesting phase, trying to work out the kinks and catch any really nasty bugs. In the meantime, here’s a post about how I created one of the more involved bosses in Bleed! (There’s a video showing the whole process at the end of the post. Skip there if you don’t like to read!)

.

The boss is Battalion, a shape-shifting hive-mind swarm of aliens. They attack by fusing together to create different objects, kinda like the Bat Company from Dawn of Sorrow, or Mega Man’s Rainbow Devil. So, first up, coding an ‘intelligent’ swarm!

 

I started by creating a kind of “controller” object to co-ordinate the swarm, shown here as a red square. Every object in the swarm tries to keep within a certain radius of the controller — if it moves outside that radius, it changes direction to head back in. I tested this behaviour with only one object in the ‘swarm’ at first (not really a swarm at all), and then added more in when I thought it was looking good. It resulted in a roiling, seething mass of objects! Cool!

.

I am the next DaVinci.

Next, to create the illusion of them joining together to transform. The radius of the swarm can be adjusted, so it’s really a matter of quickly shrinking it so that they all zoom towards the center. While they rush into the center, I take the object they’re going to turn into and scale it up while fading it in to existence. It’s sorta convincing! I tested it with a random sailboat I drew.

This is the beginning of the boss’ “AI”. Most of the bosses in Bleed have a pool of behaviours they can draw from, including a default “idle” behaviour, which is basically what I’ve just described. The controller flies around and the swarm follows, then fuses together and chooses a new “attack” behaviour. Whatever attack they choose will appear and begin. When that’s over, the boss returns to the idle behaviour.

.

Now I have to actually code these attacks. The first thing I do is brainstorm all the random attacks the boss could perform, and try to figure out which are the most interesting and unique to fight against. Here is a picture I took of some of that brainstorming (I work on a whiteboard a lot because it’s fun). Among the ideas I liked were a bomb, and a missile.

.

I started with the bomb attack, which was very simple. The bomb appears, bounces once, and explodes into a spray of baddies. I drew up a four-frame sprite sheet for this — four, to take advantage of an animation technique called “squash and stretch”. The bomb stretches as it falls through the air, and then squashes against the ground. It makes the object look more bouncy and interesting, and I do something sorta similar with the swarm fusing together. The radius actually expands before it shrinks, making it more dynamic and readable. Look for it in the video!

 

.

From there I coded and designed the other attacks, making sure they transitioned well from one to the other. I don’t want to give away all the attacks, so here is the sprite sheet for two; the bomb and the missile. You might notice the sprites are all greyscale. That’s so I can use code to tint them any colour I want, meaning Battalion will change colour as it changes shape!

.

I then added a bunch of fancy sounds and particle effects that help sell the transformation / attacks, and notify the player when the boss is being hurt successfully. I also tune the boss for different difficulties. For example, take the missile attack — Battalion moves faster and spawns more of the smaller baddies the harder the difficulty. (Maybe that doesn’t sound like much. On the hardest difficulty, the missile moves faster than the player does, so you have to keep faking it out while dodging through a mess of spawned baddies. It can get pretty intense!)

Finally, I playtested it a bunch and made adjustments based on that. For example, most people found the boss to be fairly easy even or higher difficulties, so I changed the smaller baddies that spawn during attacks to home in on the player, which they do more quickly on harder difficulties.

.

And, well… that’s it! Here’s a video showing the whole process! Thanks for reading!