UPDATE: Please note that there is a new release of this for Silverlight Beta 2: Check it out here.
When you are doing game development you sometimes wants to spice up the game with some physics. To do this from scratch, you need to be pretty good at math and have a lot of spare time. Lucky for us Silverlight Game Developers, Jeff Weber from Farseer Games, created a little engine to help us out. It's called the Farseer Physics Engine.
Currently the latest release is 220.127.116.11 which supports Silverlight 2 beta 1. This is the release used in this sample.
I am new to the Farseer engine myself, and have been looking on the internet for a, "Getting started with Farseer" tutorial, with out any luck. Therefore I desided to create my own. The release of the engine comes with some pretty nice demos, that shows you how to use the engine. The only problem is, that the code is pretty complex at first sight, which could make some people give up.
Therefore I have created this tiny project to show you how to make the engine run in the simplest form possible. The code should be pretty self-explaining. If you want to know alittle more about why the diffent things are done, you can read on Andy Beaulieu blog, which has a starting tutorial too. The only problem is thats it's for Silverlight 1.1 Alpha and therefore alittle outdated, but the basic things are the same as far as I can see.
(As I said, I'm new to the engine also, so this can maybe be done even more simpler. If you have some changes, please let me know. You can use the "Contact" here on the page and send me and email through that. Thanks in advance.)
You can download the source here.
And you can see the it running in your browser here.
I hope you have a better idea of how to get the engine to work after looking through the source code.
Please note: The Silverlight 2 beta 1 currectly have a "region bug" when you position the elements. If you are running with US region settings, there should be no problem, but if you, like me, run with Danish Region settings, this sample will crash at first sight. So to be able to see/run this, you need to set your region settings to English (United States). This works for me.