
                            *****************
                            * GX Games 1.06 *
                            *****************
                                    
                           Version 1.06 Manual
                                    
             (c) Copyright Genus Microprogramming, Inc. 1994
                      All Rights Reserved Worldwide
                                    
                            January 15, 1994
                                    
                              ============
                              INTRODUCTION
                              ============

Welcome to GX Games!

GX Games is a collection of games, written using one or more of the
toolkits in the GX Development Series. Normally, a game package includes
only the executable program. With GX Games, the executable games are
provided, along with actual source code for each game in C, Pascal, and
Basic.

Not only are the games fun to play, they are an excellent learning tool for
the GX Development Series. The games make the learning interesting, and
they cover most of the major concepts when writing any kind of graphics
oriented program.

----------------
Product Overview
----------------

The major features of the games are:

   []   5 full-featured games, in C, Pascal, and Basic
   []   Supports multiple video modes
   []   Supports multiple compilers
   []   Based on the powerful GX Development Series
   []   Includes many images and artwork
   []   Illustrates use of the GX Kernel, GX Graphics, GX Effects, GX Text,
        and the PCX Toolkit
   []   Illustrates multi-mode programming
   []   Illustrates gaming tricks and techniques
   []   Illustrates mouse and keyboard interfacing

Each game averages 2500 lines of code, in each language. GX Games includes
over 30,000 lines of commented, readable source code (10,000 lines in each
language). In addition, almost a megabyte of images are included. It is the
only games package we know of that includes source code. And the most
enjoyable learning tool!

WARNING: The game source and images are provided as a learning tool only.
This means that you are not allowed to distribute YOUR version of these
games. However, you are free to modify the games for your own personal use.
You may also develop your own games and programs, using the illustrated
programming techniques.

-------------------
System Requirements
-------------------

The following items are necessary as a minimum operating environment for
the games:

   []   An IBM PC/XT/AT, PS/2 (or 100% compatible)
   []   An IBM CGA/EGA/VGA or Hercules adapter (or 100% compatible)
   []   A Mouse (for some games)
   []   1 floppy disk drive
   []   1 high-density floppy drive (1.2M or 1.44M), or a hard disk
   []   MS-DOS or PC-DOS 2.1 or above
   []   512K of available system RAM

If you are planning to recompile any of the games:

   []   A supported compiler
   []   One or more of the toolkits in the GX Series

----------------
Using the Manual
----------------

This manual is organized into four sections.

Part I - Installation
---------------------

Getting Started explains how to install the games.

Part II - Gameplay
------------------

Gameplay covers the game instructions, and how they are played. If you are
not interested in the source code, this will be all you need to know.

Part III - Programming
----------------------

Programming details the source code for the games. It covers recompiling
the games, what toolkits are required, what functions techniques each game
illustrates, and gives some suggestions for improvement.

Appendices
----------

The appendices contain additional information, such as what to do before
calling Genus, etc..

-------------------------
Registration and Upgrades
-------------------------

It is very important that you send in the Registration and Support Card
included with this GX Series product. It entitles you to technical support,
discounts on future upgrades, and new product announcements. In addition,
we publish a newsletter and periodically send information which may be of
interest to our customers. Register and take advantage of our free
technical support and services!

NOTE: Technical support for GX Games is limited to compiling and running
the original game code, and any questions on the GX Development Series
toolkits. It does not cover game techniques, algorithms, and theories.

----------------
Contacting Genus
----------------

At Genus (pronounced "Jennis"), we believe in providing the best software
and the best support possible. When you purchase a product from us, you are
also purchasing support for that product. In addition, we want to be easily
accessible to our users. You provide us with valuable feedback concerning
product changes, enhancements, new product ideas, and company policies.
With that in mind, we provide the following methods of contacting us:

   Sales & Info   (800) 227-0918
   Main           (713) 870-0737
   Tech Support   (713) 870-0557
   FAX            (713) 870-0288
   BBS            (713) 870-0601  (300 to 9600,N/8/1)
   CompuServe           GO GENUS

   Genus Microprogramming
   1155 Dairy Ashford, Suite 200
   Houston, TX 77079

If you have any comments, suggestions, questions, or problems concerning
any of our products, please feel free to write, fax, or call us about them.
But send back your registration card we like to know who we are talking to.
Thanks!

                          =====================
                          Part I - Installation
                          =====================

This chapter describes how to install GX Games. Installation of the games
is automated by the GX Games installation program. Before you begin using
the games, be sure to:

   []   Back up the installation disks, and put the originals safely away
   []   Read the gaREAD.ME file for current changes and additions to the
        software and manual
   []   Follow the installation procedure outlined below

Following these steps will help in preventing any possible difficulties you
may have when installing the games.

----------
Backing Up
----------

After opening the package, the very first thing you should do is make
working copies of the game disks. You can do this with the DOS DISKCOPY
program (COPY and XCOPY will not work). Place the originals in a safe place
for making future working copies.

--------------
What's on Disk
--------------

The software provided with GX Games can be divided into several categories.
In order to help you decide what portions to install, the following
descriptions cover what is on the game disks.

Games
-----

You should at least install the executable games. This will also install
the necessary image files and image libraries for each game. The games
require about 1 megabyte of disk space.

Source Code
-----------

Game source code is included with every GX Games package. The source code
is well commented, and each game is fully provided in C, Pascal, and Basic.
If you are interested in how the games were written, select this option
also. Each language selected requires about 350K of disk space.

Installing
----------

To install GX Games on your computer system, place Disk 1 in drive A: and
enter the following two lines (if you are installing from another drive,
substitute that letter for the A: below):

   A:
   INSTALL

Follow the menu options for installing various parts of the package, using
the directories you wish. All programs and files are verified for data
integrity, to insure nothing is lost in the installation process. No
modifications are performed on your environment (i. e. , your AUTOEXEC.BAT
and CONFIG.SYS files).

NOTE: You can run the installation program more than once, if you later
wish to install parts of the package you decide to skip now.

Floppy Drive
------------

All of the executable games will fit on a single 1.2M or 1.44M floppy disk.
This includes the actual programs, and the image files.

NOTE: If you plan to recompile the source code, a hard disk is required.

Hard Drive
----------

The default directory options suggest installing the games all under one
directory tree, with separate subdirectories for the source. You may,
however, instruct the install program to place the files into any directory
you wish.

Networks
--------

The games will work without modification on a network. All files may be
flagged as shareable and read-only. Write access to directories is only
necessary when recompiling the source.

WARNING: Please read the License Agreement concerning networks and
multi-user usage. You must still adhere to the terms and conditions of the
License Agreement.

                           ==================
                           Part II - Gameplay
                           ==================

This section describes the actual gameplay in detail, for each game.
Although many of the games can be played by simply reading their respective
help screens, this section covers all game options. It also contains tips,
tricks, and techniques for each game, and gives some background on the game
algorithms.

----------------
Apples & Oranges
----------------

Apples & Oranges is a 2-Player game, where each player is represented by
an apple or an orange. You can also play against the computer. Each player
tries to capture the most pieces on the board, by surrounding the other
player's pieces. An opponents pieces are surrounded when a player's piece
exists on both ends of a straight line. After a move is made, all
surrounded pieces in all directions (including diagonally) are flipped to
the moving player's piece. The game ends when no valid moves can be made,
and the winner is the player with the most pieces.

NOTE: This game requires at least an EGA display card and monitor, and a
mouse.

Beginning the Game
------------------

To begin playing, make sure that the files A&O.EXE and A&O.GXL are in the
current directory. Then, simply type:

   A&O

and the game will begin.

Setting the Level
-----------------

Set the desired playing level by clicking on the LEVEL button to cycle
through the level options. For computer play, select playing Level 1, 2,
or 3. Otherwise, select 2- Player. The computer uses a different algorithm
on each level, when it is playing, with Level 3 the hardest.

NOTE: The level can be changed at any time during the game, and you can
engage and disengage the computer. If you are losing, you can cheat and
switch to 2-Player. Make a move, and change the level. Then play the other
piece, and the computer will be on the defensive!

Current Player
--------------

The active player is indicated by the beveled buttons at the right edge of
the screen. An UP button indicates the current player's turn. In addition,
the mouse cursor identifies the current player's valid moves, when placed
over the board.

NOTE: It is possible to choose your playing piece, when competing against
the computer. After selecting a new game, select the 2-Player level. If you
want to be Apple, select the computer level. If you want to be Orange,
click on UNDO first then select the computer level.

Valid Moves
-----------

A player can move only in places that capture at least one of his opponents
pieces. If a move is valid, the cursor will change to the current player's
symbol (Apple or Orange).

NOTE: If the player can make no valid moves, his turn will be automatically
forfeited by the computer. If the computer lets you make a move, there is
at least one valid move on the board. If no valid moves exist for either
player, the game is ended and a winner determined.

Making a move
-------------

A move is made by positioning the mouse cursor over the board. Click the
left button to make the move. All captured pieces will then be pushed,
flipped, and counted, in all directions.

Getting a Hint
--------------

You can ask the computer for a hint, by selecting the HINT button. The
computer will use the best algorithm, and then flash the piece it
recommends.

NOTE: If you select HINT several times, without making a move, you may
notice it does not recommend the same piece every time, necessarily. This
will occur when several moves have the same weighted score.

Undo
----

If you make a move accidentally, or you just want to change it, select the
UNDO button. In 2-Player mode, it will UNDO the last player's move only.
When playing the computer, it will undo your move, and the last computer's
move.

Selecting UNDO after a previous UNDO, with no move in between, will restore
the board (it undoes the undo). Selecting UNDO repeatedly simply toggles
between those two moves it does not undo more than 1 move.

Winning
-------

Once all valid moves have been made, or there are no more squares on the
board, the winner is determined. The player with the most pieces is
declared the winner.

New Game
--------

Selecting NEW at any time resets the current board to the initial, 4-piece
board. It does not ask you if you are sure, so do not select it unless you
mean it.

Help
----

Help is available at any time, by selecting the HELP button. A pop-up
window will be displayed, with a summary of the game play and rules. Click
the mouse or press a key to remove the help window.

Quitting
--------

To end the game and exit back to DOS, select the QUIT button. You will be
immediately returned to DOS, regardless of the status of the current game.

---------
BlackJack
---------

BlackJack is an implementation of the popular, age-old card game BlackJack
(also known as Twenty-One, or 21). This is a 1-player game, where the
computer plays as dealer.

Briefly, the object of the game is to get as close to twenty one as
possible, without busting (going over 21). You must also beat the dealer's
hand. Face cards count as 10, Aces as 1 or 11 (your choice), and all others
at face value. The object of the game is to Break the House (win all of its
money). The game is over usually when you have lost all of your money just
like Vegas!

NOTE: This game requires at least an EGA display card and monitor. It can
be played with the keyboard, a mouse, or both.

Beginning the Game
------------------

To begin playing, make sure that the files BLAKJAK.EXE and BLAKJAK.GXL are
in the current directory. Then, simply type:

   BLAKJAK

and the game will begin.

Betting
-------

Before the dealer will deal the cards, you must bet. Select the BET + or
BET - buttons with the mouse (or + and - keys). The bet will go up or down
in increments of $25, to a maximum of $250.

If you lose the hand, this bet will go to the dealer. If you win, the
dealer will match your bet. A BlackJack (21 with only 2 cards) pays 1. 5
times your bet. Select DEAL when your bet is ready.

The Deal
--------

Once you have placed your bet, the dealer will deal the cards. Your cards
are dealt face up. The dealer has one hole card, which you cannot see.

NOTE: HINT: Always assume the dealer's hole card is 10, and play your hand
accordingly.

Playing the Hand
----------------

If you have 21 (BlackJack), the dealer will pay you off immediately. If you
have a Sound Blaster card, you will hear the dealer declare "BlackJack!".
Likewise, if the dealer has 21, he will take your money without giving you
a fighting chance.

If you want another card, select HIT (with the mouse, or by pressing '+').
You can have up to 5 cards in your hand. If you do not bust (go over 21),
select STAY (ENTER). If you draw 5 cards without busting, this is termed
a Five-Card Charlie and you will win the hand.

NOTE: HINT: If the dealer's up card shows a 6, always stay no matter what
you have. If he has 16, he has the highest odds of busting.

Dealer Play
-----------

Once you have stayed, the dealer will flip over his hole (down) card. The
dealer must draw to 17 (even if he has you beat). He will stay on 17 or
above. If he busts, or ends up with less than you have, you win and he
matches your bet. Otherwise, he takes your money. A push (tie) keeps
everyone even, and your bet rides to the next hand.

Counting
--------
The computer will count your cards for you, if you do not want to think
about it. It is also handy for watching the dealer play his hand. Pressing
the COUNT button (or pressing 'C') will cause the card count to be
displayed to the left of the hands. Press the button again to turn it off.

NOTE: HINT: Always count aces as 1, until you finish counting your hand.
Then, add 10 if you can. This makes it easier to count, and helps when you
have more than one ace.

Help
----

Help is available at any time, by selecting the HELP button (or 'H'). A
pop-up window will be displayed, with a summary of the game play and rules.
Click the mouse or press a key to remove the help window.

Quitting
--------

To end the game and exit back to DOS, select the QUIT button, or press 'Q'
or ESC. You will be immediately returned to DOS, regardless of the status
of the current game.

Shortcut Keys
-------------

For those players who like to play many hands, there are some keyboard
shortcuts. Place your bet using the grey PLUS and MINUS keys, and press the
ENTER key when your bet is ready. Then, press the PLUS key to take a hit,
and the ENTER key to stay. After the dealer has played his hand, press a
key to clear the cards right away. Press the grey ASTERISK * to bet your
last bet, and press ENTER to deal again.

Using this method, your hand can stay at the right side of the keyboard,
and you can play BlackJack all night long!

--------
MindPlus
--------

MindPlus is a 1-Player color-combination guessing game. The computer
randomly selects a series of 4 to 5 colors, out of a palette of 6 to 10,
and your job is to guess them. The bad news is the colors can be used more
than once. The good news is the computer will give you hints about each
guess. You must guess the color combination before you run out of moves.

NOTE: This game requires at least an EGA display card and monitor. It can
be played with a keyboard or a mouse, or both.

Beginning the Game
------------------

To begin playing, make sure that the file MINDPLUS.EXE is in the current
directory. Then, simply type:

   MINDPLUS

and the game will begin.

Accessing the Menu
------------------

The options for MindPlus are in a menu located at the top of the screen.
To access the menu, move the mouse into the top title bar the menu will
appear. Select any of the options, and when you leave the menu area, it
will disappear again.

To use the keyboard, press the escape key ESC the menu will then appear.
Then use the first letter of each option for option selection. Press ESC
again to leave the menu.

Setting the Level
-----------------

Set the desired playing level by selecting the LEVEL option on the menu.
Selecting the level more than once cycles through the levels. The level
determines how many pegs are used, how many colors, and how many moves
(guesses) can be made. When you leave the menu, the playing board will be
reset. The following levels are possible:

   []   Level 1: 4 Pegs,  6 Colors, 14 Moves
   []   Level 2: 4 Pegs,  8 Colors, 16 Moves
   []   Level 3: 5 Pegs,  8 Colors, 18 Moves
   []   Level 4: 5 Pegs,  9 Colors, 15 Moves
   []   Level 5: 5 Pegs, 10 Colors, 15 Moves

Making Your Guess
-----------------

To make your guess, select the color off of the bottom COLORS menu. Click
on the desired color with the mouse, or press one of the number keys (1
selects first color, 2 the 2nd, through 0 for 10). Place the selected color
on the CURRENT PLAY board, by clicking on the desired position. Keyboard
users can press SHIFT-1 for the first play position, and so on.

Once all pegs on the play board have been selected to your liking, click
on the puzzle board on the left to make your guess. Pressing the ENTER key
will also place your guess on the board.

NOTE: HINT: As you make each new guess, try not to change more than one peg
at a time. Otherwise, it is impossible to make any sense out of the hints.

The Hint
--------

The computer will respond with a hint. A Black peg indicates that one of
your colors is correct, and in the correct position. A White peg indicates
a correct color, but in the wrong position. The hint pegs do not indicate
which of your pegs are correct!

The hint will always place black pegs first, followed by any white pegs,
starting from the left. To crack the combination, you need to watch how the
hints change when you change the peg colors.

Winning
-------

When the hint contains all black pegs (meaning all colors are correct, and
in the correct position), you have successfully determined the computer's
combination. The computer will then reveal his board. Otherwise, the
computer will reveal his board when you have run out of moves.

Peeking
-------

If you get frustrated, or too curious, simply select the PEEK option off
of the menu. This does, however, end the current game (after all, you
peeked!).

Sound
-----

You can toggle the sound on or off, by selecting the SOUND option on the
MindPlus menu.

New Game
--------

Selecting NEW at any time resets the current board at the current level.
It does not ask you if you are sure, so do not select it unless you mean
it.

Quitting
--------

To end the game and exit back to DOS, select the QUIT button, or press the
ESC key. You will be immediately returned to DOS, regardless of the status
of the current game.

-------
Puzzler
-------

Puzzler is a 1-player game, where almost any PCX image can be scrambled
into square puzzle pieces. The number of pieces in the puzzle can range
from 4 to 400! The object of the game is to solve the puzzle in the fewest
moves, or the fastest time. You win when the puzzle has been completely
solved.

NOTE: This game requires a mouse. It works with most display cards and
adapters.

Beginning the Game
------------------

To begin playing, make sure that the files PUZZLER.EXE and PUZZLER.GXL
exist in your current directory. To load the EGA puzzle, simply type:

   PUZZLER EGA16 /LPUZZLER

and the game will begin. There are two other images in the library. For
CGA, use the CGA4 image; for VGA, you can load any of the images, including
the VGA256 image.

You are not limited to using the three supplied images with Puzzler. To use
your PCX image (lets call it MYIMAGE.PCX), simply type:

   PUZZLER MYIMAGE.PCX

and the game will begin. Loading images from another library is the same
as the first example above.

NOTE: Some images are better puzzle images than others. For instance, a
solid color screen would be difficult to solve, since all of the pieces
look alike! An image with any constant regions will have the same problem.
The puzzle images included with Puzzler make good puzzles you may have to
experiment with your own images.

Setting the Pieces
------------------

Set the desired playing pieces by including /Wnn and /Dnn (where nn
represents a number from 2 to 20) on the command line, when beginning the
game. This sets the number of playing pieces across the width and depth of
the image. The total number of pieces will be WIDTH*DEPTH.

NOTE: If you set the piece size too small, some pieces may start to look
the same. If two or more pieces appear identical, it can be very difficult
to solve the puzzle.

Making a move
-------------

A move is made by positioning the mouse cursor over the piece you wish to
move. Click the LEFT mouse button to select the puzzle piece to move, and
a dashed box will surround the piece. Then position the cursor over the
location you wish to move the selected piece to, and click the RIGHT mouse
button. The two puzzle pieces will be swapped. If the piece is correct, a
double sound blip will be heard otherwise, there will be a single error
tone.

The number of moves you have made, the number of puzzle pieces correct, and
the time elapsed are all displayed while you are solving the puzzle.

Mode Override
-------------

Sometimes Puzzler cannot tell the mode of the original image, or you may
wish to play the game in a similar (but higher or lower resolution) mode.
Use the command-line option /Mxnn to set the mode explicitly, where nn
represents the mode number. For instance, to force play from an EGA to a
VGA 16-color mode, use:

   PUZZLER MYIMAGE.PCX /Mx12

This sets the game to VGA mode 12H, 640x480x16.

Libraries
---------

Puzzler has the ability to load images from a GX Series .GXL library. If
the image MYIMAGE.PCX is in the library MYLIB.GXL, use the command:

   PUZZLER MYIMAGE.PCX /LMYLIB.GXL

and the image will be loaded. Puzzle play continues as if it was loaded
from a file.

Display Correct
---------------

To display the number of pieces currently in the correct position, press
the 'C' key. The incorrect pieces will be blanked out, leaving only the
correct ones. Press a key to return to the game.

NOTE: This option carries a move penalty of 3 moves, which
will be added to your move count.

Locate Place
------------

To locate the position for the currently selected puzzle piece, press the
'L' key. If the piece is not already correct, the correct location will be
blanked out.

NOTE: This option carries a move penalty of 2 moves, which will be added
to your move count.

Peeking
-------

If you get frustrated, or too curious, simply select the 'P' key. The
entire image will be displayed, as it should be solved. All pieces are
placed in their correct locations.

NOTE: This option carries a move penalty of 5 moves, which will be added
to your move count.

Sound
-----

You can toggle the sound on or off, by pressing the 'S' key. This can make
the puzzle more difficult to solve, because your move is not confirmed as
correct.

Rescramble
----------

If you do not like the current puzzle scramble, press the 'R' key to
rescramble it. It will scramble the puzzle immediately, regardless of the
status of your current game.

Help
----

Help is available at any time, by pressing the 'H' key. A pop-up window
will be displayed, with a summary of the gameplay and rules. Click the
mouse or press a key to remove the help window.

Quitting
--------

To end the game and exit back to DOS, press the 'Q' key, or press the
escape key ESC. You will be immediately returned to DOS, regardless of the
status of the current game.

-----------
Space Miner
-----------

Space Miner is a 1-Player, arcade-type game, where you maneuver a mining
ship through space. Your mission is to gather (mine) ore, which is in
abundant supply in the Mega-Ore system. Unfortunately, an evil regime has
declared the ore to be its own, even though your family has mined it for
generations. You boldly ignore the regime's claim, and mine it anyway. In
the process, you have to avoid alien drones, police, and automated mulchers
all while trying to meet your ore quota with a limited supply of
ammunition.

NOTE: This game requires at least an EGA display card and monitor. No mouse
is required.

Beginning the Game
------------------

To begin playing, make sure that the files MINER.EXE and MINER.GXL are in
the current directory. Then, simply type:

   MINER

and the game will begin.

Maneuver
--------

The game is played using the cursor keys to maneuver your ship. The cursor
keys control the ship's thrusters. A single press fires the thrusters once.
Since this is space, your ship will continue in that direction, without
holding the key down. Another press in the same direction, and your ship's
speed will double. This is your ship's maximum speed.

To slow down, press the opposite thruster key (ie, a left key followed by
a right stops the ship's momentum). Diagonal movement is possible with the
use of the HOME, PGUP, PGDN, and END keys.

NOTE: Do not hold down the cursor keys! This will only fill up the keyboard
buffer, and slow down the game. It will also prevent you from firing.

Mining Ore
----------

To mine the ore randomly moving throughout the sector, your ship has a
small ore vacuum. Simply move your ship over the ore, and your vacuum will
collect it. If sound is enabled,an audible tone will be heard as the ore
is collected.

Firing
------

To fire a torpedo, press the space bar. Several torpedoes can be fired and
active at the same time. A sound will be heard confirming the launch, as
the torpedo launches.

Aliens
------

Alien drones will attempt to line up with your ship, and fire at you.
Several aliens can be attacking at one time. They will break off the attack
if they pass your ship.

The aliens explode when your shot hits them. They also explode when they
touch your ship, a mulcher, or the police.

Police
------

There are not as many police, so there is no more than one present at any
given time. If they see you doing anything illegal (like mining ore), they
may chase you. If they chase you, they will sound their siren, and will
fire at you. They will not give up until you are destroyed, or you destroy
them.

NOTE: The police are invincible to everything except your torpedoes. They
do not mind running you over, or any alien drones in their path.

Mulcher
-------

The Mulcher is an automated ore ship. It sucks in ore with its powerful ore
vacuum, and mulches it. It does not care about you just watch out for its
vacuum!

WARNING: The mulcher is invincible to almost everything. As a renegade
miner, it is your job to figure out what. After all, it does contain a lot
of ore . . .

Losing Your Life
----------------

There are many things that cause your ship to explode. Do not touch
anything but ore touching an alien ship, the mulcher, or police will
explode your ship. Alien drones can also fire and hit your ship, and a
chasing police will also fire on you.

Leaving Sector
--------------

To leave the sector, you must gather your quota of ore. As you pick up each
piece, it will be subtracted from your quota. Once your quota is met, you
can leave the sector by moving your ship off the top of the screen.

Your ship will then be advanced to the next sector, where there is more
ore. Of course, there are more aliens and police, also.

The game is won when you have successfully completed all 3 sectors. You
lose the game when you run out of lives before completing your mission.

Game Speed
----------

The speed of the game (refresh rate) can be controlled with the keypad plus
and minus keys. Press the minus key (-) to slow the game down, and the plus
key (+) to speed it up.

The speed of the game refresh rate depends on the speed of the computer.
However, the game timing is machine independent. This means that the
objects do not perform faster or slower (ie, the police come just as often,
and the aliens fire at the same rate).

Sound
-----

You can toggle the sound on or off, by pressing function key F2.

Quitting
--------

To end the game and exit back to DOS, press the escape key ESC at any time.
You will be immediately returned to DOS,regardless of the status of the
current game.

                         ======================
                         Part III - Programming
                         ======================

This section describes the actual programming for each game. Although the
source code for the games is very readable, this section covers the
following:

   []   How the games relate to the GX Development Series
   []   What programming techniques each game illustrates
   []   Suggestions for game improvement

For those users who want to know more about graphics programming, or simply
want to learn more about the toolkit functions in the GX Development
Series, this section will bean invaluable reference.

NOTE: This source code, modified or not, may NOT be freely distributed. All
of the source code, images, and executables are the sole property of Genus
Microprogramming, Inc.

This means that releasing YOUR version of this game is prohibited. Please
appreciate that this source code is provided as a learning tool for
developing your own programs using the GX Development Series.

Before attempting to make any modifications, we suggest you make yourself
familiar with the gameplay. This will help you understand the code. The
source is heavily commented, and is very readable.

-------
General
-------

Style
-----

All of the games adhere to our own programming style standard. This
standard has allowed us to program in any language, using the same coding
format and practices. Because we know many people will be looking at our
source code, it is important to have it well organized and readable.

You will notice that constants are used wherever possible. This amplifies
the program's readability immeasurably. Indentation is done with 2 spaces,
rather than tabs, so that any editor can be used to view the files without
custom tab stops. Each function and procedure is separated, and the
programs are heavily commented (always on the previous line,except for
constant and variable descriptions). Constants are always capitalized, and
any function, variable, or constant is meaningfully named.

Mouse Decoding
--------------

Game layout really has much to do with mouse input and decoding. A common
mistake is to lay out buttons at any location which means that every mouse
click has to be tested uniquely against every button region.

To avoid this, buttons should be laid out in regions. This allows the
program to decode a click quickly. If a click is detected inside the
region, it is not tested against each button position, but it is decoded
by columns and rows.

Any buttons should be lined up, both horizontally and vertically. Even
though these buttons may be tested individually, it makes it easier to
initialize their position on the screen. It is also aesthetically pleasing.

Video Modes
-----------

The games use a range of video modes. Puzzler supports any image type, from
CGA to Super VGA. Apples & Oranges supports only EGA 16-color. BlackJack
and MindPlus support EGA or VGA16-color. Space Miner supports only EGA
320x200 16-color. This illustrates several methods for supporting multiple
video adapters.

----------------
Apples & Oranges
----------------

Apples & Oranges is a board game, and uses several of the GX Development
Series toolkits. It illustrates piece selection,cursor definition, movement
algorithms, effects, sound, and more.

Compiling
---------

To recompile A&O without any modifications, the following GX Series toolkit
libraries are required:

   []   GX Kernel
   []   GX Graphics
   []   GX Effects
   []   PCX Toolkit

Simply compile and link the language source code of your choice (A&O.C,
A&O.PAS, or A&O.BAS) using your compiler (for C, use the Large memory
model). Make sure that the GX Series include files and libraries are
accessible.

NOTE: Detailed compiling instructions for each language and compiler are
included in the program source code. If required, consult your GX Series
User's Guides for more information on compiling with the GX Series
toolkits.

-------------
Toolkit usage
-------------

The following lists cover some of the GX Series Toolkit features
illustrated by Apples & Oranges.

GX Kernel
---------

A&O uses many of the features of the GX Kernel. The kernel is shared among
the libraries in the GX Series.

   []   GXL Library interfacing
   []   Virtual buffer creation
   []   Virtual buffer scaling
   []   Virtual buffer manipulation
   []   Multiple toolkit usage

GX Graphics
-----------

A&O makes extensive use of GX Graphics. Most of the game is created through
the use of graphics primitives everything except the title, and the playing
pieces. The program uses:

   []   Simultaneous keyboard and mouse interfacing
   []   Defining custom mouse cursors
   []   Maintaining a cursor type based on cursor position
   []   Decoding mouse clicks efficiently
   []   Drawing to virtual buffers
   []   Pop-up windows (for help)

GX Effects
----------

GX Effects is used very little in A&O, except for:

   []   Background Music (PC Speaker)
   []   Performing an effect

PCX Toolkit
-----------

The PCX Toolkit is used for the loading the game title, and the playing
pieces.

   []   Loading PCX images from a GXL library

----------
Techniques
----------

In addition to the toolkit usage above, Apples & Oranges illustrates some
of the following gaming techniques:

   []   Board Algorithms
   []   Efficient mouse decoding

Algorithms
----------

It is interesting to play the game against the computer, at each of the
levels. The first level is totally random, and it can do a pretty good job
of keeping up with you.

The second level would seem to be the best, for it looks for the maximum
pieces it can flip. After all, that is what most players do when playing
the game.

The third level uses a weighted algorithm to play the game,and does not
look at the pieces flipped at all. It would seem that this would cause the
computer to lose miserably. It is actually waiting for the end, where it
knows that capturing the corners will flip the most pieces.

There is room for improvement, though, as detailed later.

Board Layout
------------

Board layout really has a lot to do with mouse input and decoding, as
detailed at the beginning of the chapter. For instance, the A&O board has
64 squares, which would take forever to test, and would create unnecessary
code. Instead,the entire board is treated as a mouse click region. If a
click is detected inside the board, it is not tested against each button
position, but it is decoded by columns and rows. This helps for the valid
position cursor logic, also. Even the other buttons are lined up, both
horizontally and vertically.

It also affects image placement, since the playing pieces can be placed at
rows and columns. The pieces are created as the same size, so that widths
and depths stay constant. They are also centered in their own image, so
that the winning image screen at the end appears centered and proportional.

Video Mode
----------

Apples and Oranges uses the EGA 640x350 16-color mode 10H (GX Display type
gxEGA_10). This was selected to illustrate the common practice of using the
lower, more common video mode to support a wider range of adapters, even
though EGA technology is over 5 years old.

Valid Moves
-----------

To optimize the valid move logic, it only searches for the first valid move
it does not search for all valid moves. By breaking up the function this
way, a valid move can be checked individually, or in groups. This is
important,because the move logic is constantly checked against the cursor
position. In addition, this logic is used by the board algorithms for
initializing the valid move arrays.

-----------
Suggestions
-----------

The following suggestions are ideas for program enhancement or improvement.
Implementing some of these features is an excellent way to learn more about
the GX Series and it's fun!

Modify Tie
----------

Currently, a tie goes to the ORANGE player. This is not exactly fair.
Modify the CheckWin function so that it displays a "Tie" message. For an
effect, draw a Banana image the same size as the Apple and Orange playing
pieces and use the same scale and display logic to fade it to the screen.

Add Voice
---------

Add voice support using the GX Effects Sound Blaster support. You can add
voice comments for any of the messages (like "Thinking", "Apple Wins!",
etc), or add new ones like "Hurry up, it's your move!".

Piece Flips
-----------

When an apple captures an orange, or vice versa, use an animation sequence.
One idea is to make the pieces look like they are being flipped. Draw (or
scale) three views of each piece getting thinner. If an apple takes an
orange, show the orange getting thinner, then the apple getting thicker.
This will give the illusion the piece is being flipped like a coin.

New Levels
----------

The board algorithms for the computer are very straightforward. Add a Level
4 that combines levels 2 and 3. This means that if more than one move
exists with the same
board weight, see which move flips the most pieces (instead of selecting
one randomly).

For Level 5, add a look ahead feature. Not only look at the computer's best
move, but look ahead at the player's best responding move. Does the
computer's move allow the player to capture most of the pieces back?

---------
BlackJack
---------

BlackJack is a card game, and uses several of the GX Development Series
toolkits. It illustrates multiple image loading and display, card
algorithms, music and sound support, and more.

Compiling
---------

To recompile BlackJack without any modifications, the following GX Series
toolkit libraries are required:

   []   GX Kernel
   []   GX Graphics
   []   GX Effects
   []   PCX Toolkit

Simply compile and link the language source code of your choice (BLAKJAK.C,
BLAKJAK.PAS, or BLAKJAK.BAS) using your compiler (for C, use the Large
memory model). Make sure that the GX Series include files and libraries are
accessible.

NOTE: Detailed compiling instructions for each language and compiler are
included in the program source code. If required, consult your GX Series
User's Guides for more information on compiling with the GX Series
toolkits.

-------------
Toolkit usage
-------------

The following lists cover some of the GX Series Toolkit features
illustrated by BlackJack.

GX Kernel
---------

BlackJack uses many of the features of the GX Kernel. The kernel is shared
among the libraries in the GX Series.

   []   GXL Library interfacing
   []   Virtual buffer creation
   []   Virtual buffer scaling
   []   Multiple graphics mode support
   []   Multiple toolkit usage

GX Graphics
-----------

BlackJack uses GX Graphics for mouse support, buttons and scoring:

   []   Simultaneous keyboard and mouse interfacing
   []   Button definition and handling
   []   Drawing to virtual buffers
   []   Pop-up windows (for help)

GX Effects
----------

GX Effects is used for sound output:

   []   Background Music (PC Speaker)
   []   Voice File Output (Sound Blaster)

PCX Toolkit
-----------

The PCX Toolkit is used for the loading the game title, and all of the
playing cards.

   []   Loading PCX images from a GXL library

----------
Techniques
----------

In addition to the toolkit usage above, BlackJack illustrates some of the
following gaming techniques:

   []   Loading a deck of cards
   []   Shuffling and maintaining the deck
   []   EGA and VGA support
   []   Inactive button handling

Card Loading
------------

The order of the card loading is important in the programming of BlackJack.
The card files are all named in such a way that the name is both
meaningful, but easy to load. There are 52 cards in the deck, so you want
to load them in a loop not individually!

The naming scheme specifies the card face first, and then the suit. For
instance, KS. PCC means the King of Spades, and 8H. PCC means the Eight of
Hearts. This two-letter abbreviation is readable, and it allows the cards
to be loaded with a simple double loop.

This not only makes the cards easier to load, but the order of loading
controls how the program counts the cards. The cards must be loaded in
face/suit order. This means that the Ace of Clubs is loaded first, followed
by the Ace of Diamonds, Spades, and Hearts. Then the Two of Clubs, etc.

Card Shuffling
--------------

The actual card images are not shuffled when the deck is shuffled. A
separate array is kept, where the card positions are stored. The Ace of
Clubs is the first card loaded, so it is card position 1. These card
positions are placed at random locations in the deck array, effectively
shuffling the deck.

When it comes time to deal a card, the program gets the next value from the
deck array. If it is a 1, it displays card #1, which is the Ace of Clubs.
This avoids any unnecessary pointer manipulation, and replaces it with a
simple integer array.

NOTE: The cards are shuffled when there are less than 10
cards left in the deck, which is the maximum required to deal both the
player and dealer hands. This is also similar to Vegas, where they bury a
certain number of cards (by placing a marker before the end of the deck).
They do this to prevent card counters from cheating.

Video Mode
----------

BlackJack supports playing on both an EGA and a VGA display. It does this,
however, differently from how most games do it. Ordinarily, a program will
support the lowest common denominator the EGA 16-color mode which will work
on both EGA and VGA cards. BlackJack supports the VGA 16-color mode as its
preferred mode.

All of the graphic images are designed and drawn for the VGA 640x480 mode.
This does not penalize all of the VGA users for owning the latest hardware.
If a user is using an older EGA system, the program scales the images
(cards, etc) as they are loaded. And, they look good. The program has been
coded to adjust for the difference in resolution automatically, be getting
the display information, etc.

NOTE: If you have a VGA, use the /E command line option to force the
program to load in the EGA mode, just to see how it handles it.

Guiding Buttons
---------------

The buttons in BlackJack actually guide the player from one step to the
next. By automatically pressing down the inactive button options, the
player is given a visual representation of what options are available.

The row of buttons at the bottom start with just the BET buttons active.
After at least the minimum bet is made, the DEAL button becomes active.
After DEAL is pressed, only HIT and STAY are active, and after STAY is
pressed, no buttons are active. You will also notice that the buttons are
progressive, from left to right. The buttons guide the user through the
game, and it is an example of good user-interface design.

-----------
Suggestions
-----------

The following suggestions are ideas for program enhancement or improvement.
Implementing some of these features is an excellent way to learn more about
the GX Series and it's fun!

Double Down
-----------

Add a Double Down button. A player can double down (double his bet) after
he sees his first two cards. The price for this is he gets only one (1)
card (he has to take one).

Why would you want to do this? If you get dealt two cards totalling 11,
your chances of being dealt a face card are relatively high. And a 6 or
above does not hurt, either. But if you get anything less, you better hope
the dealer busts!

Split
-----

Add a Split button. A player can split when he has two of the same cards
as his first two cards. The best pair to split is a pair of aces (obviously
hoping for a couple of
face cards coming your way).

If the player chooses to split, the bet is in effect doubled, because each
hand is played with the original bet. Each hand is played separately, and
the player has to play the first hand to completion before playing the next
one. A player can win both hands, lose one and win one, or lose both.

Bet Last
--------

Add a Bet Last button. This feature already exists as the ASTERISK key, but
no button appears on the board.

Larger Deck
-----------

The current deck is single-deck. Add an option to play 4- or 6-deck
BlackJack, like the card shoes at Vegas.

Add Voice
---------

Add voice support using the GX Effects Sound Blaster support. You can add
voice comments for any of the messages, similar to "BlackJack!" when a
player makes BlackJack. The comments can be things like "Nice Hand!",
"Hurry up, place your bet", or "The House is hot tonight. " Or add random
comments use your imagination.

Add Sound
---------

Play a song continuously in the background. Choose something lively, like
the theme from the movie "The Sting". Or, cycle through different songs,
to keep it from getting too repetitious.

More Players
------------

The current board allows only one player, and the dealer. Try allowing more
than one player. This could be done by scaling the cards down, or
overlapping the cards dealt so just the left edge can be seen. Three
players and the dealer would be more than enough.

Odds
----

There are a few books out on BlackJack odds. There is an easy card counting
scheme, where face cards count +1 and other cards -1 (or vice versa), and
it gives you some idea on whether there are many face cards or low cards
left. This would be easy to implement as a value somewhere on the screen.

You can also keep track of the player's winning/losing hands, and have it
available as a pop-up window. Or an odds window of drawing to 16, 17, 18,
19, 20, and 21. This could be based on the player's last hands (ie, how
many times he has drawn to 16, etc); or by the number of available cards
left in the deck.

--------
MindPlus
--------

MindPlus is a board game, and uses only the GX Graphics toolkit. It
illustrates mouse and keyboard input, board levels, multiple video support,
and more.

Compiling
---------

To recompile MindPlus without any modifications, the following GX Series
toolkit libraries are required:

   []   GX Kernel
   []   GX Graphics

Simply compile and link the language source code of your choice
(MINDPLUS.C, MINDPLUS.PAS, or MINDPLUS.BAS) using your compiler (for C,
use any memory model). Make sure that the GX Series include files and
libraries are accessible.

NOTE: Detailed compiling instructions for each language and compiler are
included in the program source code. If required, consult your GX Series
User's Guides for more information on compiling with the GX Series
toolkits.

-------------
Toolkit usage
-------------

The following lists cover some of the GX Series Toolkit features
illustrated by MindPlus.

GX Kernel
---------

MindPlus uses some of the features of the GX Kernel. The kernel is shared
among the libraries in the GX Series.

   []   Video hardware recognition
   []   Multiple graphics mode support

GX Graphics
-----------

MindPlus uses GX Graphics for all of its graphics:

   []   Board and piece creation and display
   []   Simultaneous keyboard and mouse interfacing
   []   Button definition and handling

----------
Techniques
----------

In addition to the toolkit usage above, MindPlus illustrates some of the
following gaming techniques:

   []   Pop-up menu
   []   Board layout

Pop-up Menu
-----------

When the mouse is moved to the top of the screen, a pop-up menu appears.
Any of the menu options can then be selected or toggled, until the mouse
is moved out of the menu region.

This is a good way of concealing information not important to the actual
gameplay. It also does not require any kind of button on the screen all
that is shown is the actual game board.

Board Layout
------------

MindPlus is designed to distribute the board layout, depending upon the
display resolution and level. Changing the number of holes, colors, or
levels will result in a new board layout, without any reprogramming. The
board will be displayed properly, and mouse inputs will be handled
accordingly.

-----------
Suggestions
-----------

The following suggestions are ideas for program enhancement or improvement.
Implementing some of these features is an excellent way to learn more about
the GX Series and it's
fun!

Sound
-----

Add sound support using the GX Effects package. Use the PC Speaker, or add
voice file output.

More Levels
-----------

Add more levels, by adjusting the number of colors, the number of pieces
in the guess, or the number of allowed
guesses.

Peeking
-------

Allow peeking at an individual peg, instead of the entire guess. You could
allow the player to select the peg they wish to peek at, or a peek could
show all of the correct pegs. There should be some kind of penalty for
this, like decreasing the number of remaining moves.

Hints
-----

Similar to peeking, a hint would flash a color that is in the computer's
board, but not in the player's board. Another hint would be the number of
colors used in the computer's board (for instance, if two pegs in the
computer's pick are the same color, only 4 unique colors exist in the
pick).

Jazz
----

Jazz up the winning and losing with special effects, animation, and music.
Currently, a win or loss merely shows you that you did in fact get the
correct guess. GX Effects would be ideal here.

-------
Puzzler
-------

Compiling
---------

To recompile Puzzler without any modifications, the following GX Series
toolkit libraries are required:

   []   GX Kernel
   []   GX Graphics
   []   GX Effects
   []   PCX Toolkit

Simply compile and link the language source code of your choice (PUZZLER.C,
PUZZLER.PAS, or PUZZLER.BAS) using your compiler (for C, use any memory
model). Make sure that the GX Series include files and libraries are
accessible.

NOTE: Detailed compiling instructions for each language and compiler are
included in the program source code. If required, consult your GX Series
User's Guides for more information on compiling with the GX Series
toolkits.

-------------
Toolkit usage
-------------

The following lists cover some of the GX Series Toolkit features
illustrated by Puzzler.

GX Kernel
---------

Puzzler uses many of the features of the GX Kernel. The kernel is shared
among the libraries in the GX Series.

   []   GXL Library interfacing
   []   Virtual buffer creation
   []   Multiple memory support
   []   Multiple graphics mode support
   []   Multiple toolkit usage

GX Graphics
-----------

Puzzler uses GX Graphics for mouse support and scoring:

   []   Simultaneous keyboard and mouse interfacing
   []   Button definition and handling
   []   Drawing to virtual buffers
   []   Pop-up windows (for help)

GX Effects
----------

GX Effects is used for sound output:

   []   Background Music (PC Speaker)

PCX Toolkit
-----------

The PCX Toolkit is used for the loading of the puzzle images.

   []   Loading PCX images from a GXL library

----------
Techniques
----------

In addition to the toolkit usage above, Puzzler illustrates some of the
following gaming techniques:

   []   Scrambling an image
   []   Fast display
   []   Dynamic mouse hotspots
   []   Wide video support
   []   EMS memory support

Scrambling
----------

The puzzle image is not really scrambled in memory only the original image
is loaded. This also saves program memory.

The image is scrambled by randomizing the total number of puzzle pieces in
an array. If there are 20 pieces, 20 numbers are scrambled. A piece is in
the correct location if it is in the same array position (ie, array
position 12 contains piece 12). When a piece is moved (actually, two pieces
are swapped), only the equivalent array locations are swapped.

When the scrambled image is displayed, the scrambled array is checked.
Then, the virtual display function is used to pull that piece out of the
source image, and place it at its current location on the display.

Fast Display
------------

When a piece is moved, only those two pieces are redisplayed (instead of
blindly redisplaying all pieces). This speeds up the flow of the program
considerably, especially when an image has many pieces.

Dynamic Hotspots
----------------

The number of puzzle pieces can be changed to nearly any number by the
user, and the pieces are all scrambled and displayed properly. The mouse
handles the piece size transparently. This is another example of lining up
the hotspots in a grid, instead of recording (x1,y1)-(x2,y2) locations.

Video Support
-------------

Puzzler supports the widest range of video modes out of all the games. It
supports any display type supported by the GX Series. Not only that, it
supports images of any size, up to the size of the current display mode.

It does this through the power of the GX Kernel virtual display functions,
and the loading capabilities of the PCX Toolkit. The game code does not
change depending on the image size and resolution.

Memory Support
--------------

Puzzler automatically switches to EMS memory, if available, if the image
cannot be loaded into conventional memory.

-----------
Suggestions
-----------

The following suggestions are ideas for program enhancement or improvement.
Implementing some of these features is an excellent way to learn more about
the GX Series and it's
fun!

Flash Location
--------------

Flash the location of the selected piece, instead of merely blanking out
the piece location. A puzzle with many pieces, or with some black pieces,
make the location hard to find. Flashing the piece (display, blank,
display, blank, etc) would eliminate this problem.

Animation
---------

You may want to try animating the puzzle. This would involve having 2 or
more images for each puzzle, and cycling through them every 1/2 second. The
resolution of the image may limit the speed of the cycling. Or, just
animate the puzzle when it has been completed, as a more elaborate winning
screen.

The program can be set up to automatically detect if an image is a single
frame, or an animated set. Use the extension as a numbering scheme, like
MYIMAGE. 000, MYIMAGE. 001, etc. Then the number of frames in the animation
could be limited only by memory.

NOTE: The EGA 320x200x16 mode has 8 video pages, which can be flipped at
very high speeds. When a piece is moved, update all of the used video
pages, and keep cycling.

Puzzle Pieces
-------------

If you are really in for some tough fun, try to rewrite the game with
actual puzzle pieces. Use a generic (repeating) puzzle mask to break the
puzzle up, using the GX Effects mask creation and transparent display
capabilities.

-----------
Space Miner
-----------

Compiling
---------

To recompile Space Miner without any modifications, the following GX Series
toolkit libraries are required:

   []   GX Kernel
   []   GX Effects
   []   GX Text
   []   PCX Toolkit

Simply compile and link the language source code of your choice (MINER.C,
MINER.PAS, or MINER.BAS) using your compiler (for C, use the Large memory
model). Make sure that the GX Series include files and libraries are
accessible.

NOTE: Detailed compiling instructions for each language and compiler are
included in the program source code. If required, consult your GX Series
User's Guides for more information on compiling with the GX Series
toolkits.

-------------
Toolkit usage
-------------

The following lists cover some of the GX Series Toolkit features
illustrated by Space Miner.

GX Kernel
---------

Space Miner uses many of the features of the GX Kernel. The kernel is
shared among the libraries in the GX Series.

   []   GXL Library interfacing
   []   Virtual buffer creation
   []   Multiple toolkit usage

GX Effects
----------

GX Effects is used extensively by Space Miner, for effects, masks,
animation, and sound:

   []   Background Music (PC Speaker)
   []   Graphics effects
   []   Creating image masks
   []   Transparent Put

PCX Toolkit
-----------

The PCX Toolkit is used for the loading of the game screens and objects.

   []   Loading PCX images from a GXL library

----------
Techniques
----------
Miner;techniques>

In addition to the toolkit usage above, Space Miner illustrates some of the
following gaming techniques:

   []   Animation
   []   Continuous images
   []   Image movement
   []   Multiple image control
   []   Multiple video pages
   []   Timing
   []   Collision detection

Animation
---------

Space Miner is the only game that performs image animation. Almost every
object is represented by more than one image. Each object has an image
array, which is cycled through for normal movement. An explosion is handled
by a separate array of images.

The animation adds realism to the game, with things like flashing lights
on the police, alien drone banking, hero engine flames, mulcher movement,
and more.

All of the animation is performed using the GX Effects transparent put
function fxPutImage. The images are first drawn and loaded, and then the
masks are created with fxCreateImage.

Space Loop
----------

The illusion of movement is accomplished by an 800 line virtual buffer.
This buffer contains the background space scene for each level (sector).
A continuous loop is created by displaying the top of the buffer at the
bottom of the screen, as the bottom of the buffer moves toward the top.

This seam is only on the screen for part of the loop, but the image is
designed so that it is visually undetectable. The space loop usually takes
one GX function call to display, and at the most two.

Image Movement
--------------

Space Miner draws all of the objects on video page 1. First, it displays
the next section of the space background. This accomplishes two things: it
moves the background, creating the illusion of movement; and it erases all
previously drawn objects. Next, it transparently places all of the active
objects in their new positions. Lastly, it copies the completed viewport
section from the hidden page (page 1) to the active page (page 0).

There are two reasons for drawing on the hidden page. The first reason is
to reduce flicker. Since the player's eye never sees the object disappear
(which usually happens when the object background is restored, or in this
case, when the space background is updated), there is no flicker. The
gxDisplayDisplay function updates the screen extremely fast. The second
reason is object clipping. When the objects are placed on the hidden page,
there is no need to worry about overwriting the edge of the viewport
screen. The clipping is accomplished when the viewport is copied, and
creates the sense that the image is passing beyond the edge. This also
eliminates the need for slow clipping code.

NOTE: For an illustrative example of how this is performed, press the ALT-1
keys when playing Space Miner. This will show you what is going on the
hidden video page. You will see the objects extending past the viewport,
and how the screen would appear without the page copy (it flickers). To
restore the viewport screen, press ALT-0 to display page 0.

Timing
------

Timing control is very important to Space Miner. It controls how fast the
screen is updated, how fast objects appear, how fast objects can fire, and
more.

The GX Kernel has a high-resolution millisecond timer. Most programs are
limited by the accuracy of the BIOS timer tick, which has a resolution of
1/18.2 seconds.

Collisions
----------

Most of the game has to do with whether two objects overlap. For instance,
whether the hero has bumped into an alien drone, the police, the mulcher,
or a piece of ore. Even the shots fired must be detected as object
collisions.

Amazingly, the collision algorithm is very small. Instead of testing if
parts of an image lie within parts of another, it actually tests for
whether the objects DO NOT overlap. It boils down to this:

If the object  lies completely above, below, to the right, or to the left
of the other object, they DO NOT overlap.

This simple test involves only one IF statement, and can be performed very
quickly.

Cheat Keys
----------

Several cheat keys have been left in Space Miner. These keys were
originally used for debugging, but we left them in so you can use them when
modifying the program. They are:

   []   'L' increases your lives (+5)
   []   'A' increases your ammo (+10)
   []   'Q' decreases your quota (-10)

These keys are useful when trying to test out level changes, hero dying,
police response, etc.

-----------
Suggestions
-----------

The following suggestions are ideas for program enhancement or improvement.
Implementing some of these features is an excellent way to learn more about
the GX Series and it's fun!

Harder
------

To make the game harder, decrease the shot distance of the hero's torpedo,
and increase the distance of the alien drones shots. Other options are:
more drones (either simply more, or more often), higher quotas, less ore,
less ammo, less active hero shots, faster police, etc.

Pause
-----

A pause key would be a nice addition. If you hit the keyboard PAUSE key,
it does pause the game now. However, all of the object durations will
continue to elapse. This means that the screen will be filled with ore, the
mulcher, aliens, and police when the game is continued!

Smart Bombs
-----------

Give the hero a limited number of Smart Bombs. These would appear on the
status bar, and would be released by something like the ENTER key. A smart
bomb would destroy all aliens and police currently on the screen.
Optionally, it could burst the mulcher if the mulcher was near the hero
when the bomb was released.

The number of smart bombs available could be limited by elapsed time, or
by ore gathered.

Hyper Space
-----------

Hyper Space would make the hero ship disappear, and reappear at some random
location. This would be most useful in tight spots, where the drones and
police are closing in. The disadvantage is, of course, the new place could
be anywhere even a worse spot.

You may want to restrict the placement so that the hero never appears on
top of another object. But, he could appear right in front or below
somebody.

Shields
-------
Shields would allow the hero to protect the ship from alien and police
fire, and some collisions. Shield strength would start at some level, and
decrease when hit by bullets or ships. The amount decreased would depend
on the type of hit, and the shields could regenerate slowly (elapsed time),
or only be restored at the beginning of each life or sector.

When shields are lost, the ship is vulnerable and can be exploded.

New Levels
----------

New levels can be added after sector 3. These levels can continue to
increase the number of aliens and police, etc. , as mentioned in the
section above for making the game harder. Create new space backgrounds for
each new sector.

Large Ore
---------

Introduce some larger ore. This ore could be too big for the hero's ship
to collect directly, and would actually cause the ship to explode if it
collided with the large piece. The hero could bust the ore up with a
torpedo, and then collect the smaller fragments.

Other ships, such as the drones and police, could explode if colliding with
the ore, and could be programmed to shoot the larger ore if it was ahead
of them.

Bonus Objects
-------------

Create Bonus Objects that float by the screen, similar to the ore. These
could appear infrequently, and would be brightly colored. The objects, if
collected, would be worth more ammo, more valuable ore pieces (like gold
ore), an extra life, etc. If the bonus object is collected, add a special
sound effect.

Sound Effects
-------------

Add sound effects with the use of the GX Effects Sound Blaster voice file
interface. Record some small voice files for realistic torpedo fire,
explosions, space noise, bonus objects, etc.

If the user has a Sound Blaster, use the better sound effects instead of
the PC Speaker.

Mouse Support
-------------

Use GX Graphics to add mouse support. There would not be a mouse cursor the
mouse would be used to control the ship movement. As the mouse moves, move
the ship. To fire, click the mouse button.

High Scores
-----------

Maintain a file of high scores, and prompt the user for his name. Call the
screen Major Miners, or something like that, and display it at the end of
the game (when the player loses his last life). Use it as a transition from
one game play to the next.

Finale
------

The program finale (both winning and losing) could be jazzed up. Instead
of displaying a teaser message, display an animation sequence.

You could use the fancy ship at the beginning of the game, and create a
second ship with different exhaust flames (use different, but similar
colors). If the player won, play a winning song, and fly the ship across
the viewport and over the planet. Alternate between the two images, to
animate the flames. If the user lost, play a losing song, and sink the ship
slowly down the viewport. Or, get fancy and create a dramatic explosion.

                               ==========
                               Appendices
                               ==========

We believe in customer service and satisfaction. If you have a question
about our products, or you just generally require assistance, we want you
to call. For possible methods of contact, please see the introductory
section Contacting Genus. All we ask is that you make an honest effort to
find the solution in the manual first, or try a few different methods of
arriving at your desired result. This keeps our phone lines open for our
customers as much as possible. Sending in your Product Registration Card
insures first-class treatment.

In light of this, we have prepared this appendix on assistance. It outlines
the steps to take when you do have to call, and whom to talk to. There is
a checklist for helping you get what we need from you together. Following
this information will help us to help you. Thanks!

Sales
-----

Ask for Sales when you have a question about your order, you wish to place
additional orders, or you require additional information on Genus products
or services. Use our main phone number, or our Toll-Free 800 number (800)
227-0918. You will find that the sales staff will be happy to assist you.
They can also answer most general questions about any Genus product as long
as you don't get too technical.

Technical Support
-----------------

Ask for Technical Support when you have one of our products and need
assistance in getting it to work, or when you need additional technical
questions answered before deciding to purchase. Use our direct technical
support number (713) 977- 0680. Our technical staff is fully knowledgeable
about our products, and about all aspects of the IBM family of computer
hardware, software, and peripherals. And if they do not have the answer,
they should be able to point you in the right direction.

--------------------------
"Before Calling" Checklist
--------------------------

In order to help you better, it is important that we know who you are.
Please tell us the name or the company name of the owner of the Genus
software product. We may need additional information about your software
and hardware configuration if we need to help you solve a problem. We have
prepared a checklist that you should go through before calling us, so that
we may serve you quickly and effectively:

   []   Make sure you have read this section thoroughly
   []   Check the function return codes they are there to help you. If you
        are getting an error, read the error description in the Appendix
   []   If you feel one of our functions works incorrectly, try isolating
        the problem in a small example program
   []   If you are having a problem with something that the utility
        programs can do (for instance, displaying an image), try using the
        utility if the utility program cannot do it, you may not have the
        necessary hardware
   []   Have your product version and serial number handy this is located
        on the disk envelope, and on a set of stickers
   []   Know to whom the product is registered
   []   Know your computer, display adapter and monitor type
   []   Check what version of DOS you are using
   []   If using a compiler, have the name and version ready and the names
        of any programming libraries used
   []   Have a list of any memory-resident software
   []   Be able to describe your problem clearly
   []   If at all possible, be at your computer
   []   If we cannot solve your problem on the phone, you may be asked to
        upload, fax, or mail us a section of your code. Sometimes simply
        seeing the affected code allows us to solve a simple problem
        avoiding a lot of guessing and wasted time on both of our parts.

                         =======================
                         GENUS LICENSE AGREEMENT
                         =======================

THIS IS A LICENSE AGREEMENT AND NOT AN AGREEMENT FOR SALE. A LICENSE
AGREEMENT IS A LEGAL AGREEMENT BETWEEN YOU, THE END USER, AND GENUS
MICROPROGRAMMING, INC. PLEASE READ THIS LICENSE AGREEMENT CAREFULLY BEFORE
OPENING THE SEALED DISK ENVELOPE. IF YOU DO NOT AGREE WITH THE TERMS AND
CONDITIONS OF THIS LICENSE AGREEMENT, PROMPTLY RETURN THE ENVELOPE UNOPENED
(ALONG WITH ALL ACCOMPANYING ITEMS) AND YOUR MONEY WILL BE REFUNDED.

Genus Microprogramming, Inc. , a Texas Corporation, provides this program
and licenses its use. Your use of the program acknowledges that you have
read this agreement, understand it and agree to be bound by its terms and
conditions.

LICENSE
-------

You may use this software on a single computer, but may transfer it to
another computer as long as it is used on only one computer at a time. You
may copy the software for backup or modification purposes only. You may
modify the software and merge it into another program for your use on a
single computer. You have a royalty-free license to reproduce and
distribute executable files you have created using this software. You may
not include any functions in a programming library, or any application that
is a tool to be merged into yet another programmer's application. You may
not use the functions for the sole purpose of recreating one of the
functions or utility programs. You may not distribute any portions of this
software, such as source code, . OBJ or . LIB files, utility programs, or
any other files included with this package. In addition, you may not
translate, decompile, disassemble or reverse engineer the software. You
also may not create any derivative works based on this software. A
derivative work is defined as a translation or other form in which the
software may be recast, transformed or adapted.

This is a single-copy version. You may, however, use this software on a
network, which is a combination of two or more terminals that are
electronically linked and capable of sharing the use of a single software
program, provided only one network user at a time uses it, and that user
has possession of the original documentation and disks during his or her
use. For multiple user use, a Site License must be purchased separately,
directly from Genus.

This software package may contain both 3 1/2" and 5 1/4" disks. You may
only use the disks appropriate for your computer. You may not use the
remaining disks on another computer or network, nor may you loan, rent,
lease or transfer them to another user. If the entire software package is
transferred to another user on a permanent basis, then both sets of disks
must be transferred to that user. If you transfer the software, you may not
retain any of the disks or copies thereof for your own use.

You may transfer this software and license to another party if the other
party agrees to accept the terms and conditions of this license, and you
either transfer or destroy all copies in your possession whether in printed
or machine-readable form. This includes all modifications and portions of
the software contained or merged into other programs. You may not export
the software or related technical data in contravention of the Export
Administration Act or U. S. Department of Commerce EAA Regulations.

YOU MAY NOT USE, COPY, MODIFY OR TRANSFER THE SOFTWARE, IN WHOLE OR IN
PART, EXCEPT AS EXPRESSLY PROVIDED FOR IN THIS LICENSE.

This license is effective until terminated. You may terminate it at any
time by destroying the software together with all copies, modifications and
merged portions in any form. The license also terminates if you fail to
comply with the terms and conditions of this agreement.

Genus retains title to and ownership of the software. All copies and
portions of the software, in any form, belong to Genus which retains all
rights not expressly granted. Nothing in this License Agreement constitutes
a waiver of Genus' rights under the U. S. copyright laws or any other
Federal or State law. Genus or its designee has the right to audit your
computer and software usage to determine whether any unauthorized copies
of this program have been made.

This software and accompanying documentation are protected by United States
Copyright law and also by International Treaty provisions. Any use of the
software in violation of these laws constitutes termination of the license
and can be prosecuted.

LIMITED WARRANTY
----------------

Genus warrants that the diskettes on which this software is furnished to
be free from defects in materials and workmanship for a period of 90 days
from the date of delivery to you. Genus does not warrant that the functions
contained in this software will meet your requirements or that the software
operation will be uninterrupted or error free.

Genus' entire liability and your exclusive remedy shall be the replacement
of any diskette not meeting Genus' "Limited Warranty" and which is returned
to Genus within the warranty period with a copy of your receipt or other
proof of payment.

IN NO EVENT WILL GENUS BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING ANY LOST
PROFITS, LOST SAVINGS OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THIS PROGRAM, OR FOR ANY CLAIM BY ANY
OTHER PARTY. THE ENTIRE RISK AS TO THE RESULTS AND PERFORMANCE OF THE
PROGRAM AND MANUAL IS ASSUMED BY YOU.

CLOSURE
-------

This agreement shall be construed, interpreted and governed by the laws of
the state of Texas. You agree that this is the complete and exclusive
statement of this agreement which supersedes any prior agreement or other
communication between us on this subject.

Should you have any questions concerning this Agreement, or if you wish to
contact Genus for any reason, please write: 

   Genus Customer Service
   1155 Dairy Ashford, Suite 200
   Houston, TX 77079

