Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Farseer or Box2D? Top-down shooter physics implementation

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

like image 274
Johnny Avatar asked Feb 07 '10 14:02

Johnny


1 Answers

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

like image 135
Led Avatar answered Sep 30 '22 17:09

Led