Collision Detection (2D & 3D)

Started by
5 comments, last by cozzie 9 years, 11 months ago

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

Advertisement

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

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

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

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.

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

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

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

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.

Crealysm game & engine development: http://www.crealysm.com

Looking for a passionate, disciplined and structured producer? PM me

This topic is closed to new replies.

Advertisement