RE: RE: Space Wars

From: jeff hendrix <jhendrix_at_quark.com>
Date: Thu Feb 03 2000 - 13:45:08 EST

I'm making one of the ships at 0,0 so all the calculations are 8 bit.
I've been trying to figure out a way to determine which segments to limit
the checking to, but I keep running into problems.
Each ship has 3 different sections, so I should be able to eliminate at
least one from each (in theory)
It takes some calculation to not only determine what angle they are
approaching each other, but what direction each ship is facing in relation
to that angle, and in a lot of cases I would only be able to eliminate one
segment.
The other variable is if the segment is already gone and it would have to
check the segments on the opposite side of the ship (in which case we would
want to throw out those segments)

If anybody wants to see the current state of space wars, download the
following file and throw it in you mame rom directory.
http://www.diac.com/~jeffh/vector/Spacduel.zip

-jeff

-----Original Message-----
From: Andrew Wilson [mailto:awilson@seanet.com]
Sent: Thursday, February 03, 2000 10:03 AM
To: vectorlist@synthcom.com
Subject: Re: VECTOR: RE: Space Wars

        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.
---------------------------------------------------------------------------
** 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 14:11:03 2000

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