
FlyRC programming is based upon ideas I got from the book "Zen of Graphics
Programming" by Michael Abrash.  I recommend this book to anyone interested
in programming the VGA at the hardware interface.

VGA Screen Resolution:
The object of interest when flying RC gets small very quickly.  For displaying
small objects, one would want the highest possible resolution.   This seems to
indicate that the 640x480 16 color mode is the best the VGA has to offer for
this application.  Use of the 640x480 mode brings with it some challenges as
one can not do page flipping( split screens aside ).   Without page flipping,
the viewer can potentially see the screen in a partially updated state as the
screen is changed from frame to frame; which would ruin the sense of realism of
the simulation.

Bit-Plane Animation:
This program uses what is called bit plane-animation.   The pallette for the
potential 16 colors is set such that there are 3 foreground colors and 4
background colors.  This reduces the possible colors on the screen to 7, but
makes the foreground and background completely independant of each other.  We
now have a shadow and a two color plane in the foreground; and  a two color
grass field, blue sky and white clouds in the background.   The neat thing
about stacking the pallette this way, is that the plane can be drawn without
disturbing  the background and the background can be drawn without disturbing
the plane and shadow.  One can also add interference effects with the pallette
and in this case the shadow appears in different colors on the different color
grass parts of the ground.  These color changes are completely automatic - no
code needed.   The code indepenance of foreground and background simplifies the
screen updating which helps alot in keeping the pixels on the screen in their
proper place at all times.

Dirty-Rectangles:
Or in this case - dirty scan lines.  In drawing the background changes, the new
background is compared to the existing back- ground and only the bits needed
are drawn to the screen.  In this way, there is never a pixel out of place in
the background( unless it is seen partly  drawn ).  Since ones focus is on the
plane, I don't notice any background tearing even on my 286.   The foreground
images are draw scan line by scan line.  First the scan line is drawn off
screen implementing the painters  algorithm ( drawing nearer objects over
farther ones ).  Once all the bits are in place, that scan line is copied to
the screen.  Again, there are  never any bits out of place on the screen.
Tearing is not a problem here because the plane is usually drawn on top of
itself each time, and it is drawn quickly because it is usually quite
small.  With version 1.7, the forground object( plane and shadow ) are
completely drawn in offscreen memory.  Then they are copied to the screen
memory.  Drawing to 339 lines and copying to 480 lines results in some
clipping of the objects when they are close to the viewer - usually not
noticable.

Tearing defined:
We never have a pixel out of place on the screen, but there is still a chance
that the viewer may see the screen in a state where half of the new image has
been drawn and half of the old image is still there.  This would cause an
effect where for example one of the clouds may briefly appear to be split
horizontally with the lower half shifted to the right or left from the top
half.
