Procedural Climbing in Unity
By: Brian - UpRoom Games founder
Free Technical Demo Download
uproomgames.itch.io/procedural-climbing-tech-demo
Update (11/15/2021)
You can check out our dev log about the game this system is being used in here
Introduction
This dev-blog (not really a “log” but very “dev”) is about something very near and dear to my heart, and in some ways has been almost 9 years in the making. Back in 2012 I played my very first Assassin’s Creed game with the release of Assassin’s Creed III. While I had played many third person adventure games before, I was absolutely floored by the traversal system in that game. The movements felt so fluid, and the structures you could climb were so varied that it almost seemed impossible. Being relatively new to programming, I obviously decided that it would be a good idea to try to create my own climbing and traversal system to rival the one in AC3. This was stupid. Unfortunately for me I wasn’t experienced enough to know just how stupid so I went on ahead and downloaded the free version of Unity (back in the day there were separate versions of the engine.) Since I “already knew how to program” I figured that I just needed to slap some code into a game engine and hey presto I’m basically already done. This was not the case. However, after many many hours of trying to learn the engine as well as animation, game physics and a host of other things I finally had my prototype. I tried to find this prototype for this post but unfortunately (or fortunately I guess) it is lost to time, so I’ll do my best to describe it. What I wound up with was a single scene with a humanoid character model and 3rd person camera (so far so good.) There was also a cube that was a very specific size, and if you ran up to the cube and pressed a button you would sort of slide up the surface while performing some sort of mantling animation from a raw mocap data set Unity used to provide. I didn’t really know how to properly retarget the animation so most of the character would actually animate and maybe 40% of the time you would actually wind up on the cube, the other 60% of the time you would sort of slide back down to the ground after the animation completed. Basically a 100% success, definitely better than Assassin’s Creed. As terrible as it was, this prototype didn’t discourage me nearly as much as it should have. I felt much more confident that I really understood the problems involved in creating a climbing system, certain my next attempt would knock it out of the park. It didn’t. In fact the next 3 attempts had major issues, so much so that I wouldn’t call them successful in any way other than as learning experiences. I want to go over these intermediate systems since I think the concepts involved are important and the attempts are pretty representative of the approaches a lot of people seem to take when making their own climbing systems. If you just want to get into the technical breakdown of the procedural system in the demo please feel free to jump directly to The Procedural One.