HERE'S A POOR QUALITY VIDEO showing the latest progress.
Contrary to journal posting, I've been quite busy on my current project but tonight I have had to make a major design decision that I was hoping to avoid.
I've decided that the character is going to be grid anchored, like in the Abe games or the original 2D Prince of Persia. I was hoping the character could be free to exist at any location and walk right up to edges/walls but it is causing me too many headaches.
Obviously there is smooth animation from square to square on the grid and it is fairly un-obvious to the player, but the character can now only walk a minimum of exactly one grid square and run a minimum of two (unless it hits a wall, obviously).
This makes a lot of other game logic go from horrendously complicated to incredibly simple.
I still then had the problem of some animations making parts of the character's body vanish into walls so I now have a separate position and draw_position. If any parts of the character now go into a wall, the draw_position only is modified based on my previous work with defining a bounds rect based on skeleton extremities but its physical position is unaffected. Rendering then uses the draw_position.
The end result now feels very robust and stable, unlike the previous attempts, and the code is far simpler.
Certain things are now going to be outlawed by this - free moving platforms will not work for example.
Other things now become pretty trivial though - nice switch pressing animations, picking up objects neatly etc become so easy when grid aligned that the engine almost just becomes an animation scheduler.
Considering the complications that will be created by edge dangling and vaulting, I'm sure I've made the right decision, although it is a shame in a way. Still, Abe and Prince of Persia didn't really seem to suffer as a result of this design so neither should whatever game I end up writing.
I've implemented falling and landing when you run off edges and you stop at edges when walking. Next up to tackle is jumping - there will be two types, a short hop when standing and a longer leap when running. I think I need to overhaul the animation system a bit first though as I had to hack it a bit to get the landing animation to work.
The current system only really plays nice with cyclic animations. There is also a bit of an issue with what happens if the controller gets a BlendInto() signal while it is already blending between two animations. Whether I should store the currently interpolated frame then blend between that and the new animation or somehow play all three together with different weights, I don't really know.