|
||
|
GP Mailing List
ATXGPSIG List
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] RE: collision detection
Many ways to do it: 1) Create one color versions of all sprites in your came and add them together -- any new colors and you got a collision 2) Write special collision code supporting circles (use a basic geometry formula for circles instead in addition to boxes) 3) Support multiple collision points and boxes for each object, so you could literally cover the entire circle with collision data 4) Some systems have built in support but I have never got that to work over 8 years of writing 2-d games I recommend #3 and #2 for speed. m. -----Original Message----- From: gameprogrammer-owner@gameprogrammer.com [mailto:gameprogrammer-owner@gameprogrammer.com]On Behalf Of radsk8r@juno.com Sent: Monday, November 20, 2000 12:23 PM To: gameprogrammer@gameprogrammer.com Subject: collision detection hi there... im working on a 2-d "sidescroller" type game, and ive got the graphics up and running just fine.... i do have a question however, about collision detection. i have #defined the transparent color surrounding my sprites as TRANS_COLOR. i have already figured out a way to detect collision between the bounding boxes of the sprites however, as i am using a circular sprite for one of my main enemies, it detects collision at the corners of the bounding rectangle before the sprites actually appear to "touch" is there a way that i can ignore the TRANS_COLOR and detect a collision only when the colored pixels collide? any help would be greatly appreciated. radsk8r@juno.com ================================================================= The GameProgrammer.Com mailing list is for the open discussion of any topic related to the art, science, and business of programming games. This list is especially tolerant of beginners. We were all beginners once To SUBSCRIBE or UNSUBSCRIBE please visit: http://gameprogrammer.com/mailinglist.html ================================================================= The GameProgrammer.Com mailing list is for the open discussion of any topic related to the art, science, and business of programming games. This list is especially tolerant of beginners. We were all beginners once To SUBSCRIBE or UNSUBSCRIBE please visit: http://gameprogrammer.com/mailinglist.html
|
|