home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Games / NetHack 3.1.3 / source / doc / recover.6 < prev    next >
Encoding:
Text File  |  1993-08-01  |  3.5 KB  |  116 lines  |  [TEXT/R*ch]

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