netrek - A distributed TCP/IP based xtrek with tons of features.

    Original xtrek written by Chris Guthrie and Ed James.
    This version written by Kevin Smith and Scott Silvey.

Note:  Don't try to call "sequent.Berkeley.EDU" with this code.  It will
  fail for reasons described in "Security:".

    Overview:

netrek is a socket based xtrek written for BSD Unix 4.3.  To run it on a 
SYS V machine, you will have to deal with the standard incompatibility 
problems like bcopy(), srandom(), <string.h>, etc..

This release supports X10 and X11.  Details of this in the netrek directory.

The overall scheme is that the user has a binary which understands his
graphics needs.  It calls up the netrek server which (through inetd) starts
up a process which talks to the client (details in startup/ and ntserv/).
Then the user plays the game.

    Security:

There is a slight problem with security for this game.  If you install this
program on your local system, and use the code exactly as presented here,
there is nothing to prevent someone from making a binary which has some 
built in robot-like features (automatically phaser anyone within a certain
range, automatically fire lots of torps into any close enemies, etc.).  The
TCP/IP protocol is designed to minimize the amount of cheating anyone
can actually do, but a computer's ability to phaser and aim the torpedo
cannon is better than a humans (in general).  

On the other hand, this paradigm does present a really nice robot language.  
You could perhaps have a contest to see who can design the best unassisted
robot.  And since the client is written in C, you wouldn't have to learn
a new language to write a robot (and there is a nice layer - socket.c - 
between the local data structures, and the TCP/IP information sent back
and forth).

To provide some security for the binaries which your users may use, the
file reserved.c was written.  It is identical in both ntserv/ and netrek/.
It is a binary verification module which makes sure that the client
can perform some deterministic encryption of 16 random bits of data.
Change this algorithm, and then only your binaries will work with your 
server (other binaries will fail the security test, and be kicked out 
of the game!).

    Features:

Above and beyond the underlying design of this game, new features include:

- Multiple ship types including starbases.
- Plasma torpedoes - 'f' (must get 2 kills and refit to use).
- Tons of options in terms of display setup (multiple message windows,
    varies bitmaps for the planets, etc...)  Pop up an options window
    and try some of them out - 'O'.
- Players saved.  You now log into the game before playing.  Pick a name
    and a password.  Some number of options are saved with the player 
    (like his keymap), and lots of stats are kept about him.  If he plays
    well enough, he might be promoted to an Admiral!  (Note: for any
    stats capable of promoting s player to accumulate, the game must 
    be in 'tournament' mode - 2 teams of 5 players each.  
    P.S. DI stands for 'Destruction Inflicted')

There a ton of features beyond these, including tractor and pressor 
beams, robots which insult you, a configuration file to personalize the 
game, and lots of neat stuff.  Try it out!
