How do you know when to draw the next frame if its bounding box is larger/smaller than the current? For example, in KOF, some characters have elastic arms and things of the like..How are these handled in a game?
Lets take Dhalsim for example, classic and answers your category of stretchy limbs. This is how it is done: http://sfgalleries.wikia.com/wiki/Sprite_Sheets#Dhalsim
The artists, draws the sprite frames and places them on a sheet with enough room so that each frame has it's own rectangle. In another layer, the artist marks the center of mass of the character in each frame (so that the frames are in-synch during animation)
Another person, usually not an artist, uses a tool to save the positions of these rectangles mentioned above and their width and height.
If you require more detail on how to implement the tool that helps extract the rectangles and save them to xml or text format ask and I could elaborate.
How to write a tool to collect data for a sprite sheet:
point is (x,y)
rect is (x,y,width,height,label,index);
pseudo code main loop:
If this makes sense let me know or please feel welcome to ask for elaboration.
To pick the frames 'character centering point' use a similar loop, that only asks the user to input one point.
Have the artist add this one pixel points in a new layer in Gimp/Photoshop and write a tool that opens the point layer and extracts their coordinates by iterating on all pixels and saves the results into your the format your prefer.
If you do it that way, you could easily calculate which point belongs in each rectangle and then pair them automatically.
You would want to set up a definition of a
You know those paper dolls with moving arms? The arms are attached to the doll using tacks or something similar. What you're looking for is basically the virtual counterpart to this.
To have complete freedom between the sprite frames and their sizes, each part has to have a reference points (both from and to).