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

XNA 4.0

Topics: User Forum
Sep 16, 2010 at 6:57 PM
Edited Sep 16, 2010 at 6:58 PM

Is it currently possible to get Farseer Physics working with XNA 4.0 without too much work?

I'm planning to port the game I'm working on to 4.0 as soon as possible, but naturally I'd rather wait for my favourite physics engine to add XNA 4.0 support if getting it to compile in its current state would be too much of a hassle.

Sep 16, 2010 at 7:31 PM

The version in the source control is working with XNA 4.0.

Sep 16, 2010 at 9:03 PM
Edited Sep 16, 2010 at 9:09 PM

So I see. It wasn't compiling at first, but after removing the XNA references and re-adding them, all seems to be well. I wonder why that happened?

Maybe it's because I have both 3.1 and 4.0 installed? It's probably an XNA bug, anyway, and not a Farseer bug, but I'm leaving it here in case anyone else has the same problem.

Thanks, genbox!

Sep 17, 2010 at 6:54 AM

This is a breaking change in Windows Phone Dev Tools, from Beta to RTM. You need to re-add the references.

Sep 17, 2010 at 12:48 PM

Is DebugView XNA geared towards 4.0 as well? If I download the HelloWorld project and compile, it's still coughing up a load of errors...

Sep 17, 2010 at 2:14 PM

I managed to get DebugView XNA working without issues in my own project, though I never tried compiling the HelloWorld example.

All I had to do was re-add the references. So try that. :)

Sep 17, 2010 at 4:45 PM

Hm, I've tried that and it still kicks up a fuss. ".Color does not contain a constructor that takes 2 arguments" being the first and most suspicious...

All I've done is selected all the Microsoft.XNA.Framework stuff from 'References' on the right, and re-added them. Is there something else I should be doing?

Sep 17, 2010 at 4:48 PM

Are you using the version from the source control or the release? Only the one in the source control works with XNA 4.0 - you could try out changeset 76968 (Newer changesets contain a slightly slower broadphase).

Sep 18, 2010 at 12:05 PM

Ah yes, the latest changeset worked a charm. Many thanks!

Sep 18, 2010 at 8:50 PM

The samples in the latest builds for XNA 4.0 are acting strangly... Ive tested with the latest change sets both 77152 & 76968. THe problem is that when "some" objects hit the floor, ceiling or walls they get "sucked" out bounds. I suspect this isn't proper behavior since it makes the stacking demo kind of useless. ;) Can I do anything to fix this problem?

Sep 18, 2010 at 10:06 PM

In which samples are you experiencing this?

Sep 19, 2010 at 2:45 AM

Most, if not all of them... However not all kinds of geometry is as sensitive to the bug. Circles seem to be more resiliant to the bug that other geometry types. I havn't altered any code in the projects. Though I did update the references to XNA.

I've uploaded a video on youtube ( so you can se what I'm talking about. :) All of the projects were debug builds. Sorry for the poor video quality.

Let me now if you need more details.

Kind regards, Johannes

Sep 19, 2010 at 11:08 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.