I took the entire week between Christmas and New Years to work on some critical remaining features for the MOSS (Mythruna Open Source Software) libraries. I had foolishly hoped that this particular feature would go more quickly and I could have spent the week doing cool stuff.
…such was not the case.
After a solid week of heads-down coding, I finally had something working earlier this evening only to discover a critical flaw that almost made me throw it all away. Fortunately, clearer heads found a work-around and now I can say that it works.
The short version is that this is similar to the work I did with Jaime and bullet as far as “reactive animation” goes. The tricky parts are that a) this works with my custom zoned physics engine, and b) it’s networked.
A driver object on the RigidBody that controls the AI, etc. decides what animations to play and how fast based on velocity, collisions, etc… then updates the collision shape hierarchy with the animation playback. This playback information is also sent across to the client using SimEthereal. The client can then sync the real mesh/skin animation.
Why is this important? Well, it means that the animation frames are synched and tweened just like position and orientation… and it’s all synched together. So they will always match.
Simple in principle. Hard to make it a generic-ish library. In retrospect, I probably could have hacked this into Mythruna in a couple days… 80% of the time was spent working out the design for the libraries.
For the best in the end.