I posted a small video of an enemy from Rick Henderson on Twitter few days ago and it gained a lot of traction so i think it would be interesting to post some stuff on enemy design and how i do it.
When i started making Rick Henderson i wanted it to be something unique with easily recognizable enemies defined by their faction, design and modes of attack. With something so ambitious as a one man project that works on more than 50 different enemies, making each ship original can be strained in both design and financial aspects of game development.
Boshin was originally designed as an abomination of multiple Paragon Cult faction enemies, easily identified by their purple color and glowing orbs. I wanted some more ships for that faction and funds for pixel artist were already spent so i had to think of a way to utilize what i already had since my artistry level is quite low. I was lucky to work with an artist who knew what he was doing, had a concise palette and distinct shapes for each faction. So i made a pixel art collage that was made out of other ships' parts in a way that makes it recognizable yet different from other ships.
Harder part was designing the pattern of attack for it. I try to avoid the usual move from right to left while firing pattern, and if i really have to use it i try to be creative with it. This was the case with Boshin.
One of the most important aspects of enemy design in shoot 'em up games is "telegraphing". It is a concept of showing the player that the enemy is about to fire bullets at him. Though not really important for so called "popcorn" enemies (easily destroyable, firing slow bullets rarely) it is a must for enemies like Boshin that fire five fast bullets in a burst. You need time to react, otherwise it wouldn't be fair and you would feel frustrated by getting hit.
So, what could i do with limited time and no further financial resources?
Here is the image of the ship when it comes into screen, with the lower portion of wings with guns drawn into hull. We see it for the first time and we still don't know what will it do. Upon entering the screen, after a random time in a defined range, the ship plays its opening animation. Best i could manage without artist was to simply obscure the lower portion (wing with gun and an engine) and animate it as going out of the ship. Now that we see the gun, we have a clear idea that it will shoot from it. By adding a bright red light we rise the tension by letting the player know that something is definitely going to happen. It goes out of the gun, widens, and the gun is fired with bullets coming out spreading no further then the red light angle implied. To keep things interesting, i put a new bullet type for Boshin and made the bullets rotate and move at random speeds.
Opening animation is another example of keeping it cheap while trying to look good. It's not so big, only 22 frames that were just a few layers of parts moving pixel by pixel. Animation of the red "laser targeting device" is made out of two animations since it's quite large and can't fit in one texture (maximum is 8192x8192). I wanted to keep authentic pixel art feeling so i did it manually, it consists out of 93(!) 128x64 frames, which gives us a sprite sheet that is 11904x5952 pixels in size, hence the reason for cutting it into two parts.
After finishing the basic visuals and a small problem with the sprite sheet size, there were some more technical challenges that needed to be taken care of.
It is not yet implemented for Boshin, but most of the ships have some kind of blinking lights on them. To have animated blinking light and the attack mode activation animation like Boshin playing at the same time, you require animation layers and a bit of tinkering with that too.
Also, you probably don't notice stuff like this, but in the video, lower engine does not have engine jet animation playing. I might be a bit of a perfectionist, but i like things nice and tidy. I can either put a new animation, for example a thruster activating then going into regular loop (which requires yet another animation layer), or put an already looping thruster animation as a child prefab and animating its position to follow the animation, with setting the sorting layer to be behind the ship.
The final issue is the collider. As the ship changes its form, it needs to be able to detect hits on the new, extended part too. That can be either done by the most gruesome way known to man, by editing it in the animation window itself, frame by frame, or by using great free asset from the Unity Asset Store called Advanced Polygon Collider, a tool that automatically fits your polygon collider to sprite based on alpha tolerance and scale. It also does a great job in optimizing the collider by reducing vertices, so you don't have to worry about the performance, at least on desktops.
So there you have it, from a visual idea, to implementation and overcoming slight technical difficulties, a fun and engaging new enemy ship is born.