I would like to start this post by saying that I’m moving the weekly posts from Sunday to Monday. It’s easier with my current schedule to do it that way, and really with as late as I was posting the Sunday stuff, it might as well have been Monday anyway. On to the good stuff.
Moving and Shaking
One of the biggest challenges for me on this project is the animation system I’ve chosen. I’ve done a lot of pixel art over the years, and I’m fairly familiar with animating frame by frame. I’ve done enough paper sketching that picking up the hand-drawn, cleaned-up vector art wasn’t a huge hurdle. What I’ve never even attempted before was skeletal animation. To put it bluntly, I have no idea what I’m doing. I move some bones around to try and approximate what I think walking should look like, and end up with something would grant my character immediate access to Monty Python’s Ministry of Silly Walks. Add on to that the fact that I’m using free-form deformation, so getting my joints to bend without everything looking awkward is taxing. I’m getting there, but it’s slow going. As of right now, I have a decent, albeit excessively deep, walk animation, an incredibly awkward jumping animation, and something that is supposed to be for grabbing ledges, but looks more like a creepy robotic pitching machine. Progress.
That doesn’t seem like a lot of progress, especially since it’s been a few months that I’ve been working on this. That’s an entirely fair assessment, but there’s more going on here. One of the biggest benefits to skeletal animations is the ability to blend between keyframes of different animations. When the characters are standing still, rather than having to creating transition animations, or having them start immediately and relying on the low fidelity of pixel art to make it not seem so jumpy, I can simply blend. Since it’s all just bones with keyframes, the spine runtimes gradually transition from wherever the bones are now, to where they should be for the new animation. It looks amazing, when it works.
Another one of the biggest challenges I’ve faced on this project is that I’m learning a lot of new skills at once, and many of them aren’t well documented. I’m used to libraries and utilities from big companies, with massive libraries of documentation aimed at software engineers. I’m accustomed to being able to find the exact requirements of any given piece of functionality, with common pitfalls laid out. If you mess something up, it’s because you weren’t paying attention. The set of tools I use now don’t have this level of detail. The internet is awash with video tutorials, and for Unity in specific it seems to be the preferred means of information conveyance. This bothers me. I’m used to reading technical documentation, I can chew through technet, msdn articles, or javadocs with ease. I know how to find what I’m looking for. When you present me an hour-long, rambling video that more showcases than informs, I get a little irritable.
Unity is not the only offender here. I ran into an issue with spine, where my animations weren’t transitioning properly. I downloaded the examples and compared code, everything looked good. I checked the internet for common issues, and since there isn’t a stack exchange for spine, I mostly ended up on the same few threads on spine support forums. None of the proposed solutions helped me at all; I was completely stuck. In the end, I opened the runtime source code and tracked down the cause of the issue, which was that my idle animation had a 0-length duration. I double checked the documentation to see if I just missed it, but I couldn’t find it. At least it gave me a good reminder of why it’s important to be able to read other people’s code.
Which Leaves Us…
After fighting with animations and runtimes all week, I feel like I haven’t accomplished a whole lot. There’s very little to show, since it was mostly tracking down bug fixes and making animations that nobody would be proud of. On that front, it seems the Sprite Lamp update with Spine integration is coming out very soon. Once I can try that out and see if it works with my game, I can actually start working on production-quality animations to replace my grey-man placeholder. Hopefully then the screenshots will be a little more interesting.
In the coming week, my goal is to focus on getting the sprite skinning and attachment done, so I can put pants on my character. This will let me build out a town’s worth of characters that don’t all look the same, and then I can start on some of the more involved gameplay mechanics. It’s really hard to sneak past anyone when you aren’t wearing pants, so I guess I have to do that first.