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.

  • Aradan69 said,

    I really like it when we get to see the tools that are created when creating a game, like this one. Give me ideas for any game or project i’ve been thinking of creating, of course I havent finidhe most of them as i have too many ideas usually floating around, lol.

    I admire the dedication it takes to plan, create and finish a project.

    Awesome stuff guys, keep it up. We all look forward to hearing about updates, no matter how small.


Add A Comment