I am currently writing a 2D skeletal animation framework and currently I am a bit stuck on a few things.
a. How should I manage overlaps? Currently the bones are represented in a tree structure, but I have to write my way through sprite overlaps. For example a man should have the torso and the two hands. Should I simply make a priority flag for each bone and on rendering push the bones in a min-heap based on that flag or is there a smarter way? I saw this feature on an application called Demina and it seems very easily done, at least from the GUI I see.
b. Could you please recommend me a file structure to save the bones and their position at certain keyframes? Also should I separate the standing position and specific animations or should all be in the same file? Please do not just say use XML or something like that. I was thinking about naming each bone and saving a pointer in another structure called node for each bone in a hash and for each child that I load from the file just to add it to it's father in constant time, but I think this is a little too complex and would generate much memory overhead.
Thanks in advance,