*near* pixel perfect sprite3d collision?

Advanced game related topics
User avatar
aszid
Enthusiast
Enthusiast
Posts: 162
Joined: Thu May 01, 2003 8:38 pm
Location: California, USA
Contact:

*near* pixel perfect sprite3d collision?

Post 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
--Aszid--

Making crazy people sane, starting tomorrow.
Escobar
User
User
Posts: 17
Joined: Tue Aug 05, 2003 5:54 pm

Post 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
RJP Computing
Enthusiast
Enthusiast
Posts: 202
Joined: Sun Apr 27, 2003 4:44 am
Location: Michigan, USA
Contact:

Post 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:
-Ryan
RJP Computing

Ubuntu 8.10/WinXP, AMD Athlon 64 3000+, 1000MB RAM, AC 97 Audio, nVidia GeForce 7600GT 512MB
User avatar
aszid
Enthusiast
Enthusiast
Posts: 162
Joined: Thu May 01, 2003 8:38 pm
Location: California, USA
Contact:

Post 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.
--Aszid--

Making crazy people sane, starting tomorrow.
Post Reply