Home Forums Programming Physics engine

Viewing 7 reply threads
  • Author
    Posts
    • #8591
      Anonymous
      Inactive

      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?

    • #49177
      Anonymous
      Inactive

      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.

    • #49178
      Anonymous
      Inactive

      Thanks
      I plan on making my game in C# XNA framework does this effect what physics engine i can use?

    • #49179
      Anonymous
      Inactive

      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)

    • #49180
      Anonymous
      Inactive

      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?

    • #49181
      Anonymous
      Inactive

      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.

    • #49183
      Anonymous
      Inactive

      you could build pixel detection with with out having to add physics engine

    • #49186
      Anonymous
      Inactive

      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 :).

      http://farseerphysics.codeplex.com/documentation

Viewing 7 reply threads
  • The forum ‘Programming’ is closed to new topics and replies.