Re: New Vector Games

From: Paul Kahler <phkahler_at_Oakland.edu>
Date: Tue Dec 29 1998 - 18:43:31 EST

> Hey guys,
> I've come a long way on space wars (but I still have a long way to go)
> and I've run into some snags.
> How exact do you guys want to see the original reproduced?
> The big stubbling block I'm running into is trying to make the explosions
> look like the original.
> In the original, the pieces maintain their same angle and size and always
> come off the ship at an angle based on the direction the ship is facing
> (really cool looking, looks like the ship is growing in size)

That's not too hard (did it for a PC Asteroids game (rocks 486)). One way
is to define a parameter E that indicates how "exploded" the ship is, then
each vertex is offset by E times some vertex-specific vector to make it
fly away. Then as you vary E from 0 to n, the ship just explodes. This
requires that no vectors share a vertex, as is commonly done - well they
can, but you need 2 verticies at the same point. Technically each piece
of the ship would get it's own direction vector multiplied by E, but I
gave each vertex a direction - if you're careful, you can make a piece
appear to spin as it flys away by giving each end a different direction
to go - too much difference and it looks unnatural because the size of the
piece changes (which can be cool if it shrinks slightly).
  BTW, since you have enough CPU and vector drawing time to draw separate
vectors during the explosion (i.e. no connecting the dots) you can just
draw it that way ALL the time with E set to zero.
  Oops! On cinematronics hardware this is simpler because ALL vectors
are drawn in absolute coordinates where Atari uses mostly relative
beam displacement as I recall. It may be a little more tricky but not
too much I hope.
  BTW2, Do the "exploding" stuff BEFORE you rotate and place the ship
on the screen, that way the explosion happens in "ship coordinates".

Have fun,

-- 
 ___   __   _   _  _
|   \ /  \ | | | || |       phkahler@oakland.edu     Engineer/Programmer
|  _/| || || |_| || |__     " What makes someone care so much?
|_|  |_||_| \___/ |____)      for things another man can just ignore. " -S.H.
Received on Tue Dec 29 17:43:39 1998

This archive was generated by hypermail 2.1.8 : Thu Jul 31 2003 - 23:01:08 EDT