Jump to content
  • Advertisement
Sign in to follow this  
Calvin Hartwell

Collision Detection (2D & 3D)

This topic is 1668 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey All,

 

I've picked up a beginners book on DirectX and it doesn't say much about collision detection, though, I'm not really interested in API specific implementations. 

 

Basically I'm interested in understanding how collision detection works in modern games, both for 2D and 3D worlds. 

 

I had a lot of trouble when I was a kid with 2D collision detect as I had bitmap sprites (with transparency) and I could never get them to insect correctly (take an asteroid for instance, which is oddly shaped). 

 

Are there any good texts covering the topic (and other related topics)? 

 

I have the following book to hand, but it is quite dated, I wasn't sure if they are the most modern methods: 

3D Game Engine Design: A Practical Approach to Real-Time Computer Graphics (The Morgan Kaufmann Series in Interactive 3D Technology) [Hardcover]

 

Cheers,

 

- Calvin 

Share this post


Link to post
Share on other sites
Advertisement

I've picked up a beginners book on DirectX and it doesn't say much about collision detection

That’s because collision detection is unrelated to Direct3D and indeed graphics in general.
 

I'm not really interested in API specific implementations.

Good. There aren’t any.


C0lumbo already posted the most useful book on the topic.
You would also get more help if you posted in one of the more appropriate sections.


L. Spiro

Share this post


Link to post
Share on other sites

 

I've picked up a beginners book on DirectX and it doesn't say much about collision detection

That’s because collision detection is unrelated to Direct3D and indeed graphics in general.

 

 

 

I suppouse that he was talking about intersection testing?

Here are some basic functions that might help:
http://www.realtimerendering.com/intersections.html
But as said above use the Math & Physics for those questions and buy a book about math that covers intersection test.

 

For collision detection you need a physics.

Share this post


Link to post
Share on other sites

 

Good. There aren’t any.

 

 

I know that for openGL there is one for ray casting from screen space in order to know which object in the 3D world is intersected with mouse position.

 

I often found it usable when i was a  child. smile.png

Share this post


Link to post
Share on other sites

Direct3D has a “picking” sample as well, and the book to which C0lumbo linked has a few algorithms in the back for GPU-assisted collision detection, but they are only there for strict completeness.  Using the GPU to assist with collision detection is a heavily scoped application and not suitable for high-performance games; there is simply too much latency or stalling when fetching any data from the GPU to the CPU.

 

 

L. Spiro

Share this post


Link to post
Share on other sites
The DirectXmath library can get you started, with the basics of AABB, ray, OBB and sphere types, and the collisions/ intersections they can have between each other.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!