Devlog – Adding A New Enemy Type

A particular piece of feedback I asked from playtesters were ideas for any new enemy types, as this presented the most potential for introducing variation in play style as well as content.

A suggestion that stood out was adding “mines” to the game, that would have the potential to wipe out several members of the player’s crowd. I also realised this could be used by the player to destroy enemies, too. More options for skilful play was something I noticed was lacking in the current build of the game, so this was an addition I had to implement and test as soon as possible.

Starting with a simple Line2D sprite, I then added code to detect the player entering and start a 3 beat countdown using my dynamic music/beat system.

The explosion itself is a separate scene that emits a particle effect and contains a hitbox that deals damage to any object with a hurtbox. This includes the player, enemies and any ravers you currently have in your crowd.

The particle effects are particularly influenced by Kenta Cho‘s work, particularly the fantastic game Gunroar. In the game, the explosion looks great!

Next I need indicators for the explosion’s blast radius, whether it’s set off and the radius in which the player can set it off. The first is pretty simple with a circle showing the blast radius that I can flash every beat leading up to the explosion:

And drawing a circle around the mine with the same radius as the player detection if it hasn’t been set up (thankfully Godot makes this super easy with its _draw function):

Now the visuals were done I found a big problem in testing: the player’s hurtbox wasn’t registering the explosion’s hitbox by simply instantiating it, and the explosion wasn’t properly deleting itself. The fix for this was to have the hitbox as part of the explosion scene and then manually delete it after a frame:

This physics frame technique didn’t work, but thankfully using a short timer worked for now:

This method hopefully won’t come back to haunt me

Finally, the mines work perfectly and can be a perfect way for players to lose their tail of chasing arrow enemies!