XNA 3.1

Discuss any questions about BEPUphysics or problems encountered.
schulzor2004
Posts: 29
Joined: Mon Jan 12, 2009 2:43 pm

XNA 3.1

Post by schulzor2004 »

Hello,

just a short question: does the bepu physics library still word under XNA 3.1? Haven't tried yet!

Thanks

Oliver
schulzor2004
Posts: 29
Joined: Mon Jan 12, 2009 2:43 pm

Re: XNA 3.1

Post by schulzor2004 »

ok, I tried it for myself, and it does not work, because XNA Framework Versions are now incompatible. Can you please offer a new compiled Version for Windows and XBox for XNA 3.1. The faster, the better ;-)

Many thanks!
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: XNA 3.1

Post by Norbo »

The 3.1 .dll's are now up on the download page. Let me know if you have any problems.
schulzor2004
Posts: 29
Joined: Mon Jan 12, 2009 2:43 pm

Re: XNA 3.1

Post by schulzor2004 »

Wow, that was fast ;-)

Too bad, the whole namespace structure has changed (I am still changing all of my using directives). Can you offer a new Demo-Source-Code? Cause some of the constructors have changed....

Thanks
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: XNA 3.1

Post by Norbo »

The v0.9.0 demo source code is available on the download page. Though it is technically still made for XNA 3.0, you can replace the BEPUphysics.dll in the project, open it, and right click on the project in the solution explorer. You can then use the quick "Upgrade project" option to bring the demos up to 3.1.

Edit: I went ahead and set it up.
Attachments
BEPUphysicsDemos v0.9.0 XNA 3.1.zip
(1.74 MiB) Downloaded 357 times
schulzor2004
Posts: 29
Joined: Mon Jan 12, 2009 2:43 pm

Re: XNA 3.1

Post by schulzor2004 »

Hi,

tried it, but it does not work: On Windows: no problem, but on XBox, as soon as I create a Space-Object, the whole XBox is going to nirvana.

I have made a simple Program, that just draws a blue screen on XBox. When I deploy it, it works, than I insert following code in the Initialize Method:

Code: Select all

protected override void Initialize() {
  Space space = new Space(new PersistentUniformGrid(10));
  base.Initialize();
}
running this on XBox, it goes to a black screen and never returns, it does not respond to anything, I have to restart the device....
schulzor2004
Posts: 29
Joined: Mon Jan 12, 2009 2:43 pm

Re: XNA 3.1

Post by schulzor2004 »

ok, thanks for the demos.

I have tried them. Working great in Windows but do not on XBox. When deploying and starting, following message occures:

"An unhandled exception of type 'System.TypeLoadException' occured in Unknown Module.

Additional information: The File- or Assemblyname 'Microsoft.Xna.FrameWork.Game, Version=3.0.0.0, Culture=neutral,........ a dependency of this was not found...."

I had to translate this message, so it might be not completely the same in english. But something tries to load some things from Version 3.0 of XNA, but I cannot find out what it is. I think something within the Bepu Library??

Thanks for helping!
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: XNA 3.1

Post by Norbo »

It seems as though I incorrectly assumed the upgrade wizard would update the references of the Xbox360 project; I'll get some updated assemblies up momentarily.
schulzor2004
Posts: 29
Joined: Mon Jan 12, 2009 2:43 pm

Re: XNA 3.1

Post by schulzor2004 »

ok, perfekt .... I am waiting for this and will test it asap ;-)
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: XNA 3.1

Post by Norbo »

Okay, I've put some new versions up onto the download page that should be correct. Let me know if anything else goes wrong.
schulzor2004
Posts: 29
Joined: Mon Jan 12, 2009 2:43 pm

Re: XNA 3.1

Post by schulzor2004 »

it works, great !

Thank you very much for the fast help!
schulzor2004
Posts: 29
Joined: Mon Jan 12, 2009 2:43 pm

Re: XNA 3.1

Post by schulzor2004 »

ok, did some more tests and works great, now I have to do some performance increase on that on XBox...

BTW here is a Video, showing the nearly finished kitchen-Level and some of the physics I have used: http://www.laxaris.com/index.php/videom ... hen-level/
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: XNA 3.1

Post by Norbo »

Very nice! I hope to have v0.10.0 out in the not too distant future as well; its internal multithreading should help out quite a bit.
schulzor2004
Posts: 29
Joined: Mon Jan 12, 2009 2:43 pm

Re: XNA 3.1

Post by schulzor2004 »

I hope you can publish Version 0.10 very soon, because my Physics Calculation takes about 60% of the whole time on XBox360. Do you have any hints, where I can start optimizing?
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: XNA 3.1

Post by Norbo »

Judging by the video, your best bet would probably be making sure that all unnecessary physics are deactivated. For example, in the video, the buoyant sponge in the sink took a while to come to rest. You could increase the damping applied by the water to make sure it settles down, and then possibly increase the space.simulationSettings.linearVelocityClamping to make things go to sleep faster.

Since the game doesn't appear to have many simulations that need to persist when the character isn't around, you could also try forcing objects to sleep using (Entity).deactivate(). When the character's view approaches, you can then force them awake again.

Sleeping objects have a very, very low overhead, so even the Xbox can handle quite a few.
Post Reply