xref: /openbsd/games/hack/READ_ME (revision f6aab3d8)
1$OpenBSD: READ_ME,v 1.4 2017/06/20 20:40:54 akfaew 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	READ_ME		This file.
35	Original_READ_ME Jay Fenlason's READ_ME
36
37System files used:
38	/etc/termcap	Used in conjunction with the environment variable
39			$TERM.
40	/bin/cat
41	/usr/ucb/more
42	/bin/sh		Used when $SHELL is undefined.
43
44How to install hack:
450. Compile the sources. Perhaps you should first look at the file config.h
46   and define BSD if you are on a BSDtype system,
47   define STUPID if your C-compiler chokes on complicated expressions.
48   Make sure schar and uchar represent signed and unsigned types.
49   If your C compiler doesn't allow initialization of bit fields
50   change Bitfield. When config.h looks reasonable, say 'make'.
51   (Perhaps you have to change TERMLIB in the makefile.)
521. If it didnt exist already, introduce a loginname `play' .
532. The program  hack  resides in a directory so that it is executable
54   for everybody and is suid play:
55	---s--s--x  1 play	206848 Apr  3 00:17 hack
56   Perhaps you wish to restrict playing to certain hours, or have games
57   running under nice; in that case you might write a program play.c
58   such that the program play is suid play and executable for everybody
59   while all the games in /usr/games are readable or executable for
60   play only; all the program play does is asking for the name of a game,
61   checking that time-of-day and system load do not forbid playing,
62   and then executing the game. Thus:
63	-r-sr-sr-x  1 play	 13312 May 24 12:52 play
64	---x------  1 play	206848 Apr  3 00:17 hack
65   If you are worried about security you might let play do
66   chroot("/usr/games") so that no player can get access to the rest
67   of the system via shell escapes and the likes.
68   If you #define SECURE in config.h then hack will not setuid(getuid())
69   before executing a chdir(). Hack will always do setuid(getuid()) with
70   a fork. If you do not define UNIX then hack will not fork.
713. The rest of the stuff belonging to hack sits in a subdirectory hackdir
72   (on our system /usr/games/lib/hackdir) with modes
73	drwx------  3 play	1024 Aug  9 09:03 hackdir
74   Here all the temporary files will be created (with names like xlock.17
75   or user.5).
764. If you are not really short on file space, creating a subdirectory
77   hackdir/save (modes again drwx------) will enable users to save their
78   unfinished games.
79
80The program hack is called
81$ hack [-d hackdir] [maxnrofplayers]
82(for playing) or
83$ hack [-d hackdir] -s [listofusers | limit | all]
84(for seeing part of the scorelist).
85
86Send complaints, bug reports, suggestions for improvements to
87mcvax!aeb - in real life Andries Brouwer.
88