Animation Editor

Posted by James on March 23, 2010 under Tasty Planet | 8 Comments to Read

In Tasty Planet 1 the animations were very simple. Usually they consisted of only two frames. Due to the quantity of objects that we wanted to put into the game we were limited by time and memory constraints, so we really couldn’t do any more frames of animation. Our constraints haven’t changed much for Tasty Planet 2 – we still want to put as many objects as possible into the game without using up a huge amount of memory, and without taking years to develop the game.

But we still want to make the animations better, so we’re taking a slightly different approach this time. We’re using an animation editor that was created for The Three Musketeers: The Game, with a few modifications to support interpolating between frames of animations. What this means is that we can split a cat up into head, body, feet, and tail, and then move these pieces around smoothly to give the illusion of a more complicated animation. A lot of 2d games (and TV shows, actually) do this nowadays – a good example is PopCap’s Bookworm Adventures, or more recently Plants vs. Zombies.

Here’s the editor:

It was originally used in Musketeers to enable us to create the animations of all the different types of clothes that d’Artagnan and the computer controlled characters could wear. I added a bit of functionality to do the smooth frame interpolation and now it works well for doing the Tasty Planet animations. It’s kind of clunky, and there are a lot of functions that we aren’t using anymore, but it does the trick.

In Tasty Planet 1 we actually didn’t use an animation editor. The animations were so simple that it was easier and faster just to enter the data by hand. Deciding when to build a tool is an important skill for indie game developers – unlike big game companies we don’t have dedicated tools programmers. Time spent building a tool is time that could have been spent building the game, so the tool better be worth it.

Collision Editor

Posted by James on March 16, 2010 under Tasty Planet | Read the First Comment

Over the next few weeks I’m going to do some posts about the tools that we’re using to make Tasty Planet. I’m not talking about the commercial packages that we use like Photoshop and Visual Studio; I’m talking about the editors that I have created specifically to help build Tasty Planet 2.

In Tasty Planet 2, as in most other games, we need to know when objects are touching other each other. When the grey goo is rolling towards a cat, how do we know that the goo ball is actually touching the cat (so that we can consume to defenseless little creature)? In Tasty Planet 2 I’m using the Box2D physics system to answer this question, but we still need to tell Box2D what size and shape an object is. Enter the collision editor:

It’s a simple editor that lets us choose the object to edit from a list on the left (the taxi is chosen in this case), and then we can add circles and polygons using the buttons on the right. The green lines overlaid on the taxi show the collision area – if another objects green outline touches this object’s, then we know that they are colliding. If the object is complicated, we can use more than one shape. In the case of the taxi we are using an 8 sided polygon.

This isn’t all that different from Tasty Planet 1. One improvement is the use of convex polygons (in Tasty Planet 1 we were simply using rectangles). But the main improvement comes from the fact that we are using Box2D to detect and resolve collisions, so objects will behave in a more natural way when they collide with each other.