Jump to content

  • Log In with Google      Sign In   
  • Create Account

Collision Detection (2D & 3D)


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 Streetmedic   Members   -  Reputation: 102

Like
0Likes
Like

Posted 18 May 2014 - 01:55 PM

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 



Sponsor:

#2 C0lumbo   Crossbones+   -  Reputation: 2498

Like
2Likes
Like

Posted 18 May 2014 - 02:38 PM

This book is pretty good (if you want an entire book devoted to the subject of collision detection)

 

http://www.amazon.com/exec/obidos/tg/detail/-/1558607323?tag=realtimecolli-20



#3 L. Spiro   Crossbones+   -  Reputation: 14267

Like
4Likes
Like

Posted 18 May 2014 - 08:56 PM

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
It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums

#4 imoogiBG   Members   -  Reputation: 1247

Like
0Likes
Like

Posted 19 May 2014 - 01:32 AM

 

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.



#5 #Include Graphics   Members   -  Reputation: 405

Like
0Likes
Like

Posted 19 May 2014 - 02:32 AM

 

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



#6 L. Spiro   Crossbones+   -  Reputation: 14267

Like
0Likes
Like

Posted 19 May 2014 - 02:37 AM

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


It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums

#7 cozzie   Members   -  Reputation: 1765

Like
0Likes
Like

Posted 19 May 2014 - 04:22 AM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS