Weekly devlog #41: new enemy type


Before I present some new gifs, a note to all Unity developers: for the sake of performance, you must avoid creating GameObjects every frame - otherwise it will kill your framerate.

I know that I already met this issue when working on other performance tweaks but it turned out there were even more places in the code where I was not paying attention. Basically in every place where I was fading out objects (or manipulating their colors, or in general interpolating some values) I was creating a new instance of interpolation behaviour object. This included fading out parts of fog of war, character messages and so on.

The key was to make sure that no new GameObjects were created - a single one, created at the start of a scene is enough. And it does not tank the framerate.

The important part is that it is the garbage collection code that was causing the most pain. Creating lots of short-lived Game Object instances frequently simply is an anti-pattern I guess.

Anyways, let's focus on gifs. Kurt, as usual, did an amazing job with creating visuals for another enemy type - the heavy rat.

41 walk

This fella spawns on the higher danger levels and is not easy to take down, due to larger number of hit points, and to some armor.

He is wielding a cannot that is basically shooting scrap parts, doing a significant amount of damage. To balance things out, it is a little bit slower than the other enemies.

41 reload

41 shoot

Bear in mind that the combat (well, at least the demo mission I am working on) is not about killing all enemies, but rather gathering as much stuff as possible and getting out. Therefore the player is not obliged to handle the big rats - they can be outrun.

41 evac

41 kill2

Obviously, large rats can also be killed. This one dies from a grenade explosion.

Also, I've added sound effect for this big guy, so my work on the heavy rat is complete.

What's next?

Now that the heavy rat is done I will experiment more with animations for diagonal movement. Parts of the code need to be rewritten to handle it.

Also, Kurt has started working on another - and last - character class: the soldier. This will be a player-controlled character. It is already in the game but is using the same assets as the rogue - I've just simply colored it black for now to distinguish it from the others:

41 theteam 1

The squad in all its glory. The soldier is the leftmost character, using a dark version of the blonde rogue graphics for now.

Thanks for reading!

As usual, if you'd like to receive more frequent updates about the development and a heads-up about release of the demo, follow me on Twitter at @bryquTheDev.

Also, do help me out reaching a bigger audience! Share information about "This is The End" with anyone who you think could be interested in this.

Take care!

Leave a comment

Log in with itch.io to leave a comment.