Collision detection tutorials [closed]

2019-05-21 04:12发布

问题:

I'm supposed to develop a Java game using AWT. I'm stuck with the concept of "collision detection". If you can help me with any tutorials that explain the concept (how it works) or give examples (source code), I'd be grateful.

回答1:

A strong tutorial on 2d collision detection can be found at metanetsoftware (makes of N)

The authors write about the theoretical fundamentals and the challenges. They give you some code as well (not awt based but its the same procedure and the code is easy to translate). They cover more advanced topics on their page as well (for example tile-based collision detection)

Update #2: A great conceptual background is given here: GDC 2010 presentation about contact generation

Update: A fairly nice example of how different methods of collision detection work is given in this RUST library. The docs describe some of the techniques and the source code is pretty understandable. Learning from this resource gives you a lot of understanding.

On a side note: the right place to ask that stuff is at the gamedev stackexchange. Since you are just starting in that area take a look at this post