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