Animating Wryn

I’m so close to being done the third-last level of the game I can taste it! It tastes about a week or less away. So in the meantime, here’s some info about how I make Wryn do what she does in terms of visuals. Apologies to anyone who read my blog three years ago, this topic is a bit of a re-tread.

When you animate the player character in a 2D game, it’s common to store all the frames of animation inside a big sprite sheet. Quickly switching between the animation frames creates the illusion of movement — pretty simple!

It works great, but it can run into complications. For example, in the game Frequency, the player character could shoot forward, up and down — while running, jumping or standing still. For every action — like running or jumping — I needed three variations (one for shooting in each direction during each action) and it got out of hand pretty quickly.

About 1/4 of White’s sprite sheet in that game. Just looking at this makes my head hurt.

So now I’m making Wryn, who can shoot 360 degrees around her during any action. Obviously I’m not going to make 360 variations of every animation — a change in technique is required.

What I’ve done instead is separate Wryn into different parts, all with their own animation frames. The parts are mixed and matched and placed together depending on what Wryn is doing.
Here is Wryn’s idle, the most simple animation. The body and feet loop through their idle frames while the head is moved up and down in code to make the animation more active.

Wryn’s run is similar. The body and feet switch to running frames, and the head is again moved in code to make it looks like Wryn’s rising and falling. The body and feet are also tilted in code and the head pushed forward, to make her lean into the movement.

Things get more complicated when Wryn shoots. I switch to a version of her body with no arms and draw the arms separately, positioned at her shoulders and rotated to point in the direction Wryn is firing. Her head animation also changes to look where she’s shooting. Each weapon has its own set of animations with Wryn’s arms holding the weapon.
Wryn dodging and shooting is probably her most complicated animation. Her head, body and feet change depending on the direction she’s facing (left or right) compared to the direction she’s dodging (360 degrees), and they all rotate to make her body point along the direction of the dodge. When she shoots during this, her head is overridden to look in the direction of her attack and her body and feet change again, depending on the direction of the shot (360 degrees) compared to the direction of the dodge (360 degrees). Whew!

There are downsides to dividing Wryn up like this — it’s a lot more work to animate her, and I’ve lost some of the small details of her running animation at the top of the page. However, I believe it’s worth the amount of control I get over her animations in general, and in many cases makes them look even more fluid as different parts of her lean and twist at different angles and times.