Simultaneously, a more sophisticated
graphics engine was being constructed from several
others examples, with provision for a virtual
screen, numerous geometrical routines, page
flipping, and PCX loading. A seperate unit,
Images, was designed for the loading, storage,
and display of Canvas II images. These were
then stored on 64000 byte buffers, allocated
from the heap, and kept in the same format in
whcih they were to be displayed: ie. drawn onto
this buffer as if it were another virtual screen.
A simple pascal routine could then transfer
the image to the real or virtual screen by simultaneously
scanning the buffer and the destination. This
was still slow, but the increased flexibility
of the engine allowed the construction of Faculty,
which exhibits some much more sophisiticated
imaging techniques, as well as some interesting
game engine characteristics. The next important
refinement to the engine occured, however, once
the images were stored in a continuous stream
in the file, allowing them to be blockread into
the buffers and facilitating the creation of
the image compiler and compressor, vital to
reduce the large numbers of images into a single
file as is the case in Trooper II. In the new
engine, images were stored in a simple linear
form in the buffers, which greatly reduced the
space taken up (there was no longer 'white space'
that could not be filled) and allowed a different
combination of images to be loaded for each
level, as occcurs in Trooper II, without complex
routines to determine the position for iamge
loading on the buffer. More complex procedures
were then required to draw the images, but refinement
of the pascal allowed this process to be speeded
up to a point where full screen page-flipping
animation was possible, and Trooper II could
begin to be constructed. Over 200 images are
included in the central image registry for the
full game: the engine deduces which are necessary
when each level is loaded, includes standard
images that a required for all levels, and loads
them nose-to-tail into the several graphical
buffers reserved either in the conventional,
XMS or EMS memory. A special routine was written
to rapidly display the scrolling background,
and images are invoked simply by their registry
numbers when the engine requires they be drawn.
I had effectively constructed the graphical
template for a sprawling platform game: over
a year of work was required to finish the engine,
draw and integrate the graphics, tune the AI
and write the level editor. Trooper II, with
all its source code, is available for download
in the Trooper II section of this site. One
project still remained, however: the construction
of a high resolution, SVGA graphics engine that
was at least as powerful as the MCGA one I had
already developed. There are many MCGA sprite
engines available on the internet, and a few
SVGA; even one BGI unit for that purpous; but
very few offer the versatility of SVGA imaging
that I required. It was obvious that to implement
a similar engine, that was capable of entirely
automating the five segment switching process
that is necessary to access the entire SVGA
display, I was going to have to use more power
than Pascal afforded. I had already learnt some
assembly language, but this was the largest
test I put it to.
Previous
Page | Next Page