Video link: https://youtu.be/B0PNQDS48_I
We’ve made good progress with the new wolf fighting game mechanics that we showed a few weeks ago, working on both the larger fight scenarios (what happens when you win or lose a fight) as well as the actual interactions between the wolves — which has definitely posed some challenges. I’ll let Tommi describe them:
As Tommi was working on all that, our wolf artist Steve created a set of fighting animations for attacks and defenses. We still have some fine-tuning to do, but overall the fighting gameplay has come a long way since the first video we posted!You may have guessed it but this was harder than you'd think. There's a reason why computer games generally steer clear of hand-to-hand physical struggle such as wrestling, in favor of quick punches and swings of a sword, or better yet, safe shooting from a distance. With those, you don't need to worry too much about matching the body movements of the two combatants beyond being kind of in the general area of each other. But we wanted to have those teeth really bite into the other wolf and make it look good. To achieve this, we needed to use several methods together:
1) Inverse Kinematics
This is the technical term for when, after applying animation, a character's body is modified to better match its environment. The classic example is walking on stairs. A standard walking animation is made for flat land, so using that, as is, on stairs looks bad. So IK is used to lift a foot (or lower the other) to match the stair it's standing on.
We use Inverse Kinematics for various things, but in case of fighting, the interesting part is IK on the jaws. As you bite into an opponent, and it struggles, your teeth follow the animated bones of the opponent, creating a seamless contact without having to animate everything in sync. Unfortunately, our IK solution, Final IK, has no standard solution for biting, so we had to come up with our own, and it's pretty delicate to get working right when biting different bite points of different animals of different sizes, while they're playing different struggle animations. But I think we've got most of the oddness sorted out.
2) Bite Points
Because of the reasons described above, it would be quite difficult to make it possible to bite any arbitrary place in a body. And it also happens that in reality, some parts are simply better to bite than others. So we defined a number of Bite Points for each animal, 6-8 per animal. We had to carefully choose and position them to match our animations — if the bite point is, say, too much higher than the animation assumes, the IK is pushed past its limits and looks stretched and distorted.
Another fun little problem was determining how the Bite Point gets chosen when you attack. On the surface, it's simply based on the angle between the attacker and the defender - the closest Bite Point more or less. But should you get the neck only if you attack directly from the front — say, with a 20-degree tolerance — or should you be able to attack it from the side as well? We ended up giving it a fairly wide range, but that means a smaller range for other bite points. And what if the defender spins around just as you're about to bite?
3) Attacker placement
Once we know which Bite Point we'll bite into, we need to determine where the attacker's body is going to be. It would seem obvious - wherever it was when the bite started. But, you guessed it, that may not look good. If you're, say, coming from the front of your opponent, but the Bite Point has been set up so the wolf will bite towards the right, the head will end up awkwardly twisted. So we had to define angle limits for each Bite Point, within which it looks at the very least OK, and then shift the body there if needed. Somewhat clumsy but hidden well enough by the animations and the hectic nature of the melee.
And then we also need to keep the wolf's pivot at the right distance from the Bite Point, so as the opponent — and with it, the Bite Point — moves around, the IK doesn't end up stretched or crumbled up. So the attacker tends to move back and forth and sideways in sync with the Bite Point, again hidden away by the animations.
Next we will apply everything to combat with other competitors such as bears and cougars. We will also use these techniques for interactions with larger prey.
Some questions answered:
* Yes, you can now fight with stranger wolves.
* No, we will not be adding wounds and lots of blood. We are mindful that WolfQuest is for a wide range of players (and parents). Also, our wish list has so many other things we would rather spend our time and budget on than gore.
* Yes, fighting coyotes will be more interesting than in WQ 2.7.
* No, you can’t fight your mate or hurt your pups even if they really annoy you. For better or for worse, they are family.
* Yes, an optional PvP will be coming to multiplayer in the future!
* No, you can’t kill bears in the game since this is so unlikely in real life. Wolves just don’t kill bears. But yes, bears can still kill you.
* Yes, a new cougar model is coming.