Scavenger and this README file were written by David Ashley.
You can contact me at
dash@netcom.com, or dash5@geocities.com
http://www.geocities.com/TimesSquare/Arcade/4567
The X Scavenger home page is
http://www.geocities.com/TimesSquare/Arcade/4567/linux.html
You can always get the latest version there.

or
   David Ashley
   PO Box 1802
   Eugene, OR 97440
   USA

This is my first linux/xwindows contribution so please be patient with
me. Send me *ANY* and all comments you have, please! I love to get feedback.
---------------------- COPYING ------------------------------------
Let's put it under the GNU license, shall we?
---------------------DISCLAIMER!!!!!----------------------
USE THIS AT YOUR OWN RISK!!!! I'm not responsible for any damage this
software may cause.
---------------------  GAME PLAY  ------------------------------
Scavenger is like Lode Runner. You've got to run around gathering objects
while avoiding enemies. You can dig down through some of the blocks to get
at buried objects. After you've collected everything, ladders may appear.
To finish the level you've got to exit through the top of the screen. If
an enemy falls into a dug brick, he is stunned for a while. If the brick
fills in with him in it, he is killed, and he will reappear at the top of
the screen.

This version has a level editor for designing your own levels, and a
graphics editor for drawing your own artwork.
-------------------    INSTALLATION:  --------------------------
Thanks to Adam Jenkins <ajenkins@cs.umass.edu> for making an
Imakefile for scavenger, it's easy. First, CD to the src directory,
then do xmkmf and then a make:
$ cd src
$ xmkmf
$ make

It shouldn't give you any errors.
Now, as root, do
$ make install

This should do everything. Now run scavenger
$ scavenger

The first time you run scavenger it wants to create a directory
$HOME/.scavenger and copy some files into it from the global library
file, and it should print out some statements telling what it's doing.

If you don't have root access, don't do the "make install" above (it won't
work most likely). Instead, create a directory $HOME/.scavenger and
copy all the data files into it, as well as the scavserver executable:
$ mkdir ~/.scavenger
$ cp data/* ~/.scavenger
$ cp src/scavserver ~/.scavenger

Put the scavenger executable somewhere in your path, and run it. You may
need to rehash.

If you want to modify any of the files and then recompile, I think you have
to do "make depend" to remake the executables.
$ make depend
----------------  How to run scavenger ------------------------------

Run by just typing "scavenger":

$ scavenger

The first time you run it, it may print some messages out as it
creates or copies over some necessary files.

-----------------  GAME CONTROLS    ---------------------------

The default control is with the number pad keys 4-9:

 Dig left     Move up     Dig right
     7           8           9
     4           5           6
 Move left   Move down    Move right

As of version 1.3 you can remap the controls. In demo mode hit space
to get to the menu, then hit F10 to remap the keys. For each key if you
hit escape the key is unchanged.

F8    Skip to next level
k     Kill player (useful if he's trapped)
ESC   Exit back to demo mode
Pause Pause game
--------------------   WHAT TO DO IF YOU LIKE THIS GAME ---------
If you like this game, here's what to do:
1) If you have contributed something useful to the Linux community, you
   can use Scavenger for free!
2) If you are more of a user but money is tight, you can use Scavenger
   for free!
3) If you're a user but can afford it, you might consider sending me some
   money to help me continue to make games for Linux/Xwindows. Maybe send
   me $10 or $20 US cash? Or anything you can spare. Thanks!
4) If you create any levels, send them to me!!!!!
5) If you create any artwork, send it to me!!!!!

This is a full working version of the game, not crippled in any way. You've
even got the source to the game. Also all 180 levels are included. I've
put a lot of work into it...it would be nice to get some kind of reward
for it.
----------------------  DETAILED INFO -----------------------
 ---  DEMO MODE: ---
The game starts up in demo mode, where the game is playing on its own.
Some keys do things:
F1    Start game at first unsolved level
F2    Enter animator
F3    Enter level editor
F4    Start game at level 1
F8    Skip to next demo level
Alt-X Exit game
Space Go to a menu listing the above things,

 ---  MENU MODE: ---
In the menu you get the option to change your player name with F5
F5    Change player name.
The F8 key doesn't do anything in the menu, it only works while the game
is demoing. I just put it there for informative purposes.

 ---  ANIMATOR MODE: ---
The color table will switch all around, don't be surprised.
The animator is a lot like Dpaint.

b        Pick up brush. Click somewhere in the blowup and drag an area.
shift-b  Go back to last brush.
x        Flip brush in x, or flip square if no brush in hand.
y        Flib brush in y, or flip square if no brush in hand.
z        Rotate brush 90 degrees, or rotate square if no brush in hand.
.        Go to having a single point brush of the current color.
[ and ]  Select previous and next color
,        Pick a color--click somewhere in the blowup to use the same color
         as another one you see. Shorthand for this is clicking left or
         right mouse button on the large color boxes under the icons on
         the center right.
Alt-1    Select the background artwork to work on
Alt-2    Select the hero artwork to work on
Alt-3    Select the enemy artwork to work on
Alt-4    Select the hidden enemy artwork to work on
u        UNDO
f        Area fill mode
d        Draw mode
v        Vector mode
r        Rectangle mode
ESC      Exit back to demo mode

Shift-S  Save out file
Shift-L  Load in last saved file
-        Go to smaller built in brush
=   (+)  Go to larger built in brush.

Draw in the blowup box. Clicking the left mouse button draws with the
primary color (indicated by the square in the color map). The right mouse
button paints with the secondary color. Change the primary by clicking
the left mouse button on the color array, and change the secondary by
clicking the right mouse button on the color array.

Select which box to work on with the left mouse button, just click on
the box.

Copy on box to another by using the right mouse button and a click-drag-
unclick operation.

Change the color table by moving the RGB sliders. It is sometimes useful to
change the background color (normally the black in the upper left of the
color array) to something besides black. You will be able to see other
animation frames that are normally hidden, such as the dig animation.

 ---  EDITOR MODE: ---
This is for creating your own levels.
l          load level (use alt-l to force a load)
w          write level (use alt-w to force a write)
space      Try the level
esc        exit back to demo mode
rightarrow Increase level #
leftarrow  Decrease level #
`1234567890-=   Select matching tile type

Left mouse button draws with current tile type. Right mouse button erases.

You can start writing new levels at 181 if you don't want to write over
existing levels.

The order of the tiles from left to right is:
Empty
brick      Your hero can dig these
cement     These can't be dug
Ladder
Rail
Fakebrick  You fall through this. The enemies think it's a normal brick.
exitladder These appear after the last object has been collected.
Object     The hero must collect these.
Enemy      You can have 0 to 5 of these
Hero       Only 1 of these
Hidden     This is a place where a hidden monster might be if you dig there.
Flashing   This object is more valuable if you collect it first.

----------------------  SCORING AND MOVIES ------------------------
You've got infinite lives to complete each level, but after each failed
attempt you start all over. Each level has its own best score. If you beat
the level's previous best score, or if the level hasn't been solved before,
a recording of your play will be stored in the $HOME/.scavenger/level.scl
file. It's fun to watch the movies play back in demo mode. Remember F8 will
let you skip levels in demo mode.

Each object is worth 250 points.
The flashing object is worth 8000 points, but you've got to get it first.
If you exit the level without trapping any monsters (the hidden monster
  doesn't count), you get a bonus of 20000 points.
If you exit the level without killing any monsters (the hidden monster
  doesn't count), you get a bonus of 10000 points. You don't get both
  large bunuses together.
The time bonus starts at 10000 points and counts down about 100 points
  every second.
The hidden monster carries an object that is worth 10000 points. Trap him
  to get it. Trapping and killing the hidden monster doesn't harm your bonus--
  the whole idea is to find him and kill him.
----------------------   LEVEL DESIGN ----------------------------
The hidden monsters are an interesting addition. Try to locate them where it
won't hurt the player. You don't want the player to accidentally find a
hidden monster while trying to dig a pit for an enemy to fall into.

The flashing object adds some more variety. Sometimes it's tricky to get
to the flashing object.

Enemies can pick up normal objects temporarily, but not the flashing object.

Writing out a level deletes the matching movie, if there is one.
------------The scavrc file---remapping keys--alternate gfx sets -----
The $HOME/.scavenger/scavrc file contains the XWindows key mappings.
You can edit this file to change the mappings, but you've got to know
the keycode. Each item is in hex.

The names:

background
hero
enemy
hidden

Point to .lbm graphics format names. If you want to see other graphics
sets, point these to other ones. If you want to create your own graphics
sets, make a copy of an existing one and put it into your
$HOME/.scavenger directory. You might want to rename it also, but keep the
.lbm suffix for future uses. Then change the scavrc file to point to your
new filename. Don't include any path, scavenger looks for the file first
in the LIBNAME (see Imakefile & names.h) then in $HOME/.scavenger.
---------------------------   LEFT TO DO/BUGS   -------------------------
I'd like to have some mechanism for viewing many levels at once, maybe
in much reduced size. I'd like to also be able to reorder levels from
within the program. I'd like also to be able to switch graphics sets on
the fly. I'd like to be able to remap the keys in a more convenient way
other than changing the $HOME/.scavenger/scavrc file.
--------------------------    THANKS     -------------------------
I learned a lot from koules (an excellent game written by Jan Hubicka).
I learned most of what I know about XWindows by looking at his code. Also
the sound player is a modified version of the one in koules. Kevin Oster
and Alex Morando designed a lot of the levels, but most of them are mine.
Ron Hunsinger figured out the algorithms for enemy movement--they match
the real Lode Runner exactly.

--Dave Ashley
Wed Apr 23 05:44:42  1997
--------------------------------------------------------------------
Fri Apr 25 20:41:50  1997
I installed the Imakefile stuff and modified the README file. Thanks to
Adam Jenkins <ajenkins@cs.umass.edu> for making the Imakefile!
Adam made the vga_tetris game that uses the svgalib. It's available on
sunsite.unc.edu in /pub/Linux/games/arcade
--------------------------------------------------------------------
Mon Apr 28 16:46:34  1997
Version is now 1.1
Thomas Haller <tha@vsnhd5.cern.ch> compiled Scavenger on an Amiga Linux
system, and found all the keycodes are different so none of the controls
worked. He modified his copy of the source so it would work, but this is
only a partial fix since each different implementaion of Linux/X has
different definitions for the keycodes. I'm copying Koules again and using
the XLookupKeysym() function, then using the equates in the <X11/keysymdef.h>
file, so it should work across all platforms with a recompile.

If you want to upgrade to this version from an older version, you will have
to delete the ~/.scavenger/scavrc file, or fix up the keycodes for the
up, down, left, right, digleft and digright. Deleting the scavrc file will
cause scavenger to create a new one. Find new heycodes in the
<X11/keysymdef.h> file.
-------------------------------------------------------------------
Tue Apr 29 17:13:10  1997
Version is now 1.2
I modified the x.c file as per instructions from Jan Schoenepauck
<schoenep@uni-wuppertal.de> so that the game runs in 16/24/32 bits per pixel
mode. It works ok (I only tried it in 8bpp and 24bpp) but there are new
problems introduced:
1) The animator display is completely messed up. The animator is unusable
   in anything but 8 bit mode. Fixing this will require figuring out how
   to fake color table stuff when there is no color table. I doubt if many
   people use the animator anyway, so it's not a critical issue. And if
   you really need the animator, switch to an 8 bit display.
2) The level editor display is supposed to have a box around the selected
   tile type. This doesn't work properly in 16/24/32 modes, it appears as
   if none of the tiles is selected.

I'm lazy so don't want to spend the time fixing these just yet.
---------------------------------------------------------------------
Thu May  8 18:30:19  1997
Version is now 1.3
I fixed it so F10 in the menu (which you get after hitting space in demo
mode) lets you remap keys. Lots of people have had to manually change
the $HOME/.scavenger/scavrc file as my defaults are not universal.
---------------------------------------------------------------------
