[comp.sources.games] v05i056: mpss - multi-player Star Trek game, Patch2

games@tekred.TEK.COM (08/18/88)

Submitted by: Peer Schmitz <peer@cs.kl.ac.uk>
Comp.sources.games: Volume 5, Issue 56
Archive-name: mpss/Patch2

	[This and the previous patch bring mpss upto version 1.4. This
	 patch contains all of the documentation changes, the previous one
	 all of the code changes. Feed this article to patch while in your
	 mpss source directory.  -br]

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of shell archive."
# Contents:  Patches02
# Wrapped by billr@saab on Wed Aug 17 11:50:15 1988
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'Patches02' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Patches02'\"
else
echo shar: Extracting \"'Patches02'\" \(21441 characters\)
sed "s/^X//" >'Patches02' <<'END_OF_FILE'
X*** ../../mpss/InstallRules.ms	Thu Jun 23 10:22:04 1988
X--- InstallRules.ms	Wed Jul 27 14:36:06 1988
X***************
X*** 1,5 ****
X  .TH
X! How to install or alter MPSS.
X  .SH
X  SETIING UP THE FILES
X  .LP
X--- 1,6 ----
X+ .tl ''''
X  .TH
X! How to install or alter MPSS Version 1.4.
X  .SH
X  SETIING UP THE FILES
X  .LP
X***************
X*** 11,16 ****
X--- 12,18 ----
X  inside mpsslib we put 3 files, with permissions as follows and owner
X  of all three being daemon. (ALL THIS MUST BE FOR THE GAME TO WORK!!)
X  All files in mpsslib must have permission 4755 or 4777 as shown below.
X+ The file mpssclean must have 4755 permissions too.
X  (i.e. they set uid as soon as they are invoked.)
X  
X  "mpsslib" should look like this :
X***************
X*** 17,23 ****
X  .DS L
X  
X  total 144
X! -rwsrwxrwx  1 daemon         59 May 11 15:06 mpssmail (file exec. on a new game)
X  -rwsr-xr-x  1 daemon      44032 May 12 11:07 slave (invoked by ../mpss)
X  -rwsr-xr-x  1 daemon      98304 May 12 11:11 startrek (the master game&process!)
X  
X--- 19,25 ----
X  .DS L
X  
X  total 144
X! -rwsrwxrwx  1 daemon          0 May 11 15:06 mpssmail (file exec. on a new game)
X  -rwsr-xr-x  1 daemon      44032 May 12 11:07 slave (invoked by ../mpss)
X  -rwsr-xr-x  1 daemon      98304 May 12 11:11 startrek (the master game&process!)
X  
X***************
X*** 24,33 ****
X  the directory above mpsslib should look like this :
X  
X  -rwsr-xr-x 1 daemon      mpssclean (to clean up a mess if there is one)
X! -rwxr-xr-x 1 anyone      mpss (proggie to invoke the full game)
X! -rwxr-xr-x 1 anyone      mpssrules (nroff -ms format)
X! drwxrwxrwx 1 anyone      mpsslib (subdirectory for all files.)
X  
X  .DE
X  .SH
X  How to change mpss.
X--- 26,37 ----
X  the directory above mpsslib should look like this :
X  
X  -rwsr-xr-x 1 daemon      mpssclean (to clean up a mess if there is one)
X! -rwxr-xr-x 1 daemon      mpss (proggie to invoke the full game)
X! -rwxr-xr-x 1 daemon      mpssrules (nroff -ms format)
X! drwxrwxrwx 1 daemon      mpsslib (subdirectory for all files.)
X  
X+ Make sure you read the rest of this script before trying, especially the
X+ bit on "speed tuning" below.
X  .DE
X  .SH
X  How to change mpss.
X***************
X*** 42,47 ****
X--- 46,78 ----
X  of doubt. After that invoke mpss not using the -t option and choose the terminal
X  you have implemented.
X  .SH
X+ Speed tuning : How to fine tune mpss's speed if it runs TOO fast in single player mode.
X+ .PP
X+ On some really efficient machines, when you play mpss in
X+ single player mode (with aliens) it will zap like a rocket!
X+ (i.e. execute too fast.) To reduce its speed, edit the file
X+ .DS
X+ main.c
X+ .DE
X+ .PP
X+ which contains the main game iteration loop.
X+ on line 158 there is a delay -for- loop.
X+ Make the loop take longer if you want the game to run slower.
X+ At the moment line 158 looks like this :
X+ .DS
X+ if (noofplayers==1) for (loop=1; loop < 10; loop++);
X+ .DE
X+ To make the game slower change the 10 to about 50000. (fifty thousand.)
X+ To make it very slow try 100000. Some machines will not need tuning at all.
X+ If, however you feel that your ship flies way to fast at warp one,
X+ wait until after 5.00 PM and fine tune the program by trial and error.
X+ Note - Vaxes will almost certainly run the program much much faster.
X+ Also : It is unwise to allow the delay to happen in multi user mode,
X+ as the program has to do alot more processing then anyways.  So keep
X+ the part of the statement saying ' if (noofplayers==1) '  in! Many folks
X+ will hopefully find, that the speed is quite acceptable when leaving the
X+ program as it is, so try that first before you do any tuning!
X+ .SH
X  Structure of the game..
X  .LP
X  First note that the entire game is controlled by one main master process.
X***************
X*** 67,76 ****
X--- 98,117 ----
X  Other files in the game are "shipnumber" wich only contains a number between
X  0-28 keeping track of which ship is to be allocated next. omakefile makes
X  everything with the -O option, gmakefile makes everything with the -g option.
X+ .PP
X+ Finally, theres another file, the process file which lives in
X+ /tmp/processnos. If a game and/or slave process is started,
X+ its process id is logged in that file. The file is used by the
X+ 'mpssclean' program to clean up any loose processes that hang
X+ about the system from previously, abnormally left games. Try not
X+ to mess with this file, mpssclean updates and maintains it by itself just
X+ fine.
X  
X  LIVE LONG & PROSPER
X  Any problems? ask Peer Schmitz, Department of Computer Science
X  University of Keele, Keele, Staffs, ST5-5BG
X+ 
X+ Janet: peer@uk.ac.kl.cs
X  
X  
X  
X*** ../../mpss/Rules.ms	Mon Jul 25 11:27:12 1988
X--- Rules.ms	Wed Jul 27 14:36:05 1988
X***************
X*** 1,22 ****
X! .ll 75
X! .pl 2000
X  .TH
X!                   MULTI-PLAYER-STAR-TREK,
X  .LP
X!   written by Peer Schmitz, University of Keele, May 1988.
X  .LP
X  Welcome to the final frontier. Mpss is a multi player star trek, chase
X  adventure destroy game. Every terminal is one ships flight console.
X! To invoke mpss type '/usr/games/mpss'. If this fails to work, type '/usr/games/mpssclean', which will get rid of any loose files hanging around. If you try again, and it still
X! doesnt work, tell peer. Note that 'mpssclean' kills off any game that
X  is currently in progress. Sometimes, two games are created at once, if two
X  players enter at exactly the same instant. If this happens, one player is not allowed into the game, and must simply try again. ('mpssclean' is NOT a remedy for this.)
X! Once invoked, you are 
X  allocated a ship and enter the game.
X  If you are the first player beginning a game, starting up can take
X  up to 1/2 minute. You will then see your console with various readouts
X  as well as a visual window which allows you to look into the universe.
X! Typing 'H' or '?' displays a help screen.
X  Your ship is in the middle of the cross displayed in the visual window.
X  The object of the game is to obtain the highest score by A) blasting
X  other players and B) exploring planets. If you get tired of the introduction,
X--- 1,26 ----
X! .ll 79
X! .tl ''''
X  .TH
X!                   MULTI-PLAYER-STAR-TREK, Version 1.4
X  .LP
X!   written by Peer Schmitz, University of Keele, Jul 1988.
X  .LP
X  Welcome to the final frontier. Mpss is a multi player star trek, chase
X  adventure destroy game. Every terminal is one ships flight console.
X! To invoke mpss type '/usr/games/mpss'. If this fails to work, type '/usr/games/mpssclean', which will get rid of any loose files hanging around, as well
X! as any processes from the game. (These are called peer and slave when
X! you do a ps -ax.) If you try again, and it still
X! doesnt work, ask your local system guru. Note that 'mpssclean' kills off any game that
X  is currently in progress. Sometimes, two games are created at once, if two
X  players enter at exactly the same instant. If this happens, one player is not allowed into the game, and must simply try again. ('mpssclean' is NOT a remedy for this.)
X! Once invoked, if you get messages to ask you to wait a moment,
X! do so. All waiting messages will time out if something is really wrong.
X! If all goes well, (and it normally does) you are 
X  allocated a ship and enter the game.
X  If you are the first player beginning a game, starting up can take
X  up to 1/2 minute. You will then see your console with various readouts
X  as well as a visual window which allows you to look into the universe.
X! Typing '?' displays a help screen.
X  Your ship is in the middle of the cross displayed in the visual window.
X  The object of the game is to obtain the highest score by A) blasting
X  other players and B) exploring planets. If you get tired of the introduction,
X***************
X*** 46,52 ****
X  is executed whenever a new game starts. So, if you wish to be told whenever
X  a game starts, edit the file, and put in an entry like :
X  "write <whatever your loginname is> Star Trek is starting!"
X! Make sure not to delete other peoples entries, as this will upset real trekkies.
X  .SH
X  The universe.
X  .LP
X--- 50,57 ----
X  is executed whenever a new game starts. So, if you wish to be told whenever
X  a game starts, edit the file, and put in an entry like :
X  "write <whatever your loginname is> Star Trek is starting!"
X! Make sure not to delete other peoples entries, as this will upset real trekkies.If your 'mpssmail' file is not present or if its empty :- dont worry.
X! This should make no difference to playing the game. (i.e. this is optional.)
X  .SH
X  The universe.
X  .LP
X***************
X*** 54,70 ****
X  Y coordinate approx.0-890. If you try to leave the universe, you will bounce
X  off the walls, and be sent flying in the opposite direction. Note that torpedos also bounce, so if you are near the edge, be careful not to shoot yourself.
X  Several
X! different objects exist in the universe.
X  .DS L
X  "K" - a KLINGON
X  "R" - a ROMULAN
X! "@" - a black hole. 
X! "." - a star.       
X  "*" - a starbase.
X! "O" - a planet.
X! "#" - a romulan warning buoy.
X! "k" - a klingon mevisic mine.
X! "o" - a plasmodic ustabitular time warp.
X  any other lower case letter - Another ship running with shields down.
X  any other upper case letter - The same ship running with shields up.
X  .DE
X--- 59,78 ----
X  Y coordinate approx.0-890. If you try to leave the universe, you will bounce
X  off the walls, and be sent flying in the opposite direction. Note that torpedos also bounce, so if you are near the edge, be careful not to shoot yourself.
X  Several
X! different objects exist in the universe. When you collide with them, certain
X! things happen. Colliding with some will send you flying in the opposite
X! direction. Colliding with another ship is impossible. Heres what the
X! objects look like :
X  .DS L
X  "K" - a KLINGON
X  "R" - a ROMULAN
X! "@" - a black hole.  effect - weapons are damaged
X! "." - a star.        effect - energy drops by 30
X  "*" - a starbase.
X! "O" - a planet.      effect - energy drops by 499
X! "#" - a romulan warning buoy.  effect - (who knows)
X! "k" - a klingon mevisic mine.  effect - (who knows)
X! "o" - a plasmodic ustabitular time warp. effect - (who knows)
X  any other lower case letter - Another ship running with shields down.
X  any other upper case letter - The same ship running with shields up.
X  .DE
X***************
X*** 71,87 ****
X  .LP
X  The universe is divided into four sectors, as shown below.
X  .DS L
X- -
X- -
X- -
X- -
X- -
X- -
X- -
X- -
X- -
X- -
X- -
X  ------------------------------------------------------------------------900
X  |                                |                                     |
X  |                                |                                     |
X--- 79,84 ----
X***************
X*** 102,108 ****
X  .LP
X  In the middle of each sector is a starbase. Starbases are fixed in their 
X  positions in every game, and their positions are always the same. Every
X! game has exactly 4 starbases. There are 40 planets which also have
X  fixed positions in every game. Black holes and stars are placed in random
X  positions. At the start of each game, you are placed close to the federation
X  starbase.
X--- 99,105 ----
X  .LP
X  In the middle of each sector is a starbase. Starbases are fixed in their 
X  positions in every game, and their positions are always the same. Every
X! game has exactly 4 starbases. There are 30 planets which also have
X  fixed positions in every game. Black holes and stars are placed in random
X  positions. At the start of each game, you are placed close to the federation
X  starbase.
X***************
X*** 128,134 ****
X  .DS L
X  Keys : The same as for the WARP DRIVE but upper case, i.e. :
X  
X! "H","J","K","L","Y","U","B","N" .
X  .DE
X  .LP
X  The manoevering impulse thrusters are provided to manoever safely towards
X--- 125,131 ----
X  .DS L
X  Keys : The same as for the WARP DRIVE but upper case, i.e. :
X  
X!  "H","J","K","L","Y","U","B","N" .
X  .DE
X  .LP
X  The manoevering impulse thrusters are provided to manoever safely towards
X***************
X*** 140,146 ****
X  flying with "repeat key function impulse drive" is not possible.
X  Note that when orbiting a planet you must type "o" to orbit first.
X  This switches all engines off. To leave a planet you must invoke
X! the aft impulse thrusters first. This is done by typing "i", andhas nothing to do with Manoevering impulse thrusters. After having pressed "i" to leave
X  orbit, you can WARP away, or use Manoevering Impulse thrusters to get away.
X  .SH
X  The READOUTS.
X--- 137,143 ----
X  flying with "repeat key function impulse drive" is not possible.
X  Note that when orbiting a planet you must type "o" to orbit first.
X  This switches all engines off. To leave a planet you must invoke
X! the aft impulse thrusters first. This is done by typing "i", and has nothing to do with Manoevering impulse thrusters. After having pressed "i" to leave
X  orbit, you can WARP away, or use Manoevering Impulse thrusters to get away.
X  .SH
X  The READOUTS.
X***************
X*** 151,161 ****
X  is the position updated. "q" - This will always tell you the right position 
X  at any time.
X  .LP
X! WARP - This shows you x/y velocity. Warp is not automatically updated.
X! To show your warp type "w".
X  .LP
X! ENERGY - This shows your energy. The energy is not automatically
X! updated. To get an update type "e". HOWEVER-if you energy drops below 100,
X  this is shown. (In which case its usually time to panic.)
X  .LP
X  MAXENERGY - This shows the maximum amount of energy you are alowed to 
X--- 148,160 ----
X  is the position updated. "q" - This will always tell you the right position 
X  at any time.
X  .LP
X! WARP - This shows you x/y velocity. Warp IS automatically updated, but does not
X! show manoevering impulse speeds nor impulse directions.
X  .LP
X! ENERGY - This shows your energy. (500 units at the start)
X! The energy is updated in steps of 50 units
X! at a time. If you wish to know exactly what your energy is, type "e".
X! HOWEVER-if your energy drops below 100,
X  this is shown. (In which case its usually time to panic.)
X  .LP
X  MAXENERGY - This shows the maximum amount of energy you are alowed to 
X***************
X*** 180,187 ****
X  .LP
X  Phasers or Photon Torpedos are available. Torpedos are circa 50% more powerful.
X  For each weapon, its range (i.e. How far you can shoot) is shown. If the 
X! range of phasers is say, 6, in any DIAGONAL direction it is only half that,
X! i.e. 3. MAX shows how many shots/torpedos you can hold. PHASERS/TORPS shows
X  how many you still have left. An attribute of weapons not shown is their
X  POWER. This varies depending on skill. (It usually increases.) At the start
X  Phaser power is 40, and torpedo power is 60. (These values are subtracted
X--- 179,186 ----
X  .LP
X  Phasers or Photon Torpedos are available. Torpedos are circa 50% more powerful.
X  For each weapon, its range (i.e. How far you can shoot) is shown. If the 
X! range of phasers is say, 8, in any DIAGONAL direction it is only half that,
X! i.e. 4. MAX shows how many shots/torpedos you can hold. PHASERS/TORPS shows
X  how many you still have left. An attribute of weapons not shown is their
X  POWER. This varies depending on skill. (It usually increases.) At the start
X  Phaser power is 40, and torpedo power is 60. (These values are subtracted
X***************
X*** 203,209 ****
X  .LP
X  SCORE is updated as you go. Killing someone is worth 100 pts!!!.(plus
X  a pint of Romulan ale.) exploring a planet successfully is worth 10 pts, plus
X! any bonuses that particular planet can give you.
X  .SH
X  ENERGY CONSUMPTION.
X  .LP
X--- 202,208 ----
X  .LP
X  SCORE is updated as you go. Killing someone is worth 100 pts!!!.(plus
X  a pint of Romulan ale.) exploring a planet successfully is worth 10 pts, plus
X! any bonuses that particular planets can give you.
X  .SH
X  ENERGY CONSUMPTION.
X  .LP
X***************
X*** 210,221 ****
X  If you stand still with cloaking devices and shields off you gain energy.
X  If you stand still with either cloaking devices or shields or both on,
X  your energy stays the same. When moving at warp 1 with devices off your
X! energy stays the same.
X  When moving faster than warp 1 you loose energy. When moving faster than warp 1
X  with devices on
X  you loose even more energy. When zapping thru the galaxy at Warp 10,
X  cloaked and with shields up, youre dead!
X- Shooting does NOT cost energy.
X  .SH 
X  ALIENS
X  .LP
X--- 209,220 ----
X  If you stand still with cloaking devices and shields off you gain energy.
X  If you stand still with either cloaking devices or shields or both on,
X  your energy stays the same. When moving at warp 1 with devices off your
X! energy stays the same. When moving at warp 1 with any device on you 
X! start loosing energy.
X  When moving faster than warp 1 you loose energy. When moving faster than warp 1
X  with devices on
X  you loose even more energy. When zapping thru the galaxy at Warp 10,
X  cloaked and with shields up, youre dead!
X  .SH 
X  ALIENS
X  .LP
X***************
X*** 223,232 ****
X  only player in the game. Killed aliens will be reinstated somewhere
X  else in the Universe. To avoid being attacked by aliens, RAISE SHIELDS.
X  To lure an alien to attack you, shoot anything that is in either the 
X! Klingon sector or the Neutral Zone. You get 100 pts for killing
X  an alien. Do not mistake (R) and (K) for other players.
X  Romulans, are rare, and more powerful when they get you.
X! 
X  .SH
X  STARBASES AND DOCKING.
X  .LP
X--- 222,238 ----
X  only player in the game. Killed aliens will be reinstated somewhere
X  else in the Universe. To avoid being attacked by aliens, RAISE SHIELDS.
X  To lure an alien to attack you, shoot anything that is in either the 
X! Klingon sector, the Mutara Nebula or the Neutral Zone. 
X! (A favorite is to attack the starbase in the Neutral Zone-
X! as all races haveto share it, Romulans & Klingons will
X! dislike you equally for it!) Attacking any Klingon Sector objects
X! results in Klingon retaliation, and attacking any Mutara Nebula
X! objects results in Romulan retaliation. You get 100 pts for killing
X  an alien. Do not mistake (R) and (K) for other players.
X  Romulans, are rare, and more powerful when they get you.
X! Both Klingons and Romulans power increases with their fighting
X! experience. Sometimes aliens will still sit beside you, but
X! be cloaked.
X  .SH
X  STARBASES AND DOCKING.
X  .LP
X***************
X*** 233,239 ****
X  To dock at a starbase you must be exactly over it. Then type "d".
X  This refills the ammo and energy. If MAXENERGY is smaller than 
X  500, it is updated to
X! 500. If MAXENERGY is greater than 400, it is left alone. To leave a starbase,
X  type "f" to FREE yourself. (i.e. undock.) When docked the other players
X  will see the starbase, not you. You can fire when docked.
X  .SH
X--- 239,245 ----
X  To dock at a starbase you must be exactly over it. Then type "d".
X  This refills the ammo and energy. If MAXENERGY is smaller than 
X  500, it is updated to
X! 500. If MAXENERGY is greater than 500, it is left alone. To leave a starbase,
X  type "f" to FREE yourself. (i.e. undock.) When docked the other players
X  will see the starbase, not you. You can fire when docked.
X  .SH
X***************
X*** 311,318 ****
X  THESE RULES..
X  .LP
X  are all your'e gonna get. The rest is up to you and your experience.
X! if you want a quick reference sheet for the commands, print out these rules.
X! (see below).
X  .ce 2
X  LIVE LONG AND PROSPER.
X  P. Schmitz, May 1988.
X--- 317,324 ----
X  THESE RULES..
X  .LP
X  are all your'e gonna get. The rest is up to you and your experience.
X! if you want a quick reference sheet for the commands, print out these rules by
X! doing 'nroff  -ms Rules.nroff' . (see below)
X  .ce 2
X  LIVE LONG AND PROSPER.
X  P. Schmitz, May 1988.
X***************
X*** 322,345 ****
X  +  =>  Self destruct ship/Quit (AND THIS DOES NOT ASK IF YOU ARE SURE!),
X  G  =>  beep on/off,
X  R  =>  Redraw Screen
X! 
X  WARP DRIVE :
X  h,j,k,l  =>  left,down,up,right,movements
X  y,u,b,n  =>  diagonal movements,
X  s  =>  full stop
X! 
X  MANOEVERING IMPULSE THRUSTERS :
X  H,J,K,L,Y,U,B,N => one klick at a time in the same direction as the WARP drive.
X! 
X  AFT IMPULSE THRUSTERS :
X  o,i  =>  orbit/cancel orbit
X! 
X  d,f  =>  dock/undock,
X  z    =>  beamto/from planet,
X  1,2,3,4,6,7,8,9  =>  fire weapon,
X  p  =>  weapon select
X  q  =>  show quadrant,
X- w  =>  show warp,
X  e  =>  show energy,
X  c  =>  cloaking device on/off,
X  v  =>  shields on/off
X--- 328,354 ----
X  +  =>  Self destruct ship/Quit (AND THIS DOES NOT ASK IF YOU ARE SURE!),
X  G  =>  beep on/off,
X  R  =>  Redraw Screen
X! .DE
X! .DS L
X  WARP DRIVE :
X  h,j,k,l  =>  left,down,up,right,movements
X  y,u,b,n  =>  diagonal movements,
X  s  =>  full stop
X! .DE
X! .DS L
X  MANOEVERING IMPULSE THRUSTERS :
X  H,J,K,L,Y,U,B,N => one klick at a time in the same direction as the WARP drive.
X! .DE
X! .DS L
X  AFT IMPULSE THRUSTERS :
X  o,i  =>  orbit/cancel orbit
X! .DE
X! .DS L
X  d,f  =>  dock/undock,
X  z    =>  beamto/from planet,
X  1,2,3,4,6,7,8,9  =>  fire weapon,
X  p  =>  weapon select
X  q  =>  show quadrant,
X  e  =>  show energy,
X  c  =>  cloaking device on/off,
X  v  =>  shields on/off
X***************
X*** 351,356 ****
X--- 360,367 ----
X  P<A>  =>  send Prefixcode
X  S<A>  =>  Scanship on/off (This will show prefix codes.)
X   ?    =>  the help function.
X+ .DE
X+ .DS L
X  Key to command notation:
X  <1,2,3,4>  =>  a number between 1-4 inclusive,
X  <A>  =>  a shipname in the form of a lowercase letter.
X***************
X*** 357,361 ****
X  NB:If a function doesn't seem to work,you cannot do it
X  while you are in that particular status.
X  .DE
X- 
X- 
X--- 368,370 ----
END_OF_FILE
if test 21441 -ne `wc -c <'Patches02'`; then
    echo shar: \"'Patches02'\" unpacked with wrong size!
fi
# end of 'Patches02'
fi
echo shar: End of shell archive.
exit 0