home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / n / nh311os2.zip / RECOVER.MAN < prev    next >
Text File  |  1993-03-15  |  5KB  |  130 lines

  1.  
  2.  
  3. RECOVER(6)          UNIX Programmer's Manual           RECOVER(6)
  4.  
  5.  
  6. NAME
  7.      recover - recover a NetHack game interrupted by disaster
  8.  
  9. SYNOPSIS
  10.      recover [ -d _d_i_r_e_c_t_o_r_y ] _b_a_s_e_1 _b_a_s_e_2 ...
  11.  
  12. DESCRIPTION
  13.      Occasionally, a NetHack game will be interrupted by disaster
  14.      when the game or the system crashes.  Prior to NetHack v3.1,
  15.      these games were lost because various information like the
  16.      player's inventory was kept only in memory.  Now, all per-
  17.      tinent information can be written out to disk, so such games
  18.      can be recovered at the point of the last level change.
  19.  
  20.      The _b_a_s_e options tell _r_e_c_o_v_e_r which files to process.  Each
  21.      base option specifies recovery of a separate game.
  22.  
  23.      The -d option, which must be the first argument if it
  24.      appears, supplies a directory which is the NetHack play-
  25.      ground.  It overrides the value from NETHACKDIR, HACKDIR, or
  26.      the directory specified by the game administrator during
  27.      compilation (usually /usr/games/lib/nethackdir).
  28.  
  29.      For recovery to be possible, _n_e_t_h_a_c_k must have been compiled
  30.      with the INSURANCE option, and the run-time option _c_h_e_c_k_-
  31.      _p_o_i_n_t must also have been on.  NetHack normally writes out
  32.      files for levels as the player leaves them, so they will be
  33.      ready for return visits.  When checkpointing, NetHack also
  34.      writes out the level entered and the current game state on
  35.      every level change.  This naturally slows level changes down
  36.      somewhat.
  37.  
  38.      The level file names are of the form base.nn, where nn is an
  39.      internal bookkeeping number for the level.  The file base.0
  40.      is used for game identity, locking, and, when checkpointing,
  41.      for the game state.  Various OSes use different strategies
  42.      for constructing the base name.  Microcomputers use the
  43.      character name, possibly truncated and modified to be a
  44.      legal filename on that system.  Multi-user systems use the
  45.      (modified) character name prefixed by a user number to avoid
  46.      conflicts, or "xlock" if the number of concurrent players is
  47.      being limited.  It may be necessary to look in the play-
  48.      ground to find the correct base name of the interrupted
  49.      game.  _r_e_c_o_v_e_r will transform these level files into a save
  50.      file of the same name as _n_e_t_h_a_c_k _w_o_u_l_d _h_a_v_e _u_s_e_d.
  51.  
  52.      Since _r_e_c_o_v_e_r must be able to read and delete files from the
  53.      playground and create files in the save directory, it has
  54.      interesting interactions with game security.  Giving ordi-
  55.      nary players access to _r_e_c_o_v_e_r through setuid or setgid is
  56.      tantamount to leaving the playground world-writable, with
  57.      respect to both cheating and messing up other players.  For
  58.      a single-user system, this of course does not change
  59.  
  60.  
  61. Printed 1/20/93          9 January 1993                         1
  62.  
  63.  
  64.  
  65.  
  66.  
  67. RECOVER(6)          UNIX Programmer's Manual           RECOVER(6)
  68.  
  69.  
  70.      anything, so some of the microcomputer ports install _r_e_c_o_v_e_r
  71.      by default.
  72.  
  73.      For a multi-user system, the game administrator may want to
  74.      arrange for all .0 files in the playground to be fed to
  75.      recover when the host machine boots, and handle game crashes
  76.      individually.  If the user population is sufficiently
  77.      trustworthy, _r_e_c_o_v_e_r can be installed with the same permis-
  78.      sions the _n_e_t_h_a_c_k executable has.  In either case, _r_e_c_o_v_e_r
  79.      is easily compiled from the distribution utility directory.
  80.  
  81. NOTES
  82.      Like _n_e_t_h_a_c_k itself, _r_e_c_o_v_e_r will overwrite existing save-
  83.      files of the same name.  Savefiles created by _r_e_c_o_v_e_r are
  84.      uncompressed; they may be compressed afterwards if desired,
  85.      but even a compression-using _n_e_t_h_a_c_k will find them in the
  86.      uncompressed form.
  87.  
  88. SEE ALSO
  89.      nethack(6)
  90.  
  91. BUGS
  92.      _r_e_c_o_v_e_r makes no attempt to find out if a base name speci-
  93.      fies a game in progress.  If multiple machines share a play-
  94.      ground, this would be impossible to determine.
  95.  
  96.      _r_e_c_o_v_e_r should be taught to use the nethack playground lock-
  97.      ing mechanism to avoid conflicts.
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125. Printed 1/20/93          9 January 1993                         2
  126.  
  127.  
  128.  
  129.  
  130.