Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I want to use physics engine for my game then how should I go to learn collision-detection algorithms?

When I read AI book for games, the book talks about collision detection, so I want to learn it, but what kind of book would be best?

If I had to choose to go and learn it what would you advise me to read?

  1. A physics book. (Game physics H.Ebrely)

  2. A real-time collision detection book. (Same author)

I don't know much about algorithms, some people say it's better to start with a physics book, because real-time collision detection book depend heavily on algorithms.

share|improve this question
Hello members where are game developers !!! – Mohammad Ahmed Jul 26 '12 at 2:20
It's pretty late in the US, where most of the site's traffic comes from. – David Lively Jul 26 '12 at 4:34
If you mentioned Eberly, he has a nice WildMagic engine with online support. Here's the collision detection part:… – teodron Jul 26 '12 at 9:35
@DavidLively Yeah you are tight I had forgotten this !! – Mohammad Ahmed Jul 26 '12 at 20:23
up vote 0 down vote accepted

It depends on how complex simulations are you going to need in your game, and if you're writing your own physics engine, or using an existing one.

In most games, the collisions aren't more complex than in Pong or Arkanoid. Reading a game physics book might be overkill unless you have something more complex in mind. I recommend you to follow these steps:

  1. Read an online tutorial on the basics of collision detection. There are dozens of good articles, just do a search. Start with rectangle and circle collisions in 2D.

  2. Try to implement the stuff you've read in these tutorials. Once it's up and running, start playing with it, to see how it "feels", what are the caveats etc.

  3. Once you see what should be improved in the collision detection you implemented, you can do the necessary research. Some examples keywords might be polygon collision, pixel-perfect collision, Verlet collision etc.

  4. Then if you still think you need to know more about collision detection, to make your simulation (almost) perfect, then you should look for some books to read.

share|improve this answer
Wow Marton thanks for the steps I will try it ,again thanks so much Marton :) – Mohammad Ahmed Jul 26 '12 at 20:26

Most physics engines have collision detection algorithms already built in since that is one of the more basic functions in a physics engine. Still, it is a good idea to learn, at least the basics, of what such algorithms do since it will aid you in your usage of the engine.

Bullet is a well known open source physics engine, and you can download it here:

In the zip-file for the latest version there is a manual which explains - among other things - some basics regarding collision detection.

Good luck! ///JmD

share|improve this answer
thanks so much JmD I don't know how to thanks you :) , I had already download this Lib but did not know how to use it I will see the Doc . – Mohammad Ahmed Jul 26 '12 at 20:21
So JmD you advice me to start with Library which is Bullet Lib? – Mohammad Ahmed Jul 26 '12 at 20:29
Well, it is open source and has been getting quite a good reputation. It has been used in several commercial projects, and it seems to be on par with PhysX and Havok. Some will say it is even better in some respects. So I would recommend Bullet, yes. – JmD Jul 27 '12 at 0:08
I will start with physics library then later I will read some good physics books I thinks that's much better – Mohammad Ahmed Jul 27 '12 at 11:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.