Procedural Animation: Rope Physics
Since I'm still learning how to draw, I played to my strengths and animated a creature with almost nothing but code! In doing so, I realized I could make its motions more meaningful thanks to how integrated the animations are with the game physics. For example, the creature only grabs handholds that its eyes can pick up, and moves faster for each connection it has.
The hardest part by far was the rope physics. At first, I thought using distance joints alone would be enough, but the joints behaved in ways that could not be accounted for when stretched too far. Switching tracks, I implemented custom rope physics with a verlet integration. This came at the cost of arms not being able to collide neatly with levels, but I figured that would have made it get stuck or be heavy on performance either way.
Conveniently enough, the creature shares a lot of its code with my level generator. The same constraint solver that populates tilemaps is also responsible for managing the thickness of its arms, and the same method that validates level rooms can also track its hands.
Rope physics are probably going to be a staple in this style of procedural animation. By extending the distance between rope segments, they can behave like leg bones, and by flapping them in the air, they can behave like wings. I'm excited to see what other creatures I can make!