I have been working out ideas on how to make dynamic chase hunting possible with the limitation of scripted interaction animation. The sad news is – the more I work on it, the more worried I become. In short, it boils down to technical difficulties that require committed Devs work as it is both challenging and overwhelming. I can’t figure out any easy shortcut I’m afraid to say.
Please let me try to explain here what the difficulties are. Perhaps you guys can think of ways I couldn’t. In scripted interaction animation, the movements are fixed and need to be in-sync. The synchronization needs to be done on the starting point of the animation – Subjects need to position themselves properly to kick start the animation in such to have a smooth continuity. In terms of positioning, there are four variables that need to be taken care of:-
- Speed of the subjects
- Relative Orientations (angles) of the subjects
- Relative positions (distance) of the subjects
- Deformable motions of the subjects
It is precisely the last variable that causes my head to explode! As we all know, the Dinos in our game are so beautifully animated – they are non-rigid bodies with flexible movements. To put things into perspective, consider this, a T-Rex is doing its killing animation with a Para. Currently, the interaction animation starts with both of them in static stances or at least the Para in a complete static stance. It follows by a T-rex charging towards it, spooked it, a brief chase happens which finally lead to a swinging neck flipping kill. Precisely, why does the animation has to start with Para in a complete static stance? The answer lies on relative Deformable motions of the subjects. If the Para is running initially, there will be infinite combinations of relative deformable motions. For instance, if we consider the running to be a 360 Degree circular motion of the hip joints, several example combinations are:- 10 Degree Para, 250 Degree T-Rex; 15 Degree Para, 260 Degree T-Rex; 70 Degree Para, 120 Degree of T-Rex; so on and so forth…..It is impossible to deal with infinite combinations (without a sophisticated equation) and hence they freeze the Para……
Putting aside the problematic last variable first, the first three variables can be dealt easily (not without problems and additional works though) through what I call a buffering interaction animation, that precede the finishing touch. In this state of the animation, the purpose is to align subjects’ speeds, relative position to synchronized states to kick start the finishing move. To do this, we first must have 4 different running modes:-
- Sneaking (This is for ambush hunting, not related to chase hunting)
- Walking
- Running
- Sprinting
Ideally, these modes must have the ability to deal with varying range of speed. For instance, running can have varying speed from 10 mph to 25 mph; Walking – from 0 to 10 mph; Sprinting – from 25 mph to above, for examples. Without this feature, the chasing mechanic will look rigid. For instance, if they both run at the same speed, how interesting can things be? Yes, it still works with head start or strong/weak finishing but the mechanic is not lived up to its full potential.
Anyways, as said, this varying speed feature is not without its problem. In fact, the problem is kind of the same with the problematic deformable motions, how can we deal with infinite animations of varying speed? (I will conclude these with a naïve suggestion of mine at the end)
At the moment, providing there are varying running modes and speeds, things can be extremely engaging as you see. The success of the chases depends on:-
- The average speeds of the predator and prey
- The ability to accelerate to top sprinting speed
- The endurance or power to sustain sprinting mode
- The endurance in general (running speed drops with prolonged action)
- Head start conditions (distance when the chase starts, related to ambush hunting mechanism)
- Tight turning ability for evasive maneuver (governed by centrifugal acceleration law)
In short, by having different running modes and speeds, this essentially turns the game into a car racing game. Imagine the possibilities. An unrealistic expectation of course but who doesn’t want that?
Now, back to earth for a moment, I already lowered my expectation on the quality of interaction animation. The finishing touch doesn’t have to be angle depended. To make things easy for the Devs, the finishing touch always proceed with a single angle – the predator will always finish the prey from the back in a straight line. This implies the chasing AI of the predator is simple – it always tries to get to the back of the prey. It simply follows the prey motion all along. The prey, on the other hand, can use some smarter AI, such as tight turning (as stated above), and avoiding running itself to a dead end. Preferably, as proposed by Alan Grady on the other post, the prey aims to run into the forest to lose the chases.
With the above implementations, these solve the first 3 variables mentioned at the beginning. With the chasing from the straight back mechanism, this solves the relative orientation variable. Things will proceed with the buffering animation state, where the speeds of the subjects will be adjusted in such to be in the desired speeds of the scripted final killing animation, along with the distance between the two. In short, this mechanism requires the Devs to animate different running modes and account for varying speeds. Those are the challenging tasks.
Now, back to the dead end, animation wise, how do we deal with varying speeds and infinite combinations of deformable bodies? To be honest, I have no clue. I’m not an animator and this work is tedious to the bone. However, one naïve suggestion I can think of is to develop an approximation programing algorithm. I have no knowledge on the details of game programming so I can only speak things in terms of general concept.
Right off the head, I would first animate a few specific conditions. For instances, for varying speed of running mode, I will go with 10 mph, 15 mph, 20 mph, 25 mph. For deformable motions of subjects, I will animate a few specific combinations – animations start with T-Rex on its left foot, Para on its left foot; T- Rex on its left foot, Para on its right; T-Rex on its right foot, Para on its right etc. Through recording the positions of the joints, I will use either a Fourier expansion or a Taylor series to extrapolate in-between scenarios. Through a series of continuous approximation, realization, and continued approximation, a larger number of animation sets can be obtained. At the end, there will be two choices.
- First, is to use the obtained sets. This of course, is not an ideal solution as it is impossible to get an infinite number of sets. Things in between are forced into the nearest set. In this method, we will have instances where the running looks unnatural in such that the Dino is floating or skidding.
- Second, is to use the optimized equation itself. The problem with this is the difficulty to incorporate such an equation to the already existed animation engine. (By the way, I truly appreciate the existing animations as it deals with slopes so flawlessly)
Okay, it was a lengthy writing. This is all my thought on how to improve the hunting interaction animation. I hope it does give some insights to the Devs or it will spark some discussion on how to work on this further. By the way, the last thing I want to hear is insulting or ask me to set my expectation accordingly. I’m very happy with the game. I’m just looking for discussion to make this an even better game.