Game developer specialising in social play and installations - creator and host of The Incredible Playable Show

Thursday, 6 January 2011

Creating Simple Animations for Games

Participating in game jams, 48 hour competitions, and small amateur game productions, I've noticed that a lot of people have trouble creating simple animations. Often programmers feel they do not possess the art skills, or skilled artists don't know where to begin with game animations. Creating simple game animations isn't as difficult as it seems, and most people just need a prod in the right direction.

Thus, here is my introductory directed prod. If you have any tips to add or disagree with anything I say, feel free to comment me here or on twitter, and I'll gladly include your tips in the article - the more we can teach and learn the better!

Running Animations

Often for small-scale operations, a simple 4-frame running animation is sufficient. Here's a little template skeleton for a running animation:

I've highlighted below the arm and leg closest to the screen, so you can see how the two sets of limbs move during a run.

You can draw over this with your character design. Notice that the limb positions are exaggerated. The legs are far forward and far back. When one limb is fully extanded on the ground, it forms a straight line from the back. In the first and third frames the runner is not touching the ground.

Above is a running animation I created for Mindbender a few years ago. This is done with 8 frames of animation. I did the first four first, and then added the in-between poses later.

The red stripe on the leg is a trick I came up with that means that the front and back legs are easily distinguishable. The eye clearly sees the moving red line and sees it as the movement of one leg. Before I added that, it looked more like the image was blinking between two states, as frames 1 and 3 looked very similar. See if you can do this on your own animations - make the front leg clearly distinguishable from the back. The animation should demonstrate that even with only 4 frames of animation the motion is clear.

I always look to Sonic for a good, bold running animation. Sonic's a nice example because he has nice long limbs, and because running is kinda his schtick. Above you can see all 12 frames of his run animation (from Sonic 2 Beta, ripped by Rankles). You can pick out the four key frames that define his animation cycle - they are the boldest, and the poses are pretty exaggerated.

Exaggerate!

A trap a lot of beginners get stuck into is not wanting to exaggerate movements, but the reality is that the way humans move is actually pretty exaggerated. Legs and arms are fully extended at a lot of times, we leap off the ground, and our limbs stick out far from our bodies. Subtle movements are special versions of exaggerated movements, not the other way round.

Jumping Animations

Your next most likely animation you'll want to do is a jumping animation. This is fairly simple, and is just about posing the character correctly. I usually do two poses for a character: going up and coming down.

Above is an skeleton drawing of the jumping animation for my Sonic Forever prototype. Below is the character drawing based on the animation.

There's not much for me to say on this front, other than these two poses always seem to work.Think big, scale down

Don't fall into the trap of starting drawing in the scale you will use in your game. What if that's the wrong size, and you decide to make the game objects a different size in later versions? What if you want to do fun camera effects, like I did in Sonic Forever?

To scale an image automatically to the correct size, use something like image.scale = intended_height/image.raw_height in your code.

Computers these days can deal with some pretty big image files, so don't worry about taking up space or memory. There's far more processor/memory-intensive activities your computer has to do. Bigger is (in my opinion) better.

Constructing a sprite sheet

Less of a how-to, more of a bunch of tips here. Choose a point to be the centre of your sprite and try to keep that consistent. Usually I choose the belly, as that tends to stay fairly consistent heighwise when you're running.

I like to work with big square frames of animation. The Mindbender sprites above were done in eight 1000x1000 pixel frames. Round numbers are easy to work with. Don't worry about having a lot of whitespace around your sprites. This means that if you draw another animation where the character is particularly tall or wide the programmer won't need to accommodate a different size of frame.

Talk to your programmer about what it is they want. I've had a lot of times where I've failed to properly explain what I've needed from an artist, and had to construct the sprite sheet myself, working around what they'd done wrong. Some programmers may prefer to work differently to me, or they may already have code that requires sprite sheets to take a particular form. Ask for clear specifications from your programmers!

Anything else?

If there's any other tips you'd like to add, or things you disagree with, please let me know!

In my opinion, round numbers are so much easier for you to work with as an artist and a coder. Computers are pretty sharp now, and will work with 1000x1000 without any hassle, so why not make it easier for yourself?

It's so much easier to calculate where the centre of a 100x100 frame is than a 128x128 frame, and then what if you want 7 of them? 7*100 is easy, but 7*128 not so much. In your code, this will come up if you need to calculate the positions of the frames when coding the animation, and it'll be easier to spot human errors in that respect.

Most computers can deal with non power-of-two textures fine, and if you're compensating for those that don't you can always put a 1000x1000 sprite sheet on a 1024x1024 canvas with no trouble.

My personal rule of thumb is that computers are pretty powerful, so focus on making it easier on yourself as a coder/artist than pleasing the computer. The things that cause problems will be much bigger than non-power-of-two animation frames! ;)

Title credits are named along these lines as a delayed consequence of the banks requesting the endorsing of commitment in regards to vehicle, known as the title. The borrowers are fittingly not confined from making utilization of the vehicle amidst the season of the improvement, in light of the way that just title is held by the development expert. car title loans

The colloquialism "take after the orientation, and it'll turn out right" is amazingly vital and exact when securing a vehicle title credit. A borrower may similarly be at threat of taking out a development from an unpalatable association that will charge extra costs on top of the gathered distraction, or minute hid supports that were created in the fine print in the assention, that are just about hard to see, unless observed intentionally with an opened up glass. cash advances mobile

The fortunate thing about these sorts of credits is the credit powers generally speaking don't oblige a credit survey the grounds that they have your auto title as affirmation and security for the improvement. At that point, you can even now drive your auto and pay back the advancement in parts Payday Loans

To judge the best game plan, make progress toward the payday propels association that is advancing a lower APR. Commonly, most payday development associations give a cost breakdown each 100-dollar expands that match with the rate. Cash Advance Chicago

Right when individuals consider vehicle title credits, much like payday advances, there has a tendency to verify demographic hypotheses which ring a toll. The lion's offer would hold a title credit with clearing metropolitan districts concentrating in on the low wage car title loans chicago

Since we looked at the Pros, we should look at the Cons of vehicle title credits. Genuinely, no budgetary decision is 100% wonderful. Nothing is faultless, however a few things draw close. If this article was in light of telling the peruser that the auto credit industry is the best budgetary choice, then the article would be stacked with crap. title loans jackson-MS

Once more, this sort of is comprehensively ordered into two sorts secured and unsecured credits. You can decide for unsecured regularly scheduled installment credits if there should arise an occurrence of getting critical money. usacheckcashingstore.com/costa-mesa

the estimation of the vehicle is to an inconceivable degree essential and an assessment will be finished by development expert gave appraiser. The vehicle title advance moneylender will require your vehicle on the premises with a specific end goal to process the application. car title loans

The blessed thing about these sorts of credits is the credit experts all around don't oblige a credit watch the grounds that they have your vehicle title as affirmation and security for the progression. By then, you can even now drive your auto and pay back the progression in parts Payday Loans San-diego

The procedure of procuring guide through title credits is the same as exchange advances. Borrowers must be watchful for advance pros who charge excessively high rates of pastime. One must take title credits just from the approved banks why ought to affirmed offer these advances. Cash Advance San-diego

The use of auto as protection is not confined to title credits itself. Diverse moneylenders see the vehicles as security to back the credit repayment. In any case, home measures unprecedented in the favored summation of insurances. Payday Loans

Indie developer behind Greedy Bankers and Slamjet Stadium for iOS, and Tap Happy Sabotage for Windows 8.
Alistair develops games for mobile, tablet and big-scale touchscreens, as well as custom hardware for public installations. He also does the artwork and animation for all his games.
Alistair's games often involve physical contact, encouraging cheating and social interaction. He also works in education, creating Maths learning games for Sparx Ltd in Exeter.
Nominated for Best Developer in the 2014 Pocket Gamer Awards, and winner of the Media Choice award at IndieCade 2015.