Page 1 of 1

*near* pixel perfect sprite3d collision?

Posted: Thu Sep 23, 2004 9:08 pm
by aszid
ok, well, i've been working away at my space shooter game, and i'm a bit stumped as to how i'm going to do *good* collision detection.

So far i have procedures for rectangle collisions, as well as circle collisions, which i will be using for a good deal of my game. however, when i think about collisions with ships, which are not rectangles or circles, i draw a complete blank. I do not even know how to approach the problem.

I would appreciate any advice or help that anyone could offer, as right now i'm just stumped :?

even if it just points me in the right direction it would be very much appreciated.


thanks in advance

Posted: Fri Sep 24, 2004 5:54 am
by Escobar
Maybe you could check out one of these articles:

http://www.gamedev.net/reference/list.a ... ryid=45#99

If your collision detection routines are fast and efficient enough maybe you can use them recursevly? Divide the circles/rectangles into smaller circles/rect, something like occtrees and check if any of the smaller space parts intersect.

I think it's hard to get a pixel perfect collision detection done without a performance lost. You have to make a decision between a degree of accuracy and speed.

You could also use something like AABB (Axis Aligned Boundary Boxes).
Maybe you already do? :D

Posted: Fri Sep 24, 2004 6:00 am
by RJP Computing
I don't know a whole lot about game programming but have you looked at the PureTools library? It has some collision detection functions in it. Just a thought. Sorry if I am being stupid. :oops:

Posted: Fri Sep 24, 2004 5:33 pm
by aszid
wow!

that gamedev site has tons of good info, I think i've got it figured out now, but i'm still gunna have to actually *write the code*

but it definantly steered me in the right direction, thanks alot.


oh, i did take a look through the puretools help file, and it does have some collision detection, but it's for 2d sprites and animsprites... so i don't think it would help with sprite3d's. thanks for the thought though.