TITLE: Space Invaders
NAME: Mark Wagner
COUNTRY: USA
EMAIL: mark.wagner17@gte.net
WEBPAGE: http://www.geocities.com/Rengaw03/
TOPIC: Alien Invasion
COPYRIGHT: I SUBMIT TO THE STANDARD RAYTRACING COMPETITION COPYRIGHT.
MPGFILE: mwinvade.mpg
ZIPFILE: mwinvade.zip
RENDERER USED: 
    MegaPOV 0.5a

TOOLS USED: 
    Fast Movie Processor to convert from compressed TGA to AVI. The
Berkley MPEG encoder to convert from AVI to MPEG.  The GIMP to add the text to
the movie poster.  WinZip, to make the source files a manageable size.  A
hammer, for applying concussive maintainence to the computer.

CREATION TIME: 
    Render time 1 day 3 hours 37 min 4 sec.

HARDWARE USED: 
    400 MHz AMD K6-2

ANIMATION DESCRIPTION: 

When I first saw the topic, I had several ideas for an entry, including the
classic alien invasion from "The Hitchhiker's Guide to the Galaxy".  However,
none of them was sufficiently offbeat for my liking.  And then it struck me:
this would be the perfect round to enter a round of "Space Invaders!"  Save the
galaxy by shooting up all those endless rounds of aliens!  Be a hero to
billions!  Spend more money than you can afford!

The basic idea behind all "Space Invaders"-type games is that the player tries
to shoot the alien ships before they shoot him.  The game ends when the
computer starts playing faster than the human can respond.  The real opponent
in these games is not the computer, but whoever it was who got the previous
high score.

I happened to have "Galaxian" available on my computer, so I modeled this game
after it.

VIEWING RECOMMENDATIONS: 

The frame rate of 30 fps is only a suggestion.  This was originally modelled at
25 fps, and looks good anywhere from about 14 fps to 50 fps.  Viewing this in
full-screen mode captures the intent of the animation, but also makes MPEG
encoding artifacts more visible.  I recommend viewing the animation before
reading the text file.

DESCRIPTION OF HOW THIS ANIMATION WAS CREATED: 

Rather than try to write an AI that could play the game at a reasonable level of
competence using POV-script, I decided it would be easiest to write a game that
would output its status 25 times a second.  The resulting file contains the
largest switch/case statement I've ever seen, containing six thousand five
hundred thirty-one case statements, in a 5 MB file.  This resulted in parsing
times of two minutes per frame, and a four-minute animation.  I decided to
remove the final two thousand frames, speeding things up greatly. 
Additionally, since the MPEG encoder I use requires that input files be in
uncompressed AVI format, it reduces the disk space used from 1.4 GB to just
under 1 GB.

The ship controlled by the human player is the USS Aardvark.  I created it a few
days after the animations topic was announced, for an earlier idea I had.  It
was created using nothing but intersections, unions, and differences of quadric
surfaces.  The texturing is courtesy of H.E.Day's dirt textures.  The alien
ships are just simple CSGs I put together to look like the sort of alien craft
usually found in computer games of this type.

The fade in of the alien fleet at the beginning of each new level is not coded
in the scene description, but is a very useful MPEG encoding artifact.

There are a number of things I would have liked to add to this but didn't have
the time for:
 - Realistic explosions.  Anyone who has ever tried to create a realistic
explosion knows how hard it is.  Creating one that renders quickly is even
harder.  The explosion used in the movie poster took nine minutes to render
with antialiasing.  In comparison, the frames of the movie took less than 20
seconds each, with antialiasing.  My compromise of fading out the ships as they
are hit seems to work just as well, though.

 - More action on the part of the aliens.  I'd like to have them dive-bombing
the player, and being more active while in formation.  However, I didn't have
time to add this to the game.

 - Numerous bugfixes in the game program.  The main bug is that occasionally an
alien ship will simply "evaporate".  I think the problem is that the computer
loses track of who fired which missile, and the ship gets hit by "friendly
fire".  Additionally, under some circumstances, alien ships drift out of
formation.

 - More efficient storage of the recorded game.  The current version uses an
average of 50 bytes to store each ship position for each frame of the
animation.  A very simple compression scheme would get this down to three bytes
per ship, speeding up parsing.

 - More "Computer-esque" graphics.  Yes, I know this is a computer-generated
animation playing on a computer monitor.  However, I wanted to have each
spaceship glowing softly, like they would have on an early video game machine. 
Since as of four days before the deadline, a version of MegaPOV that allows
glows in CSG hasn't appeared, I am unable to include them.

Notes on the zip archive:
The archive contains all files needed to render the animation, with the
exception of a few include files available from my web page.  These files are
noted in the source code.  The included version of "status.inc", in
"status.zip", is the full version, not the reduced version used to generate
this animation.  The file "galaxian.zip" contains the source code for the
program used to generate the "status.inc" file, and the program itself.  The
program is, to the best of my knowlege, virus-free.

