on 18-05-2012 08:13 PM
So, there has been a lot of talk about physics engines around here the last few days, that got me off onto a bit of a tangent looking for a physics engine that would work with PS Suite.
Box2D seems the obvious choice, but all the wrappers out there except Box2Dx are just wrappers around native code, which simply isn't going to work. Box2Dx has only a small amount of unsafe code which could probably be ported out pretty easily, but it's fairly dated. There is another project that seems to be a port of the JBox2D, but it's pretty early.
So then I found the XNA based FarSeer library and looked at getting it to work. I ran into a couple snags. First it needed to be converted to a PS Suite library obviously, then there was a very minor code change that had to be made to stop it from causing exceptions to be thrown, but after a brief period of time I got it working.
Anyways, you can head over here to read about how, see some sample code converted for PSS or to simply download the PS friendly DLL.
The good news is, yes, there is a working physics engine available for PS Suite. You do have to jump through a few extra hoops because of the really odd decision to base the origin at the bottom left, but its not a huge mountain to climb. Also, don't go off my sample for anything more than how to get it running, as I spent exactly six seconds looking in to *how* the Far seer engine works!
That would be why my demo app looks like this: ![]()
![]()
Anyways, hope some of you find it useful.
Cheers.
on 18-05-2012 08:33 PM
Runs horribly on a real device btw, but thats down to me not knowing how to use the library more than anything. I also edited to add these two lines to make it slightly more interactive:
sprite.Schedule( (dt) => {
sprite.Position = new Vector2(circleBody.Position.X,circleBody.Position.
if(Input2.GamePad.GetData(0).Up.Down) circleBody.ApplyLinearImpulse(new Microsoft.Xna.Framework.Vector2(0,10000));
if(Input2.GamePad.GetData(0).Down.Down) circleBody.ApplyLinearImpulse(new Microsoft.Xna.Framework.Vector2(0,-10000));
world.Step(dt);
});
on 19-05-2012 04:44 AM
on 19-05-2012 03:32 PM
No, I only specifically ran into one problem ( the internal method ), but I didn't get that intensive with it.
The performance on device though, that's disturbing, I had assumed it was simply my code.
on 19-05-2012 07:09 PM
Thank you for your dll! I didn't get Farseer to work by my own.
Finally I can see the Physics work! Yeah! :-)
on 15-07-2012 11:24 PM
I also run into this performance issues with Farseer Physics Library.
Any sugesstions?
Maybe flooting point arithmetic is slow on Vita?
PSM Developer Registration (for free) on PSM DevPortal is required to post on the forum.
Please sign out then sign in again to the forum and PSM DevPortal after you have completed the registration.
フォーラムへ投稿をするにはPSM DevPortalへの登録(無料)が必要です。
登録後はフォーラムと
PSM DevPortalを一度ログアウトし、再度ログインしてください。


Website ©2013 Sony Computer Entertainment Europe
All content, game titles, trade names and/or trade dress, trademarks, artwork and associated imagery are trademarks and/or copyright material of their respective owners. All rights reserved. [more info]
%%http://community.eu.playstation.com/t5/Announcements/Beta-Trial-Information/td-p/11386362
best_shooter.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_driver.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_performer.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_footballer.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_fighter.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_creator.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_action_player.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
dev2.png%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/Producer-and-Developer-Ranks/td-p/18407352
trophy.gif%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/The-Community-Awards-FAQ/td-p/18407096
PSlogoSM.png%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/Online-Support-Coordinator-rank/td-p/18414870