MULTI-TREK
1.0 INTRODUCTION
This game was written as a tool to test the use of shared global
areas with time-shared programs. The game consists of five parts, the
shared global area (LEDFOR), the driver task (MTREKD) which controls
the universe, the PLAYER task which interfaces with the players, the
initialization program (MTREKINI), and the robot ship program (ROBOT).
The source code for the game is intended to be public so that en-
hancements can be added by any interested party. Those making addi-
tions should add their names to those listed as contributors at the
start of the MTREKD program.
Note
MTREK was originally developed under IAS but is written
almost entirely in RATFOR and should be readily convertible to
RSX-11M or, for that matter, to any system that supports
shared global areas and time-shared tasks or some equivalent.
MTREK was originally written at Boeing Computer Services
in Seattle, Washington by Don Ledford, John Lutch, and Ray
French. The current game is an enhanced version developed at
The Institute For Cancer Research in Philadelphia, Pa. by
Bill Wood, Bill Cael, and Bob Stodola.
Good luck, and don't get discouraged as the game requires a little
practice!
2.0 PLAYING MULTI-TREK
The game is very similar to the traditional Star-Trek game with
the following exceptions. First, the game involves several players
(1-6), each of whom has his own terminal and starship. Second, the
game runs in real time as far as the players are concerned. For exam-
ple, if you are going warp 8 you will continue to move regardless of
your activity at the terminal (unless you are destroyed, hit some-
thing, run out of energy, or change your warp speed). Each player's
status and position as well as the scores of all players is displayed
and continuously updated at each player's terminal. (The update rate
is twice per second, but the source code is commented on where to
change it should you wish to do so.) Third, at the present time there
are no Klingons or Romulans to shoot down, instead you shoot (or at
least attempt to shoot) the other players.
The universe consists of a 80 by 80 matrix which wraps around
itself. Therefore if you move off one end of the universe you appear
on the other end. (This is true of phasers and torpedoes also.)
The universe is made up of the following items:
1. " " Empty space
2. "-" Universe boundary
3. "*" Star (a star may go supernova when a torpedo hits it)
4. "B" Star-base (ram it to dock and thereby refuel)
5. "H" Hyperspace point (described below)
6. "R" Random hyperspace point (also described below)
7. "+" Torpedo
8. "^" Homing torpedo (seeker)
9. "#" Black hole will pursue nearest player
10. "@" Anti-matter pod
11. "%" Energy net
12. "1"-"6" Player's ships
2.1 HYPERSPACE PORTS
When a hyperspace port is hit by a ship the ship is teleported to
a new location in the universe. The "H" type of hyperspace port can
be used to go to a set location whereas the "R" type of port produces
a random jump. The "H" ports are located at fixed locations; these
are as follows:
Port Number X Coord Y Coord
----------- ------- -------
1 20 75
2 50 70
3 80 75
4 20 25
5 50 30
6 80 25
The network of ports looks like this:
1 3
2
5
4 6
By using the "H" command a player can set the port number he
wishes to appear beside the next time he goes into hyperspace through
an "H" type port. For example, if a player used the "H" command to
set his hyperspace setting to 4, the next time he ran into an "H"
character he would appear near coordinates 20,25.
A player's anti-matter pod can travel through hyper-space also;
upon re-emergence in the universe, it blows up. Pods going through
random hyperspace reappear randomly; those going through "H" type
ports reappear at the pod owner's current hyperspace jump point.
2.2 SCORING
The current scores of all players are displayed on the screen. A
'*' beside a score indicates an active player. The following actions
result in score changes:
1. Torpedo hit on enemy vessel: +500
2. Homer hit on enemy vessel: +300
3. Phaser hit on enemy vessel: +(between 70 and 200 depend-
ing on distance)
4. Pod explosion: +(between 300 and 1500 de-
pending on distance)
5. Torpedo hit on base: -200
6. Getting destroyed: -1000
2.3 ENERGY CONSUMPTION
1. Shooting phasers: -50
2. Warp: -.5 * WARP SPEED per time interval
3. Send message: -10
4. Collide with star: -200
5. Collide with ship: -100
6. Cloaking: -25 per time interval (default)
7. Energy net: -75 per net unit constructed (default)
8. Tractor beam: -200 per time interval (default)
Energy loss due to weapon hit is a function of shield strength
and weapon energy.
2.4 CALCULATIONS
The following formula are used:
1. Phaser hit energy:
ENERGY=900./(4. + DISTANCE)
2. Torpedo hit energy:
ENERGY=500.
3. Shield protection:
SHIELD ABSORBTION FACTOR=SHIELD ENERGY/1000.
(With a maximum value of 1.)
SHIELD DIRECTION FACTOR=
(.5 + ABS(SHIP'S DIREC - WEAPON'S DIREC)/360)
SHIELD FACTOR = SHIELD DIRECTION FACTOR *
SHIELD ABSORBTION FACTOR
SHIELD ENERGY =
SHIELD ENERGY - SHIELD FACTOR * ENERGY OF HIT
ENERGY OF SHIP = ENERGY OF SHIP -
(1.2 - SHIELD FACTOR) * ENERGY OF HIT * 6
4. Tractor beam pull:
8./SQRT(MAX(1., DISTANCE BETWEEN SHIPS-6.))
Anti-matter causes both damage to the scan, and results in an en-
ergy hit. Both of these effects are energy dependent.