Farseer or Box2D? Top-down shooter physics implementation
Asked Answered
A

3

6

Which one of these would fit a top down shooter better?

I've heard that Box2D performs faster, but I've also noticed that it lacks wider community support for XNA (it rather seems to be used for flash - for a reason unknown to me).

Farseer is however built for XNA, and seems to fit it and perform pretty fine. Farseer's advantage in my opinion is also it's clean, easy to use API (also it'd fit my game-engine's structure perfectly). However I'm affraid I'll have some drawbacks if I use it (bullets and high speed bodies? strange not a number crashes?)

Overall I'd appreciate if you'd point out which one fits better XNA/PC development.

Reasons why I need this:

  • It is not going to be used only in one top-down shooter, it's meant for integration with game framework.
  • Even a top-down shooter would be more appealing in an environment with better collisions, realistic physics - for example you could move a box to get into cover?
  • Manual control of collisions in an pixel perfect manner would be too expensive (I don't have time to optimize it - nor I need it if high-performance physics engines with advanced collision detection algorithms exist out there), whilst bounding box collision is way to unrealistic.

Do I deserve an answer with your opinion now? Please keep it straight and tell me did I make a wrong step by using Farseer instead of Box2D? (I had to start working while waiting for an answer.)

Thanks in advance

Asteria answered 7/2, 2010 at 14:17 Comment(0)
B
3

Why use a physics-library in a top-down shooter ?

I think all you need is some basic collision-detection / handling. Running a complete physics simulation seems a bit over the top.

Edit:

Personally I think I'd go for Farseer, I've heard good things about it and it seems to be well supported. The point is that for a decision based on arguments, one would first need to know exactly what it will and won't be used for, what you expect of it in terms of functionality, speed and supported platforms, what you expect in terms of support, etcetera. Just asking "What physics-lib should I use for a topdown shooter" is not enough information. Especially if you edit it later on to say it's actually not for a topdown-shooter but for general use in a game-engine :-)

Bullivant answered 8/2, 2010 at 14:11 Comment(2)
I'd appreciate if you'd simply answer the question. I have my personal reasons, if you want, I'll share them with you in the edited question.Asteria
Thanks for the answer! I'm not sure did you notice that I said I need it for XNA games with PC in mind (platform). Also I needed a comparison of Box2D and Farseer, and since they are basically two "same" things (Farseer is based of an older Box2D build), but I wanted to know which one is supported - which one has been more dedicated to XNA by the developers, and which one has community that is using it with XNA. I thought it'd be more or less self explanatory, so I'm sorry that it wasn't. People rarely read long questions and I tried to keep it short. Thanks again!Asteria
M
3

I'd go with Farseer for sure (although I've used it previously so I am biased). It has a lot of examples and even has some specific optimisations for the .Net compact FX. Internally it is based on Box2D (yes it is a slightly old build) but it is being actively developed all the newer features of Box2D are pulled across. The API is mature, clean and easier to use than Box2D. If all that doesn't sway you, then this should: http://ianqvist.blogspot.com/2010/12/benchmarking-box2d-based-physics.html

Milklivered answered 8/8, 2011 at 2:30 Comment(0)
T
2

I definitely suggest using Farseer, it has been in development for long (>3 years) and I think its major flaws have been corrected.

Towill answered 9/2, 2010 at 12:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.