Physics Body from XAML?

Dec 10, 2008 at 1:13 PM
Hi all,

Another noobie here asking (probably) another noobie question...  Is it possible/easy to create all of the physics data (Body/Geom?) from a XAML that was created with Blend?

I'm just starting out in Silverlight development and have created a nice and simple demo using the (very good) "Physics Helper Library" by Andy Beaulieu, but it seems (assumption on my part) to be reliant on the game being designed completely in Blend.

Essentially what I am trying to do is to create (another) platformer in Silverlight, using vector graphics (XAML) created using Blend/Design, and all hooked up with the Farseer Physics Engine.  I want to have the levels (constructed from XAML tiles) dynamically loaded from an XML file (which contains the positions of the tiles required), and each tile has associated physical properties (collision bounding, drag, movement, etc).

I understand that I could simply display the XAML object and just have, say, a rectangle (created in code) which is used for collision detection.  My problem with this is that for other game characters, this simplistic collision would be too broad.  It'd be great (in certain circumstances) to be able to create the collision information from the vector graphic.

Hope this makes sense... Any ideas?

Many thanks.