I have gotten very very little done over the last couple of weeks.
I don’t feel super guilty about it or anything, because I’ve actually been pretty busy, first with a road trip to visit family and then with Thanksgiving itself, which also involved visiting family, as well as feasting myself into a coma, as is traditional. Any spare time I’ve had has mostly been filled with resting up or fulfilling obligations which have accumulated in the meanwhile, leaving me very little time and energy to work on the game.
Anyway, I got the spear-throwing entity mostly working: The main part that doesn’t work yet is the angle of the spear itself, the problem of which actually sent me down a real rabbit hole of code design that inspired yesterday’s post, since it meant I needed to completely rethink some aspects of my animation system’s design. In particular, I’ve had to think a great deal about how rotation works within the context of a series of bitmap frames: What point does the image get rotated around? What’s most intuitive? What’s most useful? Will the decision I make here make it impossible to do something important with this tool in the future?
What I ended up deciding, as alluded to in my last post, was to keep things as obvious as possible. That means that, as is traditional, the bitmaps are drawn starting from the upper right corner, and all rotations start from there: By going in and changing the frame offset to center the bitmap, it can rotate from the center point, and by shifting it to the bottom center I can rotate it around that point, et cetera. I’d originally made it so rotating it just rotated the bitmap around its center, but that means that the individual frames, if they have different offsets, don’t rotate around the same reference point and quickly become misaligned. This was an instance of what I was writing about, of skipping to ease-of-use while disregarding the importance of clarity in the basic interface.
So, what I’m going to have now is an animation system that’s a bit more of a pain in the ass when it comes to certain common tasks, but with complete transparency so I know exactly what I need to do to make it work. The drawback to this is that I now need to go in and update all of my animations to deal with this more straightforward approach, which is becoming a common enough task that I think it’s really becoming time for me to create a tool specifically for editing animations. I think over the next week, if I can get my lazy ass to work, I’ll be splitting my time between developing such a tool and starting in on building some playable areas of the game, since I’m getting really tired of the kind of fiddly work it takes to get these entities working.