xref: /netbsd-src/games/hack/READ_ME (revision 42fb1b9d4a67d89ff98133ccd6400928fb7fa4b0)
1*42fb1b9dScgd$NetBSD: READ_ME,v 1.2 1995/03/23 08:29:12 cgd Exp $
2*42fb1b9dScgd
361f28255ScgdHack is a display oriented dungeons & dragons - like game.
461f28255ScgdBoth display and command structure resemble rogue.
561f28255Scgd(For a game with the same structure but entirely different display -
661f28255Scgda real cave instead of dull rectangles - try Quest)
761f28255Scgd
861f28255ScgdHack was originally written by Jay Fenlason (at lincolnsudbury:
961f28255Scgd 29 East St., Sudbury Mass., 01776) with help from
1061f28255Scgd Kenny Woodland, Mike Thome and Jon Payne.
1161f28255ScgdBasically it was an implementation of Rogue, however, with 52+ instead of 26
1261f28255Scgd monster types.
1361f28255ScgdThe current version is more than thrice as large (with such new features as
1461f28255Scgd the dog, the long worms, the shops, etc.) and almost entirely rewritten
1561f28255Scgd (only the display routines are the original ones - I must rewrite these
1661f28255Scgd too one day; especially when you are blind strange things still happen).
1761f28255Scgd
1861f28255ScgdFiles for hack:
1961f28255Scgd	hack		The actual game
2061f28255Scgd	record		Top 100 list (just start with an empty file)
2161f28255Scgd	news		Tells about recent changes in hack, or bugs found ...
2261f28255Scgd			(Just start with no news file.)
2361f28255Scgd	data		Auxiliary file used by hack to give you the names
2461f28255Scgd			and sometimes some more information on the
2561f28255Scgd			objects and monsters.
2661f28255Scgd	help		Introductory information (no doubt outdated).
2761f28255Scgd	hh		Compactified version of help.
2861f28255Scgd	perm		An empty file used for locking purposes.
2961f28255Scgd	rumors		Texts for fortune cookies.
3061f28255Scgd			(Some of these contain information on the game,
3161f28255Scgd			others are just plain stupid. Additional rumors
3261f28255Scgd			are appreciated.)
3361f28255Scgd	hack.sh		A shell script.
3461f28255Scgd			(We have hack.sh in /usr/games/hack and
3561f28255Scgd			hack in /usr/games/lib/hackdir/hack and all the other
3661f28255Scgd			hack stuff in /usr/games/lib/hackdir - perhaps this
3761f28255Scgd			will make the script clear.
3861f28255Scgd			There is no need for you to use it.)
3961f28255Scgd	READ_ME		This file.
4061f28255Scgd	Original_READ_ME Jay Fenlason's READ_ME
4161f28255Scgd
4261f28255ScgdSystem files used:
4361f28255Scgd	/etc/termcap	Used in conjunction with the environment variable
4461f28255Scgd			$TERM.
4561f28255Scgd	/bin/cat
4661f28255Scgd	/usr/ucb/more
4761f28255Scgd	/bin/sh		Used when $SHELL is undefined.
4861f28255Scgd
4961f28255ScgdHow to install hack:
5061f28255Scgd0. Compile the sources. Perhaps you should first look at the file config.h
5161f28255Scgd   and define BSD if you are on a BSDtype system,
5261f28255Scgd   define STUPID if your C-compiler chokes on complicated expressions.
5361f28255Scgd   Make sure schar and uchar represent signed and unsigned types.
5461f28255Scgd   If your C compiler doesnt allow initialization of bit fields
5561f28255Scgd   change Bitfield. When config.h looks reasonable, say 'make'.
5661f28255Scgd   (Perhaps you have to change TERMLIB in the makefile.)
5761f28255Scgd1. If it didnt exist already, introduce a loginname `play' .
5861f28255Scgd2. The program  hack  resides in a directory so that it is executable
5961f28255Scgd   for everybody and is suid play:
6061f28255Scgd	---s--s--x  1 play	206848 Apr  3 00:17 hack
6161f28255Scgd   Perhaps you wish to restrict playing to certain hours, or have games
6261f28255Scgd   running under nice; in that case you might write a program play.c
6361f28255Scgd   such that the program play is suid play and executable for everybody
6461f28255Scgd   while all the games in /usr/games are readable or executable for
6561f28255Scgd   play only; all the program play does is asking for the name of a game,
6661f28255Scgd   checking that time-of-day and system load do not forbid playing,
6761f28255Scgd   and then executing the game. Thus:
6861f28255Scgd	-r-sr-sr-x  1 play	 13312 May 24 12:52 play
6961f28255Scgd	---x------  1 play	206848 Apr  3 00:17 hack
7061f28255Scgd   If you are worried about security you might let play do
7161f28255Scgd   chroot("/usr/games") so that no player can get access to the rest
7261f28255Scgd   of the system via shell escapes and the likes.
7361f28255Scgd   If you #define SECURE in config.h then hack will not setuid(getuid())
7461f28255Scgd   before executing a chdir(). Hack will always do setuid(getuid()) with
7561f28255Scgd   a fork. If you do not define UNIX then hack will not fork.
7661f28255Scgd3. The rest of the stuff belonging to hack sits in a subdirectory hackdir
7761f28255Scgd   (on our system /usr/games/lib/hackdir) with modes
7861f28255Scgd	drwx------  3 play	1024 Aug  9 09:03 hackdir
7961f28255Scgd   Here all the temporary files will be created (with names like xlock.17
8061f28255Scgd   or user.5).
8161f28255Scgd4. If you are not really short on file space, creating a subdirectory
8261f28255Scgd   hackdir/save (modes again drwx------) will enable users to save their
8361f28255Scgd   unfinished games.
8461f28255Scgd
8561f28255ScgdThe program hack is called
8661f28255Scgd$ hack [-d hackdir] [maxnrofplayers]
8761f28255Scgd(for playing) or
8861f28255Scgd$ hack [-d hackdir] -s [listofusers | limit | all]
8961f28255Scgd(for seeing part of the scorelist).
9061f28255ScgdThe shell file hack (in this kit called hack.sh) takes care of
9161f28255Scgdcalling hack with the right arguments.
9261f28255Scgd
9361f28255ScgdSend complaints, bug reports, suggestions for improvements to
9461f28255Scgdmcvax!aeb - in real life Andries Brouwer.
95