Post

 Resources 

Console


RE: Stuff... Corre (5 replies, 0 views) (2000-Jul-29)
-
A hybrid of the the mentioned techniques is probably what works best. You could do this in two steps: 1) Use intersectrect to find out if it is a possible collision 2) Use pixel by pixel testing to find out if a possible collision is an actual collission. Step 1 will be fast, step 2 will be slow. But step 2 will only be performed if step 1 returns true. As for testing objects pixel-by-pixel when using directx, just loop through the pixels of the two surfaces that might have collided (not the pixels of the back buffer) until both pixels have some other value than the color key, then break out of the loop. Step 2 could be replaced by the geometric shapes scheme suggested by Rag on a Stick, but it would probably reuire more work. A possible way to speed up step 2 might be to split the object in several rects, and use intersectrect to find out what rects intersect, and then only pixel test those. /Corre, MiCo Games http://www.micogames.com


-
Up One Level | Back to Forum

You could write it in ASM/C++ Jack Hoxley (4 replies) (2000-Jul-29)
Personally I Use ..... Adam Hoult (3 replies) (2000-Jul-29)
RE: Personally I Use ..... Almar Joling (0 replies) (2000-Jul-30)
I have even a faster way Spaghetti (1 reply) (2000-Jul-30)
Hmm, I've got something to add on that Almar Joling (0 replies) (2000-Jul-30)

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.
There have been 36 visitors within the last 20 minutes
RSS News Feed