Skip to content
debreuil edited this page Sep 14, 2010 · 2 revisions

The swf is converted to the Vex format (bitmaps, plus a Vex object as described in the Vex project). This Vex object is then converted into something useful to XNA. In this object, the vector objects are converted to bitmaps, and the Box2D shapes and joints are parsed out and added to the metadata. At this point the object is serialized to a data.xml file — while this is not used by the process, is sometimes useful for debugging.

Here is what is generated in a simple file with a background, a title, and a flower that rotates around a revolute joint:

As you can see the vectors have been converted to bitmaps. In the xml file you can see the bitmap references, the root definition, and all the instances inside. At the end are the movieclip and symbol definitions. Note, this is backwards compared to a swf file, but this is just due to the way the xml is serialized.

Here is a link to the data.xml for this example. Note how definitions contain Instances (children), Shapes (Box2D bounding polygons), and Joints.

The content pipeline will next generate an XNA friendly version of this, using a V2DWorld object and Texture2D bitmaps. The VexPipelineReader will read this in at runtime.

Clone this wiki locally