Hail Insect God & Coding in Godot


MEGA SPOILERS! This blog post goes over the final boss fight in the game, so please skip if you don’t want to read about that!

Hello everyone! I’m back yet again with a new blog post as I hit a new milestone in the development of the game (Lair of the Insect God for all of you who don’t already know). I completed the final boss fight (where you finally battle the Insect God)! In this blog post I’m going to go over what went into the making of the boss fight and then I’m going to end off with some musings about coding in Godot and my general (lack of ) experience when it comes to programming.

This blog post is coming a bit later than the previous ones because I had to take a break from working on the game for a couple weeks as I made a new short film! It’s currently title The Last Falcon and I’m hoping to be sending it around to film festivals soon. You can follow my personal social media accounts (@dasegad) for more info on that.

Making the Insect God

Fightin’ the Insect God

This one was a doosy! I’ve discovered in the process of working on this game that making things “difficult” in a game is actually really easy. What’s very hard is making something easy enough to complete but challenging enough to make it seem like it’s hard. This boss fight definitely tested my design skills on that – I suppose it’ll ultimately be up to you players to decide if I succeeded!

For this fight I knew it needed to be difficult as it’s effectively the very end of the game – the last great big challenge the player has to overcome. My design thought behind it was to “weaken down” the player before the main fight even starts by throwing several waves of normal enemies at them.

In the game the player is going to get a special ability known as “Methul”, which effectively is the BFG of this game (for those who have played Doom). The ability takes a very long time to charge up but when used it kills everything on screen (that’s not a boss).

Unleash the Methul ability!

The items/abilities in this game charge by striking enemies. So the way the fight initially plays out is that the player will have to fight wave after wave of standard enemies until their Methul ability charges and they can release it. The player will need to do this 4 times before the Insect God fight will occur.

In the level the Insect God sits on a thrown in the background and each time the Methul ability is used parts of its face blow off, until a skull is revealed underneath. When the skull of the Insect God is fully revealed, it flies to the foreground and starts attacking the player. As the waves of enemies are getting launched at the player the Insect God in the background will also occasionally throw attacks of its own at the player, including a poison fog spray that briefly covers the level, a fire ball storm and a distracting bug face that blinks “Obey Insect God” on it and covers the screen for a couple seconds.

For this first part of the battle, getting the correct balance of what standard enemies should be launched at the player in what wave took a long time to get right as I wanted the player to get beat up but not TO beat up before the final fight. There wasn’t really much of a science to figuring out the right mix in the enemies waves other than just basic trial and error with lots and lots of replaying the section.

Obey Insect God

Once the Insect God actually engages with the player the fight plays out with a large number of attacks including the previously mentioned fog breath, fire ball storms and distracting face – but also adding in an arm/leg swipe attack and a large laser beam it can shoot from its head.

The Insect God is very tall, so the player will need to try and position themselves on platforms scattered throughout the level in order to have their attacks reach. Outside of that, the main way to take down the Insect God will be to just wail on them with various attacks until it dies.

The Wonderful World of GDScript and Godot

Now to get into coding. Godot uses a type of scripting language called “GDScript” which is unique to the engine. GDScript is nearly identical (I’d say like 95% similar) to another coding language called Python.

Prior to working on this game I had extremely limited experience with programming at all. I had told the story in a previous blog post, but I’ll give a summary: at my day job they had a big push to have us all study Python – so I had taken 3 months of online courses on Python about 6 months prior to starting the game (I studied for about an hour a day 5 days a week). At the end of the 3 months – I couldn’t really code at all. However, what I could do was follow tutorials and code along with them, which was enough for me to get started coding in Godot. The fact that Godot basically uses Python as its coding language was the primary reason I selected it as the engine for this game.

A whole lotta if/elif/else

Now, having experienced coding for the game for going on 3 years next month I can definitely say I’ve gotten “better” at it, but I still very much feel like I don’t really know much. Basically all I really know how to write out are if/elif/else statements and basic functions (which in turn also just trigger more if/elif/else statements). This game is literally just thousands and thousands of lines of if/elif/else statements at this point. My assumption is that this probably isn’t normal when you have a real pro coding out their games…. but I’ve never actually looked at much code for pro-made games so I guess I’m not sure?

In either way, the world of coding is very interesting to me the more I’ve been digging into it. Effectively (as far as I can discern) the process of coding is the process of constructing an enormous logic puzzle or decision tree that doesn’t contradict itself (or more realistically – contradicts itself minimally). Writing out the actual syntax of the coding language hasn’t really been that hard for me – but working out how the logic flows was a HUGE learning curve, particularly given that I don’t really have much in terms of formal education on doing this and absolutely no experience up to this point either.

I used to think that coding was very much a hard science. Things have to be scripted out in a certain specific way to make certain specific things happen. However, I have come to realize that coding is VERY much an art form. Once you have an understanding of the syntax of the programming language, there actually aren’t that many rules. You come to a realization that there are many many different ways to code something out – and most of them will work or are valid. It ultimately comes down to what is the most efficient and effective way to do it for your specific project.

I still have a very long way to go in my coding journey, but I still feel a bit proud of myself to have actually been able to build what I’ve built so far after effectively starting from zero.

That’s all for this point! See you guys next time!

As always you can see video of the Insect God boss fight on my social media channels (linked in footer).

-Charles


Leave a Reply

Your email address will not be published. Required fields are marked *