Not *That* Kind Of Bug!
Onto the last of the ‘classic videogame’ enemies now, this one draws its inspiration mainly from the wonderful ‘Space Invaders’ style shooter ‘Galaxian‘ and, to a lesser extent, its sequel ‘Galaga’. It’s also heavily inspired by my recent re-watching of Paul Verhoven’s marvellously cheesy Sci-Fi gorefest ‘Starship Troopers’. I’m calling it the ‘Swooper’!
I’d been thinking of doing a Galaxians-style enemy for some time but it was watching the ridiculous (but genius) scene in Starship Troopers where Rico takes out the tanker bug that really cemented the idea in my head. A similar bug would fit perfectly into the Jetboard Joust world and also really suit the ‘Galaxians’ style of attack.
So I started by working on the basic movement style which was really very simple, I use LERPing to rotate the enemy towards the player whilst applying a constant velocity in the direction the enemy is currently facing. This worked fine once I’d tweaked the parameters, resulting on a nice circling motion of the enemy round the player which I felt was quite insect-like.
What was more complex was to get the enemies flying in formation. My standard approach to this kind of problem, and one I also used in this case, is to create a ‘hive mind’ class that manages the positioning of all the enemies. The individual enemies can report back to the ‘hive mind’ with various info regarding their environment but it’s the hive that tells them where to position themselves.
I tested a number of different algorithms for this – the one I ended up with allocates a leader for the hive who operates effectively as a solo entity with the movement pattern I described above. The hive mind calculates the ideal positioning of the other enemies in the swarm and I use LERPing again to move them towards this ideal position as well as to rotate them to align with the leader’s current rotation.
If certain parameters are met some of the swarms member’s will go solo, leaving the pack to chase the player in a more aggressive manner. The hive mind class manages this to make sure the entire swarm doesn’t break up at once.
I was particularly pleased with the way the swarm reorganises itself once one of its members is destroyed or goes solo to chase the player!
The art for this enemy came together very quickly (for a change) – I used the tanker bug from Starship Troopers as my only reference and it just kind of worked! The thing that took longest was getting the rotation of the wings to line up properly when the bugs are in flight. My only slight worry with the art is that I’ve used very dark colours – this makes it look pretty badass most of the time but it might be too hard to see clearly in some palettes.
I was so pleased with the way this enemy came together that I added a smaller version, the Mini-Swooper! This operate in exactly the same way as the larger version only more of them can leave the pack at once and they don’t fire at the player, they just attack them physically. They are also faster.
As a footnote – until looking it up just recently I was always convinced that ‘Galaxian’ was called ‘Galaxians’. It actually freaked me out a bit it was called ‘Galaxian’! Must be one of those collective false memory things like being convinced the Monopoly man wore a monocle!
Dev Time: 2 days
Total Dev Time: approx 255.5 days
Leave a comment
Log in with itch.io to leave a comment.