Dwarfinator - Blog

Dwarfinator

Running mobs over

For now I'm in process of adapting the mobs to attack mode. This adaptation includes some adjustments to assets, setting up AI and state machines, as well as adding a bunch of new animations. Animations are required mainly for interaction with the tank, and that's what I got to show today. In general, mobs colliding with tank behave in a similar way to movable objects - the tank simply drags them along until they die, forcing them to use new animations both in the process of dragging and in the process of dying. The damage dealt depends on the speed and weight of the tank; the tank itself also receives damage and slows down according to the weight of the mobs being dragged.

But there are also differences - if a mob manages to get off the tank, it continues its combat activity, whether it's simply running away or using range attacks. If the tank overtakes a fleeing mob instead of running it over, it'll turn and rush in the opposite direction, towards the almost guaranteed escape from the dwarf’s wrath.

Scaring the mobs

At first my plans about mob spawn in attack mode assumed that mobs would run away from the main character’s tank from the very first second of their appearance on the screen. But then it seemed too boring and somewhat illogical - why would they all run away from something they haven't seen yet? So the starting behavior of mobs in attack mode ended up being randomized: some of them leisurely stroll in one direction or another, some saw a tank from afar and are already running away, some stand still, immersed in their goblin or whatever thoughts. And only when those who haven't seen the tank yet finally realize it's coming for them, they freak out and run for their lives. This way the location is filled more evenly, and the player gets a chance to shoot some of those mobs that are still running faster than the tank.

Axe time

Obviously, new characters mean new cutscenes. So I provided the first with the second. And somehow they ended up connected with a story of the Slaughtro axe, showing the story of how Wilfred did aquire it and its use in practice - quite bloody, I must say. As before, the presence of new characters in the story after the first encounter is purely optional, as the dwarf, in a fit of bad mood, is quite capable of hacking to death both Porck and Whelp.

This time I almost managed to keep from traditional modification of the cutscenes and their editor, apart from adding a new command to move the camera, using curves and an anchor, similiar to command moving actors, and adding an autoselection of command names, so that the accidentally entered "dialog_wilfred_5", when the cutscene already contains both "_6", and "_7", simply turned straight into "_8", instead of throwing an error. As the cutscenes in current state can easily contain a hundred or two commands, it’s quite easy to lose count in their names.

Punk rock for punk orc

Every punk orc needs some punk rock! Therefore, specially for Porck, I wrote some. To be honest, I have no idea how well the track I made fits the genre, the main thing is that it fits the character. But I've really tried, putting together distinctive drum sequences, guitars and bass of specific timbres and completing all this with perky brass. I’ll tell you a secret, the track is called “Boar and Dwarf” for a reason, it even has some lyrics, telling the story about the tragic encounter of the dwarf Casimir with a harsh forest pig, preceded his meeting with the main character of the game. But you'll probably never see it, as the lyrics are written in my first language, and I doubt I will be able to translate them to english anytime soon, not even speaking of recording vocal. Anyway, the ingame version of the track remains purely instrumental.

Crawling out of huts

Apart from the updated appearance, goblin huts also received new behavior - now goblins crawl out of them not only when the hut is destroyed, but also just in the middle of battle. No need to worry too much about it though, no rapid-fire goblin birth machine with endless ammunition is sitting inside. In my vision, such a hut can accommodate about five goblins - and a single hut will spawn about that amount in total. And as huts vary in decorations, the goblins inside do too. In a common hut you can meet simple thugs and thieves, and in a more prosperous one - a commander, a shaman, a scavenger and even a goblin slave, temporary provided for use to these fine folks by the Cyclops.

Porck

I am continuing to fill the second part of the first story chapter with minor characters. Meet Porck! Not to be confused with pork. He's an orc. He's a punk. With the same Slaughtro in his hand that Wilfred will inherit, and the Strumlo behind his back, which he use to play - what do you think? - of course, punk rock. His purpose in this world is to hand over the axe to the dwarf, willingly or otherwise. And to add a couple of strokes to the orc tribe image. In addition, I'm planning to make him the first in a number of characters for a new gameplay feature, which I'll get back to later.

Goblin huts

The collision feature required some modifications to the object assets - and that's exactly what I was doing when I stumbled upon the old goblin hut. Instantly I realized - the thing is scary as hell, modifying it will only waste time.

Therefore, I had to urgently draw a replacement. Besides, since the drawing of the old one I had in mind adding more advanced hut for the tougher goblins. So here are two new goblin huts for you at once - more detailed, better adapted for animation, more compact - to better match the scale of both their inhabitants and the location itself, and featuring an entrance and internal space from where the goblins will appear. [goblin_huts.jpg]

Tank collisions

Some of you have probably wondered what dwarf needs a tank for, or why there is "side-scroll shooter" in the game genre. The answer is simple - in addition to the defense against hordes of mobs, the game, since the earliest concept, meant to also include chasing the same hordes, running away as fast as they can. It was implemented in some form in the prototype with the old graphics, but no work has been done on it since then.

But now the time has come for me to shake off the dust from the old designs (and to trash them away, as they are horribly ugly and completely useless in the new conditions), and for Wilfred to finally show everyone who is the boss in this damn forest. And he will start, perhaps, from the nearest pile of rocks.

What exactly am I talking about is the movement of the tank in space and its interactions with inanimate objects - rocks, trees and other junk generously spawned in attack mode. Some objects can be easily dragged by tank to be eventually crushed, others will remain standing in place after a collision and if the damage wasn't high enough to immidiately destroy such object, the tank will stop as well. The tank itself also takes damage in collisions, so in order to carelessly crash through everything on its path, tank must be heavily upgraded. I've spent quite a lot of time trying to make interactions with objects more believable and interesting, taking into account many nuances and adding a number of hidden properties to objects and tank parts that affect their behavior in collisions, and most of this also applies to mobs. But I'll get back to mobs next time.

Wilfred's appearance switching

The trick with changing Wilfred's appearance is ready - from now on, after a certain point in story, he gets a new look, both in cutscenes and in the cockpit of the tank. In the case of cutscenes, everything is simple so far - since they are all sequentially distributed throughout the story, starting from a specific moment I simply use another asset - although in the future there is possibility of implementing cutscenes not tied to specific moments with a dynamic choice of the main character’s model. As for the tank - I had to put some work in it. Now the engine picks dwarf's model based on unlocking of certain story flags, places it in a chair and binds it to its animator. And by excluding the hero’s model from the engine assets, I obtained the basis for the feature planned for the next story chapters - additional engines in the tank without the dwarf sitting in them.

Forest Wilfred

The idea of gradually change the appearance of the main character through the story hit my head quite some time ago, but it remained rather in the “it would be cool” section. What made me bring it to light and implement was the recently written cutscene of the victory over Bonecracker, in which Wilfred needed an axe. And if you give a dwarf an axe, he's going to ask for some armor too. So in the second half of the forest location, Wilfred will be a little more protected and dangerous even without a tank. At the same time I slightly updated his basic appearance - no drastic changes, just added a little depth. Actually such update would not hurt a number of other characters and mobs, but whether their turn will come is still unknown. But for Wilfred, as the main character, and besides, drawn 5 years ago by me, who just recently took a pen of a cheap small tablet in hand at that time, this was clearly necessary.