Friday Rewind #7: Sliding with mecha bears

26.4.2019 – HP Noronen

 

Time to rewind and take a look at some of the recent improvements to the game.

Quadruped movement and inverse kinematics

One of the hardest nuts to crack in games is natural looking movement for quadruped creatures. Even though our game does not have that many of those (at least not yet), there is one that is really massive and therefore all the issues with movement show up even more clearly. That one is our mecha bear.

We’ve had two major issues with bear movement. Firstly, we’ve struggled with the monster’s feet sliding very visibly during turning. In addition, matching our turning animation blending with the character’s actual facing has been pretty clunky in many cases.

Lately, we’ve been working on improvements for it, and we’ve made some nice progress. First of all, we decided to implement IK (inverse kinematics) for the feet to ensure that there would be less sliding due to terrain itself. For that purpose, we picked Final IK from the asset store. Even though Final IK had some initial issues, such as its quadruped grounding scene bugging badly, it ended up being reasonably easy to get a first draft running with it, and in a couple of days our bear was walking quite nicely in uneven terrain. So far, it has proved to be a very good addition to our toolkit.

Some clips of the smooth progress to get IK working as it should

 

However, the foot sliding and clunky turning were still major issues. To tackle the turning, we once again went with IK and configured the character’s head to use Aim IK. At the same time, we totally got rid of special turning animations and only used the standard walk and run cycles in combination with Aim IK. In addition, we made some changes to turning and path prediction logic for the AI. When these were combined, we were looking at quite nice, smooth turning animations, which was a huge improvement over earlier.

Smoother turning, but with foot sliding


As the foot sliding was still an issue, we decided to go and implement a small extension to the IK system that allows us to “glue” the grounded feet to the same spot on the round until certain conditions are met. As this is tied to the IK system itself, it helps the feet to stay on the ground a bit better when turning. This does cause a bit of jerkiness and snapping in some cases, but with some smoothing it’s not really a problem anymore.

Tackling foot sliding with our own "glue"

 

So, it’s been quite a task, but there’s been lots of progress as well. There is still some work to be done getting the movement to look even smoother, and to get rid of some bugs that still happen with rewinding IK, but we are getting there for sure. One thing that I’d still like to try out is to blend our current attack animations with aiming IK, to get turning while attacking to look more smooth and natural. However, that is such a level of polish that it remains to be seen if we’ll have time for it.

 

Improved fog of war

As discussed in our earlier post about fogs, one of the fogs that we use in game is fog of war. It’s both a visual treat, and important in hiding areas that the player hasn’t investigated yet, where we may have surprises waiting to be revealed only at the right time. 

For fog of war, we have used a 3rd party volumetric fog plugin that is also available in the asset store. The plugin has worked quite nicely, but it’s also had a blocky look that’s not quite on par with the rest of our environment graphics. We decided to give an updated version of that plugin a try. With the new version, we have a more smooth look for our fog (in addition to some other improvements).

Comparison between the old (below) and new (upper).

 

Are you interested in hearing more about the development of Iron Danger, or having a chat with us?

If so, you are most welcome to join our Discord server at https://discord.gg/IronDanger

 

Also, please remember to subscribe to our mailing list. You can even win a free copy of the game through that!

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *