Jan 3, 2024

The Case of the Missing Headless Pirate Sprite

Enemies with melee attacks all used the same batch of sprites when dealing damage, at least in CV3J -- specifically the damage-dealing frame. This includes the Whip Skeleton, Sword Skeleton, Headless Pirate,

and frog.

This actually made it pretty easy to narrow down which sprite goes to the Whip Skeleton, which goes to the Sword Skeleton, which ones go to the Headless Pirate, and which ones go to the Frog. The thing is, the Headless Pirate's animation has 4 sprites -- $08F2, $08F4, $08F6, and $08F8 -- but it only uses three of them. The animation skips over sprite $08F6. 

Sprite $08F6 looks like the inbred lovechild of $08F4 and $08F8. It has the body and hand positioning of $08F4 and the sword of $08F8, but the sword is off by 8 pixels (I'm estimating). If we rewrite the Headless Pirate's sprite animation to incorporate $08F6, we could come up with what might pass as a sword flourish similar to one of Charlotte's attacks in Samurai Showdown.

I didn't like how the sword had the same shape in $08F6 and $08F8, so I tried flipping the sprite vertically to see how it would look. I never messed with sprites in CV3, so I didn't know what to expect. I looked up the various bit uses in the OAM on NESDev, found the byte which affected the sword's palette, then set what I assumed was the flip bit. Not only did it flip the sword, it made the sword line up with the hand! I reworked the animation to make it look more like a door stopper, or like the Headless Pirate flourished the sword on thrust.

That was how it looked going from $08F8 to $08F6 then $08F4. I wondered what it would look like just adding $08F6 to the end of the Headless Pirate's official attack animation. The result was more like a full sword swipe. It looks a bit weird if the Headless Pirate holds the sword out for too long, but it would probably look nice as a quick slash.

The Headless Pirate's attack animation is handled by its state machine, so each frame is deliberate. Giving it an extra frame of animation would have only taken up 4 bytes of data in its state machine. I find it hard to believe that they were pruning code, looking for 4 bytes to free up, and this guy's sprite animation came to mind. 

The simplest, plausible explanation is that the programmer accidentally specified $08F2 as either the first or last frame, which itself only lasts for a split second, rather than $08F6. However, the sprite still looks broken, even in that split second. With the sprite unaltered, starting the animation with $08F6 would make it look like the Headless Pirate is stabbing down from high, similar to how Charlotte starts up her attack above. If the flip bit is set, it would look like the Headless Pirate did a quick slash down and then straightened the sword -- a very nice animation in slow-motion. If the animation ends with $08F6 instead, the original sprite looks atrociously broken. However, if the flip bit is set, then the result would be nearly identical to the animation above and look really good as well.

So here's what I think really happened: The sprite artist drew the Headless Pirate to have an attack animation comprised of four unique frames. The programmer wrote the Headless Pirate's state machine to include 4 frames of animation for the attack. For some reason, their proprietary software failed to set the flip bit when exporting the sprite to code. At some point in development, they noticed the sprite was broken. Rather than try to fix the sprite, which would have required a costly and time-consuming software update, they simply changed it from $08F6 to $08F2.

We will probably never know the truth.

No comments:

Post a Comment

©TheouAegis Productions™. Powered by Blogger.