Performance of Farseer on Windows Mobile 7?

Mar 16, 2010 at 7:51 AM

I'm thinking of writing a game on Windows Mobile 7 with Silverlight and Farseer.  Will the phone hardware be able to cope with the Farseer engine?

 

THanks in advance.

 

Mar 16, 2010 at 9:30 AM

Best bet is to compile the farseer stress test in the simple samples and try running that.

Coordinator
Mar 16, 2010 at 11:40 PM

Not sure how accurate the emulator is compared to the real hardware, but I ported my TireStorm game and it runs pretty good.

Here is a vid of the game running in the emulator.

http://www.screentoaster.com/watch/stVUhQSk1IR19XR15bX1ldVldd/tire_storm_on_the_windows_phone_7_series

Mar 17, 2010 at 1:48 AM

I have been messing around with Farseer with the Windows Phone 7 dev tools as well, however I have not been able to get it to compile.

With the XNA compiler symbol enabled it tells me the the Stopwatch class isn't found (and indeed according to the Object Browser it's not available). Seems like it should be there though. After commenting out the few lines that make use of it on PhysicsSimulator, I still get tons of other errors (over 80, mostly classes that the compiler can't find) that presumably were being masked by the fact that the compiler never got past the PhysicsSimulator class initially.

And without the XNA compiler symbol enabled, the Vector2 and Matrix classes aren't available. (And I suspect there would be more errors even were I to manually include 'Microsoft.Xna.Framework' on every file, just like before.)

I apologize if this is something easy I am overlooking (today's my first day trying out C# and Visual Studio--I'm a veteran ActionScript guy and I must say besides these compiler errors I'm liking C# and the .Net Framework). Anyone know what is going on here?

Mar 18, 2010 at 9:12 AM
Edited Mar 18, 2010 at 9:18 AM

I ported the SL Farseer demos and they do so-so. On the emulator on a pretty fast machine I've been getting around ~20 fps for the "Collision categories" demo. On current builds on the actual phone this isn't performing as well (sorry, I don't think I should tell you specific numbers). Note that this is the SL project and not the XNA - I haven't tried the XNA one (working on an SL game).

If you send me a converted VS10 XNA project of Farseer I'll be happy to run it on the phone for ya.

NOTE: Although is obvious, I would like to point out that the WP7 builds are NOT final and this is not a reflection of how it will perform when it launches.

Mar 18, 2010 at 9:56 PM
Edited Mar 18, 2010 at 10:06 PM

What changes to Farseer did you have to make to get it to run in VS 2010 express for windows phone 7.

I quickly realized you can't just pull in the .csproj since going from xna 3.1 to 4.0 is not supported as an upgrade.

So I manually copied all folders and classes.  However I get  errors with the namespaces.

It's wierd but for some reason the following statement is not used in VS 2010 even though it works fine in VS 2008:

In VS 2010, everything contained within the #if (xna) statement is greyed out as you can see below but in VS 2008 it appears as bolded and is thus used.

Anyone know why this is and how to fix that.  So my main question is how did you port Farseer to work in VS 2010 express and Windows Phone 7?

#if

(XNA)

using Microsoft.Xna.Framework;

using System.Diagnostics;

using Microsoft.Xna.Framework.Content;

#else

using

FarseerGames.FarseerPhysics.Mathematics;

#endif

 

 

Mar 18, 2010 at 10:37 PM

I'm assuming you are trying to get it to work for XNA?

Anyways, your problem is that you need to declare "XNA" in the conditional compilation symbols (under the Build tab in the project properties).

Mar 18, 2010 at 11:19 PM

kensou,

Yes sorry.  I'm trying to get it to work for XNA.

Adding the compilation symbol XNA did it.

Except now I get an error for the stopwatch class.

Stopwatch could not be found.  Stopwatch is in the diagnostics namespace which is declared.

Should I just comment all of those stopwatch uses out?

Thanks

Allan

 

Mar 18, 2010 at 11:28 PM

I also had to add a conditional symbol for SILVERLIGHT and that seemed to take care of the stopwatch and .RemoveAll issues.

Now I have an entry point issue.

Error 1 Unable to determine the entry point.  Assembly ‘{0}' has no visible types deriving from Microsoft.Xna.Framework.Game. FarseerPhysicsXNA

Still working on it.

Allan

 

Mar 19, 2010 at 12:04 AM

FarseerPhysics shouldn't be your startup project - it should be your program/demo/whatever that you are creating that uses Farseer.

Also, you could just compile the project and then in a brand new project just include the reference to the compiled dll.

Mar 19, 2010 at 2:39 AM

kensou,

Thanks.  That's an easy one but that wasn't the problem.  I had my project set as the default startup project.  I'm not sure why VS 2010 was looking at Farseer for an entry point. 

It may be something simple I'm missing in the properties or assembly file info of Farseer that doesn;t come over when you copy over classes manually as opposed to importing the .csproj.

I decided to just reference the Farseer .dll in my Windows_Phone XNA 4.0 project.

This is the error I received.:

Warning 3 The primary reference "FarseerPhysics" could not be resolved because it has an indirect dependency on the framework assembly "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v4.0,Profile=Client". To resolve this problem, either remove the reference "FarseerPhysics" or retarget your application to a framework version which contains "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". LavaRunnerPhone

It appears the mscorlib version that is used by Farseer in XNA 3.1 needs to be updated, then Farseer can be compiled and then you may be able to use the Farseer .dll in a Windows Phone XNA project.

I'm still trying but this may be deeper than my brain can handle.

Allan

 

Mar 19, 2010 at 3:55 AM

Seems someone has it running... check here: http://hodnick.com/post/454007407/wp7farseerphysics

The video looks smooth but will this translate to a real phone?

 

=Ruairi

Mar 19, 2010 at 5:01 AM

Well there are two classes in Farseer that uses RemoveAll on Lists and RemoveAll does not appear to be supported in XNA 4.0.

Selectiv eSweepCollider.cs and SweepAndPruneCollider.cs.  Both of the uses of RemoveAll are contained in a !SilverLight compiler directive so I assume this came about when Farseer went to a silverlight version.

So I commented out those sections and once again I am at the following error:

Error 1 Unable to determine the entry point.  Assembly ‘{0}' has no visible types deriving from Microsoft.Xna.Framework.Game        Farseer Physics 2.1.3 XNA

I don't understand why VS 2010 is looking at Farseer for an entry point.  My project is set as the default startup project.  I simply added the Farseer classes in a New Blank Project.

Ugh.

Allan

 

Mar 19, 2010 at 4:09 PM
ruairispain wrote:

Seems someone has it running... check here: http://hodnick.com/post/454007407/wp7farseerphysics

The video looks smooth but will this translate to a real phone?

 

=Ruairi

 That's SilverLight not XNA and the author says it's a little jerky.

Quote:

Thanks Allan. No, this is not XNA - this is the Silverlight version of Farseer. It performs pretty well but it's still a little "jerky" for my tastes.

Aug 17, 2010 at 9:09 PM
Old thread, but just thought I'd chime in on this: Note that on WP7, hardware acceleration is limited to nonexistent when per-frame callbacks are used for animation in Silverlight. I'm assuming that is what you need to do for silverlight-based physics demos. This is likely where the performance issues are coming from. Try targeting XNA instead and see if your performance improves.
Aug 19, 2010 at 10:00 PM
So... is there a download out there for Farseer for XNA, compatible with WP7? Thanks...
Aug 19, 2010 at 10:40 PM

Roger,

Not that I'm aware of.  Based upon the Farseer forums, the current Farseer developers are waiting until MS releases the final WP7 XNA build.

I cobbled together a solution just to see if it would work but that was using the Pre-Release WP7 XNA build from several months ago.

I finally decided to skip trying to develop directly for WP7 until MS releases the final build of XNA for WP7. 

What I think is easier for us solo developers is to just develop a mobile style game on PC using XNA 3.1 and the current Farseer.

Once the final builds are out for both Farseer and XNA on WP7, then I'll port it over to WP7.  It's just too much of a headache to develop while everything is in flux...at least for me.

Allan

From: RogerGuess [mailto:notifications@codeplex.com]
Sent: Thursday, August 19, 2010 4:01 PM
To: chaneya@acwoodworksinc.com
Subject: Re: Performance of Farseer on Windows Mobile 7? [FarseerPhysics:205067]

From: RogerGuess

So... is there a download out there for Farseer for XNA, compatible with WP7? Thanks...

Read the full discussion online.

To add a post to this discussion, reply to this email (FarseerPhysics@discussions.codeplex.com)

To start a new discussion for this project, email FarseerPhysics@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com

Aug 19, 2010 at 10:57 PM

Now that the beta is out, the API surface should be stable enough to start real work. I imagine only small tweaks would be required after this stage for the final version of XNA 4.0, if any.