Animation format

From FIFE development wiki
Revision as of 07:23, 14 October 2011 by Helios2000 (Talk | contribs)

Jump to: navigation, search
Document Data structures Data strucures
Concepts illustrated here are relevant to understand what kind of data FIFE engine is able to process.


The purpose of this page is to explain the FIFE XML animation format in full, with all the elements and their attributes fleshed out.

Animation File Structure

Animations defines how images are shown in a sequence.

  • attributes
    • delay: common delay for all the frames in this animation. Type = int
    • action: action frame number (e.g. point when punch hits the target in punch animation). Type = int
    • x_offset: common x offset in pixels for all frames. Type = int
    • y_offset: common y offset in pixels for all frames. Type = int
  • frame
    • source: path to image. Type = string
    • delay: frame specific delay, overrides common delay (for this frame). Type = int
    • x_offset: frame specific x offset in pixels, overrides common x_offset (for this frame). Type = int
    • y_offset: frame specific y offset in pixels, overrides common y_offset (for this frame). Type = int


  <animation delay="130">
    <frame source="image1.jpg"/>
    <frame source="image2.jpg"/>
    <frame source="image3.jpg"/>
  <animation delay="130" action="3" x_offset="0" y_offset="0">
    <frame source="image1.jpg" x_offset="-12" y_offset="30" delay="130"/>
    <frame source="image2.jpg" delay="10"/>
    <frame source="image3.jpg" x_offset="2" />
    <frame source="image4.jpg" y_offset="28" delay="1"/>