Home › Forums › Programming › Physics engine
- This topic has 7 replies, 6 voices, and was last updated 12 years, 2 months ago by Anonymous.
-
AuthorPosts
-
-
03/11/2012 at 9:43 pm #8591AnonymousInactive
Im making a 2D sidescroller puzzle game and i was wonder would i need to use a physics engine like Box2D or Farseer physics engine?
-
04/11/2012 at 12:14 pm #49177AnonymousInactive
That would depend on how exactly your game is going to work. Unless objects need to bounce, or you want some fancy soft-body physics you probably won’t need a physics engine. Finding intersections between sprites (objects on screen) can be easily done using some kind of RectIntersect algorithm. (CCRectIntersect if you’re using Cocos2d)
If you find that you do need a physics engine, Box2D is probably the better option. Not necessarily because it’s better, or more fully featured, just because it has so much more information available about it. It’s been around a long time and there’s hundreds of tutorials and forum posts that can help you track down errors very quickly.
Just a word of warning though; removing Box2d objects can be a pain in the ass, you’re going to want to look up a few tutorials on how that can be done without causing your game to crash randomly.
-
04/11/2012 at 1:58 pm #49178AnonymousInactive
Thanks
I plan on making my game in C# XNA framework does this effect what physics engine i can use? -
04/11/2012 at 3:32 pm #49179AnonymousInactive
last time i checked, XNA doesn’t come with a physics engine. There are third party libraries that you can use though for this purpose(farsheer for example)
-
04/11/2012 at 4:11 pm #49180AnonymousInactive
last time i checked, XNA doesn’t come with a physics engine. There are third party libraries that you can use though for this purpose(farsheer for example)[/quote:2975b916c1]
do you know of any beginners tutorials of the farsheer physics engine?
-
04/11/2012 at 5:33 pm #49181AnonymousInactive
dont know much about Farseer, but have used Box2D , its supported
by lots of things and even built into alot of 2d engines. Found it to do pretty much everything i needed it to do, but i might not have been the most demanding dev. -
04/11/2012 at 5:50 pm #49183AnonymousInactive
you could build pixel detection with with out having to add physics engine
-
05/11/2012 at 10:27 am #49186AnonymousInactive
If it is just basic collision detection and (non realistic) response you probably don’t need a physics engine.
IIRC Farseer is Box2D based . The Farseer site recommends the Box2D tutorials as a starting point. Scanning the "Getting Started" section of their site it looks pretty similar in syntax to Box2D in Java or C++. Box2D is really easy to learn.
If you want to be adventurous and time isn’t an issue you can always code you own physics engine – It is a lot of fun and you will learn a lot :).
-
-
AuthorPosts
- The forum ‘Programming’ is closed to new topics and replies.