Article View: rec.games.programmer
Article #202Re: Collision detection PLEASE, all geniuses respond!
From: Timothy D. Goss
Date: Sun, 26 Jul 1992 18:14
Date: Sun, 26 Jul 1992 18:14
7 lines
971 bytes
971 bytes
How about this? Create a grid which represents the graphics screen but one which does not represent every pixel. Group pixels into 2x2, 4x4 etc groups. This grid can be used to represent the approximate location of each sprite or background image. To check if a sprite has collided with something simply check its destination position in the grid to see if any deadly objects are there. The contents of the grid could be id bytes or something. Each time a sprite is moved, its position in the grid is also updated.
Technical Details
Message-ID:
<1992Jul26.181425.207@micor.ocunix.on.ca>Path:
arc1-ca.pugleaf.net!sparky!uunet!europa.asd.contel.com!darwin.sura.net!wupost!cs.utexas.edu!torn!cunews!revcan!micor!gossReferences:
<13747@mindlink.bc.ca>Show Full Headers
Complete Article Headers
Newsgroups: rec.games.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!europa.asd.contel.com!darwin.sura.net!wupost!cs.utexas.edu!torn!cunews!revcan!micor!goss From: goss@micor.ocunix.on.ca (Timothy D. Goss) Subject: Re: Collision detection PLEASE, all geniuses respond! Organization: M.B. Cormier INC., Orleans (Ont) Date: Sun, 26 Jul 1992 18:14:25 GMT Message-ID: <1992Jul26.181425.207@micor.ocunix.on.ca> References: <13747@mindlink.bc.ca> Lines: 8