I need to write a simple 3D billiard game using OpenGL. Which physics engine is simple and best to use in this case? Or it's better to write physics by myself?
closed as not constructive by Sean Middleditch, bummzack, Josh♦, Trevor Powell, MichaelHouse♦ Apr 4 '13 at 22:22
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. If this question can be reworded to fit the rules in the help center, please edit the question.
I've written a simple 2D billiard-like game using Box2D before.
As Digital Architect pointed out, unless the ball jumps from the table, 3D physics is overkill. And you can use 2D physics with 3D graphics.
If you decided to implement physics by yourself, this is what you'd have to do (which are already implemented in Box2D):
- Circle-Circle collision detection (when balls collide)
- Circle-Polygon collision detection (when balls collide with the edges, which are not rectangles)
- Handling collision (so that balls that collide move accordingly, depending on the coefficient of restitution)
- Applying forces (or at least set the velocity of a ball)
- Sensors (for the holes)
Also, you'd have to make sure everything works properly (no obvious bugs, which can be a pretty hard problem unless you really know what you are doing) and efficiently.