Home Forums Programming Physics engine

Welcome to our forums. These forums were active from 2003-2014. We have now decided to close them down, but will leave them here as an archive.

Remember you can send us feedback, news, jobs and content ideas by clicking here.

If you're really stuck for time, email news@gamedevelopers.ie.

You can also follow us on Twitter @gamedev_ie 

 

 

This topic contains 7 replies, has 6 voices, and was last updated by  amethyst 4 years, 9 months ago.

  • Author
    Posts
  • #8591

    duggan
    Participant

    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

    Oisincar
    Participant

    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

    duggan
    Participant

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

  • #49179

    codesennin
    Participant

    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

    duggan
    Participant

    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

    BCFESupermario
    Participant

    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

    stephen byrne
    Participant

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

  • #49186

    amethyst
    Participant

    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

The forum ‘Programming’ is closed to new topics and replies.