Message-ID: <001001bf599a$cefd36c0$11bab0c7@oemcomputer> From: "Gosack" To: Subject: newbie simple collision help!!! Date: Sat, 8 Jan 2000 00:39:47 -0500 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0006_01BF5970.DDABDB60" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3110.1 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Reply-To: djgpp AT delorie DOT com This is a multi-part message in MIME format. ------=_NextPart_000_0006_01BF5970.DDABDB60 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Howdy, I'm a newbie game programmer. I was wondering if I could have some help with sprite collisions... basically x and y are positions for sprite one and naturally x2 and y2 are positions for sprite 2 could somebody help me with the whole bounding box thing like just a little code or append to this code. I just want it so when the two sprites bump into each=20 other they stop. The sprites I have are 64X64...pretty standard. I KNOW this is really simple I just don't know where to start..... any help would be GREATLY appreciated!!!!! THANKS!!!!!!!!!! // Control for Player 1 if(key[KEY_LEFT]&& x!=3D0) x++; if(key[KEY_RIGHT] && x!=3D -575) x--; if(key[KEY_UP] && y!=3D0) y++; if(key[KEY_DOWN] && y!=3D-330) y--; =20 // Control for Player 2 if(key[KEY_A] && x2!=3D 0) x2++; if(key[KEY_D] && x2 !=3D -575) x2--; if(key[KEY_W] && y2 !=3D 0) y2++; if(key[KEY_S] && y2 !=3D -330) y2--; THANKS AGAIN!!! Gosack ------=_NextPart_000_0006_01BF5970.DDABDB60 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Howdy,
I'm a newbie game = programmer. I was=20 wondering if I could
have some help with sprite = collisions...
basically x=20 and y are positions for sprite one
and naturally x2 and y2 are = positions for=20 sprite 2
could somebody help me with the whole bounding box = thing
like=20 just a little code or append to this code.
I just want it so when the = two=20 sprites bump into each
other they stop.  The sprites I have are = 64X64...pretty
standard. I KNOW this is really simple I just don't=20 know
where to start.....
any help would be GREATLY=20 appreciated!!!!!
THANKS!!!!!!!!!!
// Control for Player = 1
 =20 if(key[KEY_LEFT]&& x!=3D0)
   x++;
 =20 if(key[KEY_RIGHT] && x!=3D -575)
   x--;
 =20 if(key[KEY_UP] && y!=3D0)
   y++;
  = if(key[KEY_DOWN]=20 && y!=3D-330)
   y--;
  
 
// Control for Player 2
  = if(key[KEY_A]=20 && x2!=3D 0)
   x2++;
  if(key[KEY_D] = && x2=20 !=3D -575)
   x2--;
  if(key[KEY_W] && y2 = !=3D=20 0)
   y2++;
  if(key[KEY_S] && y2 !=3D=20 -330)
   y2--;
THANKS=20 AGAIN!!!
Gosack
------=_NextPart_000_0006_01BF5970.DDABDB60--