3 Hack is a display oriented dungeons & dragons - like game.
4 Both display and command structure resemble rogue.
5 (For a game with the same structure but entirely different display -
6 a real cave instead of dull rectangles - try Quest)
8 Hack was originally written by Jay Fenlason (at lincolnsudbury:
9 29 East St., Sudbury Mass., 01776) with help from
10 Kenny Woodland, Mike Thome and Jon Payne.
11 Basically it was an implementation of Rogue, however, with 52+ instead of 26
13 The current version is more than thrice as large (with such new features as
14 the dog, the long worms, the shops, etc.) and almost entirely rewritten
15 (only the display routines are the original ones - I must rewrite these
16 too one day; especially when you are blind strange things still happen).
20 record Top 100 list (just start with an empty file)
21 news Tells about recent changes in hack, or bugs found ...
22 (Just start with no news file.)
23 data Auxiliary file used by hack to give you the names
24 and sometimes some more information on the
26 help Introductory information (no doubt outdated).
27 hh Compactified version of help.
28 perm An empty file used for locking purposes.
29 rumors Texts for fortune cookies.
30 (Some of these contain information on the game,
31 others are just plain stupid. Additional rumors
33 hack.sh A shell script.
34 (We have hack.sh in /usr/games/hack and
35 hack in /usr/games/lib/hackdir/hack and all the other
36 hack stuff in /usr/games/lib/hackdir - perhaps this
37 will make the script clear.
38 There is no need for you to use it.)
40 Original_READ_ME Jay Fenlason's READ_ME
43 /etc/termcap Used in conjunction with the environment variable
47 /bin/sh Used when $SHELL is undefined.
50 0. Compile the sources. Perhaps you should first look at the file config.h
51 and define BSD if you are on a BSDtype system,
52 define STUPID if your C-compiler chokes on complicated expressions.
53 Make sure schar and uchar represent signed and unsigned types.
54 If your C compiler doesnt allow initialization of bit fields
55 change Bitfield. When config.h looks reasonable, say 'make'.
56 (Perhaps you have to change TERMLIB in the makefile.)
57 1. If it didnt exist already, introduce a loginname `play' .
58 2. The program hack resides in a directory so that it is executable
59 for everybody and is suid play:
60 ---s--s--x 1 play 206848 Apr 3 00:17 hack
61 Perhaps you wish to restrict playing to certain hours, or have games
62 running under nice; in that case you might write a program play.c
63 such that the program play is suid play and executable for everybody
64 while all the games in /usr/games are readable or executable for
65 play only; all the program play does is asking for the name of a game,
66 checking that time-of-day and system load do not forbid playing,
67 and then executing the game. Thus:
68 -r-sr-sr-x 1 play 13312 May 24 12:52 play
69 ---x------ 1 play 206848 Apr 3 00:17 hack
70 If you are worried about security you might let play do
71 chroot("/usr/games") so that no player can get access to the rest
72 of the system via shell escapes and the likes.
73 If you #define SECURE in config.h then hack will not setuid(getuid())
74 before executing a chdir(). Hack will always do setuid(getuid()) with
75 a fork. If you do not define UNIX then hack will not fork.
76 3. The rest of the stuff belonging to hack sits in a subdirectory hackdir
77 (on our system /usr/games/lib/hackdir) with modes
78 drwx------ 3 play 1024 Aug 9 09:03 hackdir
79 Here all the temporary files will be created (with names like xlock.17
81 4. If you are not really short on file space, creating a subdirectory
82 hackdir/save (modes again drwx------) will enable users to save their
85 The program hack is called
86 $ hack [-d hackdir] [maxnrofplayers]
88 $ hack [-d hackdir] -s [listofusers | limit | all]
89 (for seeing part of the scorelist).
90 The shell file hack (in this kit called hack.sh) takes care of
91 calling hack with the right arguments.
93 Send complaints, bug reports, suggestions for improvements to
94 mcvax!aeb - in real life Andries Brouwer.