Re: RE: Space Wars

From: Andrew Wilson <awilson_at_seanet.com>
Date: Thu Feb 03 2000 - 12:02:59 EST

        Forgive me if you've already done something like this, but...

        Does it give you enough of a speed up if you do trivial rejection on
each individual segment (i.e. check the bounding boxes of the ships first, and
if they intersect, check the bounding boxes of each line segment before doing
any of the multiplies)? This could drastically reduce the # of line segments
you have to use the costly collision check on.

        One other suggestion I might have is to translate all the line segment
coordinates to a common new coordinate system. Since your ships are fairly
small, you ought to be able to translate all the line segments to be 8-bits
(based on the origin of the upper-left-most ship bounding box), which will save
you some time on some of the multiplies and divides (multiplying two 8-bit #s
into a 16-bit is twice as fast as mulitplying two 16-bit #s, as I recall). This
translation would only need to be done if the ship bounding boxes intersect,
of course.

                        Drew

   X-Authentication-Warning: beacon.synthcom.com: majordom set sender to owner-vectorlist@synthcom.com using -f
   Date: Thu, 03 Feb 2000 09:31:46 -0700
   From: Anders Knudsen <anders.knudsen@broadlogic.com>
   Content-Type: text/plain; charset="us-ascii"; format=flowed
   Sender: owner-vectorlist@synthcom.com
   Precedence: bulk
   Reply-To: vectorlist@synthcom.com
   X-UIDL: f681e7e4ce2f43e6d689a1b728d3f36b

>I guess I would ask "Why are you doing segment checking on the ships?". I
>would think if the ships met via bounding box check, that both are
>probably destroyed. What does it buy you to do this granularity of
>checking? And is it worth it to have to produce an entire piece of
>hardware for it?

   Uhm...if you remember Space Wars...you would remember that you can have
   "parts" of a ship get blown or broken off. So, if you collide slightly, or
   get shot just in the tail, you are only crippled, not yet destroyed...

   -anders.

   ---------------------------------------------------------------------------
   ** To UNSUBSCRIBE from vectorlist, send a message with "UNSUBSCRIBE" in the
   ** message body to vectorlist-request@synthcom.com. Please direct other
   ** questions, comments, or problems to neil@synthcom.com.

        

---------------------------------------------------------------------------
** To UNSUBSCRIBE from vectorlist, send a message with "UNSUBSCRIBE" in the
** message body to vectorlist-request@synthcom.com. Please direct other
** questions, comments, or problems to neil@synthcom.com.
Received on Thu Feb 3 12:39:48 2000

This archive was generated by hypermail 2.1.8 : Fri Aug 01 2003 - 00:30:57 EDT