Saturday, November 24, 2018

Araknoids DEVLOG #1: Spider Animation

Couple years ago, I saw this excellent GDC talk about an indie's approach to procedural animation. I was amazed at the wide range of possibilities based on clever usage of procedural techniques. It stuck with me since then.

I started researching the subject recently, with the intent of improving Spider Engine's animation system. I explored Inverse Kinematics, and implemented the FABRIK algorithm. Here it is, running on a 6 bone structure:

I used this technique on a more complete example, and created a walking creature, with a procedural walk cycle and an IK simulation on each leg.

This is how the concept of Araknoids came to life. At this point, I knew I wanted to make robot spiders that steal each others legs. It's just the logical conclusion from here!

Fake Inverse Kinematics using Key-frame Animation

I invested more in the animation system and decided to replace the IK simulation on spiders with simple key frame animation. This is relatively faster and will scale better to simulate more spiders with more legs. Here is how it works:

I created different key poses in the Spider Editor. A pose is simply a hierarchy of entities.
3 poses representing the extension states of a leg
I implemented interpolation between them (by interpolating the local rotations of each entity), and orienting the root entity to wherever the "IK" target is. The final result is acceptably close to what an IK simulation would give, and reacts smoothly and naturally to changes in the "IK" target's position:
Interpolating between poses using the "IK" target's relative Z position as a factor

Orienting the leg towards the "IK" target

Interpolation + Orientation = Fake IK in 360 degrees!

This is pretty much the technique used for animating spiders in Araknoids! Here is a preview of applying this technique to an actual in-game character:

Thank you for reading! I will post more updates through the development.

Here are handy links to follow the progress:

- Araknoids home page:
- Youtube: Araknoids on Youtube
- Facebook:
- Twitter:

Showing Araknoids at MIGS and MEGA

We showed Araknoids at the MEGA festival on November 9, 10, 11, and then at the MIGS conference on November 12, 13.

I'm glad we participated at those events, as it forced us to prioritize, clarify the concept, explore an Art style, and ship a playable prototype to the public. Specially at MEGA, which was open to the general public and all age groups (MIGS was more for professionals and students). I was specially thrilled to see parents bonding with their young children over the game. Hundreds of people played it, but I particularly remember some: There was this 3 year old girl that kept coming back, and would make a huge scene each time her parents wanted to take her. There was this groups of 4 teenagers that came several times and played against each other, they were very intense and fun to watch. Seeing people bond over the game is just immensely motivating!

We produced this prototype in about a 2 months. I spent the 1st month coming up with the concept, building the mechanic, and the tech for procedural spider locomotion. Then my friend Abdel agreed to join, and we worked over the 2nd month on mostly the graphic part.

We didn't have time to do a lot of polish, but what we had was enough to show. Will people enjoy playing as spiders? Is the game fun? Is it balanced? Talking to hundreds of people who played (even re-played) the game certainly helped answer some of that, and helped clarify the direction for the entire project. Here is a preview video and couple of screenshots.