iDevGames Forums
Collision Detection Rant - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Game Design (/forum-5.html)
+--- Thread: Collision Detection Rant (/thread-5651.html)



Collision Detection Rant - kodex - Apr 11, 2005 09:24 AM

So i needed to step away from my work for a bit and complain about my collision detection engine. Im not really asking for help or anything im just ranting.

What i cant seem to understand if my bounds are correct then why do the stupid objects pass through eachother before they react to collisions. And working out an AI response to 2 animals hitting eachother is a nightmare because most the time they just try and turn into eachother then my collision detection freaks out and they blink and rotate in circles really fast.

What i think i need to do is step back from my code for a few days read some articles, look at someone elses stuff and then try and figure something new out.

Well i guess thats it, just wanted to bring other people into my misery a bit with me =D. Thanks for listening.


Collision Detection Rant - phydeaux - Apr 11, 2005 11:01 AM

Out of curiousity, what kind of collision detection are you trying to do? Circle? Box? Polygons?


Collision Detection Rant - FCCovett - Apr 11, 2005 11:21 AM

A few references:

http://peroxide.dk/tuts_c.shtml

1. Nevell, Graphics Gems III, pp. 231-232.

2. W.H. Press, Numerical Recipes in C, Second Edition (http://www.library.cornell.edu/nr/bookcpdf/c5-6.pdf)

3. T. Schroeder, "Collision Detection Using Ray Casting", Game Developer Magazine, pp. 50-57, August 2001 (ftp://ftp.gdmag.com/pub/src/aug01.zip)

4. T. Akenine-Möller, E. Haines, Real-Time Rendering (http://www.realtimerendering.com/int/)


Collision Detection Rant - kodex - Apr 11, 2005 11:32 AM

Bitmap Masking on oddly shaped models, but i figure i can wrap them in spheres and shot for easier detection using that.

Thanks for the links FCCovett!


Collision Detection Rant - phydeaux - Apr 11, 2005 04:42 PM

I'd go with that, too. Very few players can actually notice bitmap-precise collision detection, and actually the majority will curse your precise collision, wondering how a very narrow part of their player actually got hit. I think it's usually best to inset the collision proxy of an object somewhat.


Collision Detection Rant - kodex - Apr 12, 2005 05:48 AM

Yea thats looking good, the collision seems to be working more or less I figure i can debug it a bit more when i get everything up and going. My main issue has been the AI reaction to a collision right now the objects freak out because i have set them to look for a free path and they just kind of bounce around for a while. I tried just reversing the current direction but when objects arent hitting head on this provides some very odd results. I read an article on Flocking in Game Gems 1 (I just got the whole set) and it had some decent infomation on prey and predator AI. But off anyones head does anyone know if there are any articles online for the AI of prey/pred?