At 12/11/12 02:04 PM, 4urentertainment wrote:
My article just went live!
http://gamedev.tutsplus.com/tutorials/implementation/animati ng-with-asset-sheets-an-alternative-to-blitting/
Comment on it so I don't look so lonely
also nice article, if you do a follow up to it you should try out doing something involving controlling sets of multiple animations, especially since you can interpolate animations when you do it that way, you can transition from a walking to a running animation pretty easily.
Some things I was gonna do for animation controlling if I was to write another 2D game engine (which for now I'm having a lot of fun in Unity so we'll see if that happens)
- a "transition grid", which is just a 2D array where you define the animation that plays between 2 other animations, so like you designate a set of animations as "main" animations (idle, walk, run, air_up, air_down, attack), and a set of animations as "transition" animations (jump, land, etc), and put them into a grid, like transition[idle][air_up] = jump, transition[air_down][idle] = land, and then you let the animation controller take 100% control over what animation to play, you just have to tell it what main state you're in and let it handle the rest. For animations without a defined transition you could do an interpolation between them instead.
From using Unity I learned the way to actually do that is not to interpolate from the last frame of one to the first frame of the other, but when the next animation begins, start "playing" it, and interpolate from the current frame of the one you're on to the current frame of the animation that you're switching to. If that makes sense.