Windows Phone 7

Aug 23, 2010 at 7:47 PM

Any plans to support Windows Phone 7?


Aug 23, 2010 at 8:06 PM

I don't have a Windows Phone 7, so I can't develop and test it. Therefore we don't have any official support for WP7 - it would have to be a contribution.

Aug 23, 2010 at 8:39 PM
Edited Aug 23, 2010 at 8:39 PM

You can download the WP7 SDK here;

It has an emulator.  But honestly, based on the quality and maturity of this project, I'd wager some of the core devs could qualify for a free device.


Aug 23, 2010 at 8:52 PM

If Microsoft would be willing to donate a Windows Phone 7 to the project, I could officially support the platform. An emulator is good for checking compilation errors and compatibility, but the nature of the project makes it next to impossible to optimize it performance wise. A real device would give us more realistic results. I don't have any connections to Microsoft or know anyone who has, so I don't know how I would ask Microsoft to support our project.

Aug 23, 2010 at 9:21 PM

You can send an e-mail with a device request, check here for the details

Brandon Watson is *the* WP7 guy, check his blog here:

More, you can contact Charlie Kindel, his twitter account is

Aug 23, 2010 at 9:58 PM

I've sent them an email explaining what Farseer Physics Engine is and all that. I'll post in this thread with updates as our communication progresses.

Aug 23, 2010 at 10:01 PM

Awesome! Wish you best of luck :)

Aug 23, 2010 at 10:03 PM

I wouldn't worry too much about performance on WP7 devices as long as it's running well on XBox 360. The .net runtime runs significantly faster on WP7 devices than it does on XBox360. The final version of XNA 4.0 is due to be released September 16th.

Also, the core engine already builds and runs just fine for WP7. You will have to modify the DebugViewXNA to work with XNA 4.0 however. See this thread:

I think the code I posted just needs a couple of tweaks for things in FP3 that were converted from method calls to C# properties. Also there's an issue with the polygon drawing code that makes everything white (although the outlines still draw just fine). I still haven't figured that one out.

Aug 23, 2010 at 11:29 PM

Also, I've been working on an automated stress test that I could send to someone with a device, but I haven't had much time to work on it. If you have one I could send, let me know - someone at Microsoft might run it for us. If it helps I could post it using my MSDN subscription.

Aug 24, 2010 at 8:50 AM

Hey JeroMiya,

I have an actual WP7 device, but only till next monday.  If you can send me your stress test project or post a link to it here I can run it on the device and see how it does.

You can send it to or like I said, just post a link to it here in this forum.

Aug 24, 2010 at 12:08 PM

I've updated the source control with FPE 3.0 that supports XNA 4.0.

@JeroMiya: I don't have a graphics card that supports DX10. i.e. I can't run the Windows Phone 7 Emulator. I had a look at your updated DebugView for XNA 4.0 and I implemented a similar DebugView into the source code. Your problem with white boxes are because of the new alpha settings in XNA 4.0. Use BlendState.NonPremultiplied or premultiply your alpha values into the colors using Color.FromNonPremultiplied().

Aug 24, 2010 at 1:20 PM

@genbox Could you checkin the new XNA 4.0 content projects? They seem to be missing.

Aug 24, 2010 at 3:42 PM

@crashlander I sent a version of TestBed running on WP7 to


Aug 24, 2010 at 3:56 PM

@JeroMiya, ok, cool.  I'll load it up tonight and see how it runs.

Aug 24, 2010 at 4:35 PM

I forgot to do this - go to WMAppManifest.xml in the Properties folder of the TestBed 3.0 WP7 XNA project, and where it says:

Change this to:


I don't know if the device has the Games hub installed on it yet, but if not, this change will make the TestBed show up in the regular application list. 

Aug 24, 2010 at 6:06 PM

So, we can download the latest checkin and use Farseer on Windows Phone 7 emulator?

Aug 24, 2010 at 6:44 PM

Not yet - the source code doesn't currently have WP7 projects yet - you'll have to create your own WP7 projects.

Aug 25, 2010 at 1:02 AM

Ok, I ran the physics engine on my WP7 device.

Most things ran fine.

The pyramids were pretty slow.  Seems the phone just can't handle that many simultaneous collisions.  

Also, the vertical stacks did not remain stacked, the pretty much fell apart right away.

All in all, it was cool to see the engine running on the device. Hopefully in the future we can get someone to write phone specific samples that take advantage of touch and the accelerometer.

Thanks for getting the code to run on WP7, JeroMiya.


Aug 25, 2010 at 1:31 PM

Thanks crashlander! It's good to know that most of the demos run fine.

I noticed the stacking issue on the emulator as well (along with some restitution issues for bodies with restitution around .75 or .6 - circles can get "stuck" bouncing in one place). I think it has something to do with the tuning of the simulator step. I'm not sure exactly, but I think the simulator is expecting at least 60 updates per second (preferably 100), but because the device is fill-rate limited to about 30 frames per second, it isn't quite as stable as you would normally expect. I haven't played around with it too much yet, since the stability is good enough for what I'm using it for (lots of static bodies and a relatively small number of dynamic ones). I tried running two simulator steps per frame but that was way too slow. I'll try playing around with the iteration settings and see if I can get stacking to be more stable without slowing the simulation down excessively. If I get some good results, I'll post the settings I used.

Aug 26, 2010 at 5:06 PM

When I set the velocity iterations to 16 and the position iterations to 8 (basically double what they normally are), I get a more stable stacking demo. 

@crashlander I sent another version of the WP7 testbed that uses double precision floating point instead of single precision. I'd like to compare single vs double precision floating point performance on phone hardware. Could you try out that version on the hardware using the same iterations as the last version, and also with the new settings (16 and 8 for velocity and position iterations, respectively)?

Aug 27, 2010 at 12:41 AM


It's really hard to tell if there is a perf difference since we are not showing any timing values on the screen.  All I could do is watch the pyramid demo and try to detect a visual difference.  I could not tell the difference between the old float version and the new doubles version.  Not to say there isn't a difference, but I couldn't tell just be looking at it.

Bumping the velocity and position iterations to 16 and 8 made a big difference to the accuracy of the vertically stacked boxes.  They did not fall over and quickly reached their "sleep" state.  Also, I could not tell, visually, a difference in performance using the 16 and 8 values.  Everything seemed to run the same.

-Jeff Weber

Aug 27, 2010 at 11:04 AM
JeroMiya wrote:

@genbox Could you checkin the new XNA 4.0 content projects? They seem to be missing.

Now they seem to be there, but with broken references?

Aug 27, 2010 at 1:14 PM
Edited Aug 27, 2010 at 1:16 PM

The debug panel isn't showing on the device? 

Aug 28, 2010 at 12:00 PM
Edited Aug 28, 2010 at 12:24 PM

When loading the Samples solution...

One or more projects in the solution were not loaded correctly.

The project file could not be loaded. Could not find file '\FarseerPhysics-76350\DebugViews\DebugViewXNA\Content\DebugView 3.0 XNAContent.contentproj'.
The project file could not be loaded. Could not find file '\FarseerPhysics-76350\Samples\FP3.0\Testbed\Content\TestBed 3.0 XNAContent.contentproj'.
The project file could not be loaded. Could not find file '\FarseerPhysics-76350\Samples\FP3.0\DemoBaseXNA\Content\DemoBase 3.0 XNAContent.contentproj'.
The project file could not be loaded. Could not find file '\FarseerPhysics-76350\Samples\FP3.0\AdvancedSamplesXNA\Content\AdvancedSamples 3.0 XNAContent.contentproj'.

Renaming the "missing" files (Content.contentproj) solves the loading problem, but there's also some missing (unused) TestBed assets (1x1.png, font.spritefont, SimpleColor.fx) causing build errors.


System.ArgumentException was unhandled
  Message=The character ' ' (0x00a0) is not available in this SpriteFont. If applicable, adjust the font's start and end CharacterRegions to include this character.

...when running the "Continuous Test" in the TestBed.

Aug 28, 2010 at 5:36 PM

I forgot to upload the content projects - they are located outside the root of the project, that is why they are not there.

I've not been home the last few days, but I will be tomorrow and then I will upload the content projects.