Post news RSS Meet the Warrior, Immortal Redneck's bulkiest creature - Devlog #9

The Warrior is one of our first enemies and also one of the strongest: if he hits you with his giant mace, you’re gonna really feel the pain.

Posted by on

Hello there, nice people of the Internet!. It’s been a little since we talked about Immortal Redneck’s enemies and that’s not okay: you need to know more about them. That’s the reason I’m showing you one of the first creatures we created, the Warrior, and I’m going to do it in depth.

This is a 2D concept of the Warrior. It might seem like a small, fatty creature, but it’s actually more than two and a half meters (about 8,2 feet) tall. The redneck’s about 1,8 (5,9 feet), so it’s huge in comparison to the player. In the gifs below, it might seem small in comparison to the scenary, but it’s just a blank slate for us to try new things. Once we introduce other elements, we promise you everything it will look with the right proportions.

So, what about the Warrior?

The Warrior is a bulky, slow, melee adversary. Obvious, uh? Even if this is the first time you’ve seen it, we hope you can imagine how he moves and attacks. We wanted those three things as part of his design, and our great, awesome, beautiful artist team did a terrific job.

It might not look powerful at all at this moment, that it’s not as scary as it should… but if he it hits you, you are gonna regret underestimating him.

Thankfully, it’s also a very simple character. It’s that kind of monster that you can easily kill with some distance and patience, but that you need to keep an eye on. If you leave one or two warriors moving around freely, they’ll end up surrounding you in the worst possible time and hitting your sorry ass hard.

But how did you make him?

Let’s start from the basics. Once we had the 3D model inside our sandbox/test scene in Unity, we implemented his two planned states: looking for the player and going for it and try to hit him. Here’s the monster, just like that:

To achieve this, we used Behavior Trees for the AI. Since the Warrior was our first monster, we did everything from scratch. It was a slow process, but it was worthy since now we can recycle some of the nodes we created for him with another creatures.

The first step was to make him move. The sequence is simple: the enemy has a node to initialize the Warrrior (this initialization node is being used with each enemy right now) and another one to move towards the player. This is the tree for this step:

It was clunky because the animation was also half finished, but it followed you as intended once it found you.

Since the Warrior can attack while moving, but also still, we created two animation layers for each state. Seriously, we tried to keep it as simple as possible.

Obviously, the Warrior had to move around looking for you with some kind of inner motive, so we added a wander behavior to the mix.

If you look closely to our behavior tree, we also have a selector that chooses between the branch with the highest priority and the others. If he fails to see you, it will just patrol randomly. Pretty easy and common stuff, I believe.

But hey, he has to attack you, too. As a melee enemy, the Warrior needs to reach you before it can hit you. When it starts attacking, the animation and the timing had to be very strict. This was a little bit tricky because we wanted him to start his attack animation a few steps before being at your side.

It would make him look a lot more natural, but it would also make our behavior tree too complex. That’s why we added a custom node with all this stuff inside and modified the seek behavior a bit.

It works flawlessly. Now the monster feels a lot more responsive and smart, even if the animation here is not final. Sorry about that.

And last, the finishing touches. We had to modify the Warrior behavior so it would search for the player while attacking. Without this little change, it would be really easy to just to circle around him and kill it. Look at this silly thing.

To solve it, we modified the last selector so it could spin if the condition given – the player being in front of the enemy – it’s not achieved.

This is the behavior tree with this stuff done:

And this is the Warrior acting like a goddamn unstoppable redneck killing machine:

And that’s it! It’s was easier said than done (or at least, that’s what the programmer told me), but the final results speak from themselves. Our idea is that the Warrior is not a hard enemy by itself, even if it makes tons of damage, but when you have a lot more creatures in a single room, a few Warriors can be a real pain in the ass. Just like this.

Oh, yeah, the skulls. Next time I’ll speak about them, be pacient, please. If you can’t wait for more, you know, we are on Twitter and Facebook all the time. If you ask us, we might tell you more about certain stuff.

pawsiem - - 4 comments

Oh nice:D

Reply Good karma Bad karma+4 votes
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.