Thought for the Dazed

I've had to give up that Distance Learning course as I was having trouble seeing the teacher.

Flickr
www.flickr.com
RobMiles' items Go to RobMiles' photostream
Twitter
C# Yellow Book

Search entire site
« Assassins Creed for Windows Phone | Main | Don’t Make the Recipe Static »
Wednesday
Feb132013

Farseer Physics in MonoGame

screenshot_02132013_165926

I really like MonoGame. I also like physics. Particularly the Farseer engine, which works very well with XNA and lets you make things bounce around very nicely. I’ve had some success putting Farseer on Windows Phone, so today I thought I’d see if I could get Farseer to work with MonoGame. So I opened up my venerable old Destruction Golf demo from ages ago and just copied across the Farseer library and the code.

And it worked. Pretty much first time. Took me fifteen minutes in total. Amazing. The only problem was with the sound effect that plays when the ball hits the house. This wouldn’t play for some reason. But everything else seemed to move very realistically. If you want to add a bit of physics to your XNA then it is well worth a look. It is the older version of Farseer, but I kind of prefer that.

You can find the sample code for MonoGame Windows 8 here. You can find my video presentation about how the code works here.

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.
Author Email (optional):
Author URL (optional):
Post:
 
All HTML will be escaped. Hyperlinks will be created for URLs automatically.