delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/05/17:32:10

From: aho450s AT nic DOT smsu DOT edu (Tony O'Bryan)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Collison detection fo Action game
Date: Wed, 05 Feb 1997 12:43:18 GMT
Organization: Southwest Missouri State University
Lines: 12
Message-ID: <32f87f78.950435@ursa.smsu.edu>
References: <855142026 DOT 12716 AT dejanews DOT com>
NNTP-Posting-Host: forseti.i97.smsu.edu
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On Wed, 05 Feb 1997 06:21:03 -0600, tamasiu AT informatik DOT tu-muenchen DOT de wrote:

>Hi!
>What is the best/fastest way to do collision detection routines for a
>Action game in Allegro?
>Chris.

The fastest way is probably to check for collision on the four "corners" of each
image rectangle.  However, that leaves a lot to be desired as far as accuracy is
concerned.  One method I use is to store the coordinate outline of each image
and check if two images overlap at any point.  It's more time-consuming, but
it's more accurate.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019