• Create Account

### #Actualalnite

Posted 23 May 2013 - 05:47 AM

This is where tools come to the rescue.

My guess would be that they use an in-house development tool to compose the frames together, and able to inject extra information into each frame, such as collision boxes, tags, sound effects, and so on.  Then when the game loads the resource files, it creates a data structure of the animations and frames and tie them up together in such a way that simplify all these seemingly complex tasks.

For example:

Animation* animation = loadAnimation("link.dat");
animation->play();

// somewhere when checking for collision
// animation object already takes care of which frame it's currently playing, and whether there's a collision box in that frame.
if (animation->collides(another_animation))
{
// do something here
}


### #1alnite

Posted 23 May 2013 - 05:40 AM

This is where tools come to the rescue.

My guess would be that they use an in-house development tool to compose the frames together, and able to inject extra information into each frame, such as collision boxes, tags, sound effects, and so on.  Then when the game loads the resource files, it creates a data structure of the animations and frames and tie them up together in such a way that simplify all these seemingly complex tasks.

For example:

Animation* animation = loadAnimation("link.dat");
animation->play();

// somewhere when checking for collision
if (animation->collides(another_animation))
{
// animation object already takes care of which frame it's currently playing, and whether there's a collision box in that frame.
// do something here
}


PARTNERS