This project has moved and is read-only. For the latest updates, please go here.

Farseer physics in XNA 3.0 or 4.0 need some basic information

Topics: Developer Forum, Project Management Forum, User Forum
May 30, 2012 at 10:58 AM


Im looking for physics engine for my 2d xna game. I found this engine and im trying to get it works... Yesterday I spend a whole day trying to do this. Some questions:

1. Is farseer physics works with XNA 4.0? I hear it's not working then I start a new project in XNA 3.0.

2. If its working with XNA 4.0 or 3.0 how get it to work? I need very basic tutorial... bacause i tried many times and its not working. I have physics drag and dropped to my project folder, then added project(farseer) to my project. Then I added some using directives. 


I Copy & Past code from tutorial - to see if this is working now but it doesn't.

Please help! and sorry for my english... I hope it's read-able

May 30, 2012 at 1:46 PM

Hey david899, from the image you posted it seems you haven't included the Farseer Physics Library into your project. You can add the DLL in your projects references or add the Farseer Physics source to your project. The bounceball project is very good start. It was designed for wp7 development and uses Farseer 3.2 so some things won't work as planned. Hope this helps.

May 31, 2012 at 6:12 PM

Yes, it's helps me a lot ;) For now, at last i can start working under my project.

Jun 5, 2012 at 2:17 PM
Edited Jun 5, 2012 at 2:19 PM

Hi all,

I had the same problem as David899, but with this solution i can now use the engine (or that i thought) thanks.

Now my problem is a bit different. I use XNA 4.0 and i don´t know if the problem could be in this part as i think now its not working properly. My problem is that pnce the source files are included in my project, the classes Vector2, Vector3 and so on are doubled deffined cause XNA has it own Vector2 (and etc...).

How can i solve this?

Is it better for me to start using XNA 3.0 and the version of Farseer intended to this version?

Thanks and regards


P.S.: I´m sure that i am missing something, but i really don´t know what it is. :/