11.2Scgd$NetBSD: READ_ME,v 1.2 1995/03/23 08:29:12 cgd Exp $
21.2Scgd
31.1ScgdHack is a display oriented dungeons & dragons - like game.
41.1ScgdBoth display and command structure resemble rogue.
51.1Scgd(For a game with the same structure but entirely different display -
61.1Scgda real cave instead of dull rectangles - try Quest)
71.1Scgd
81.1ScgdHack was originally written by Jay Fenlason (at lincolnsudbury:
91.1Scgd 29 East St., Sudbury Mass., 01776) with help from
101.1Scgd Kenny Woodland, Mike Thome and Jon Payne.
111.1ScgdBasically it was an implementation of Rogue, however, with 52+ instead of 26
121.1Scgd monster types.
131.1ScgdThe current version is more than thrice as large (with such new features as
141.1Scgd the dog, the long worms, the shops, etc.) and almost entirely rewritten
151.1Scgd (only the display routines are the original ones - I must rewrite these
161.1Scgd too one day; especially when you are blind strange things still happen).
171.1Scgd
181.1ScgdFiles for hack:
191.1Scgd	hack		The actual game
201.1Scgd	record		Top 100 list (just start with an empty file)
211.1Scgd	news		Tells about recent changes in hack, or bugs found ...
221.1Scgd			(Just start with no news file.)
231.1Scgd	data		Auxiliary file used by hack to give you the names
241.1Scgd			and sometimes some more information on the
251.1Scgd			objects and monsters.
261.1Scgd	help		Introductory information (no doubt outdated).
271.1Scgd	hh		Compactified version of help.
281.1Scgd	perm		An empty file used for locking purposes.
291.1Scgd	rumors		Texts for fortune cookies.
301.1Scgd			(Some of these contain information on the game,
311.1Scgd			others are just plain stupid. Additional rumors
321.1Scgd			are appreciated.)
331.1Scgd	hack.sh		A shell script.
341.1Scgd			(We have hack.sh in /usr/games/hack and
351.1Scgd			hack in /usr/games/lib/hackdir/hack and all the other
361.1Scgd			hack stuff in /usr/games/lib/hackdir - perhaps this
371.1Scgd			will make the script clear.
381.1Scgd			There is no need for you to use it.)
391.1Scgd	READ_ME		This file.
401.1Scgd	Original_READ_ME Jay Fenlason's READ_ME
411.1Scgd
421.1ScgdSystem files used:
431.1Scgd	/etc/termcap	Used in conjunction with the environment variable
441.1Scgd			$TERM.
451.1Scgd	/bin/cat
461.1Scgd	/usr/ucb/more
471.1Scgd	/bin/sh		Used when $SHELL is undefined.
481.1Scgd
491.1ScgdHow to install hack:
501.1Scgd0. Compile the sources. Perhaps you should first look at the file config.h
511.1Scgd   and define BSD if you are on a BSDtype system,
521.1Scgd   define STUPID if your C-compiler chokes on complicated expressions.
531.1Scgd   Make sure schar and uchar represent signed and unsigned types.
541.1Scgd   If your C compiler doesnt allow initialization of bit fields
551.1Scgd   change Bitfield. When config.h looks reasonable, say 'make'.
561.1Scgd   (Perhaps you have to change TERMLIB in the makefile.)
571.1Scgd1. If it didnt exist already, introduce a loginname `play' .
581.1Scgd2. The program  hack  resides in a directory so that it is executable
591.1Scgd   for everybody and is suid play:
601.1Scgd	---s--s--x  1 play	206848 Apr  3 00:17 hack
611.1Scgd   Perhaps you wish to restrict playing to certain hours, or have games
621.1Scgd   running under nice; in that case you might write a program play.c
631.1Scgd   such that the program play is suid play and executable for everybody
641.1Scgd   while all the games in /usr/games are readable or executable for
651.1Scgd   play only; all the program play does is asking for the name of a game,
661.1Scgd   checking that time-of-day and system load do not forbid playing,
671.1Scgd   and then executing the game. Thus:
681.1Scgd	-r-sr-sr-x  1 play	 13312 May 24 12:52 play
691.1Scgd	---x------  1 play	206848 Apr  3 00:17 hack
701.1Scgd   If you are worried about security you might let play do
711.1Scgd   chroot("/usr/games") so that no player can get access to the rest
721.1Scgd   of the system via shell escapes and the likes.
731.1Scgd   If you #define SECURE in config.h then hack will not setuid(getuid())
741.1Scgd   before executing a chdir(). Hack will always do setuid(getuid()) with
751.1Scgd   a fork. If you do not define UNIX then hack will not fork.
761.1Scgd3. The rest of the stuff belonging to hack sits in a subdirectory hackdir
771.1Scgd   (on our system /usr/games/lib/hackdir) with modes
781.1Scgd	drwx------  3 play	1024 Aug  9 09:03 hackdir
791.1Scgd   Here all the temporary files will be created (with names like xlock.17
801.1Scgd   or user.5).
811.1Scgd4. If you are not really short on file space, creating a subdirectory
821.1Scgd   hackdir/save (modes again drwx------) will enable users to save their
831.1Scgd   unfinished games.
841.1Scgd
851.1ScgdThe program hack is called
861.1Scgd$ hack [-d hackdir] [maxnrofplayers]
871.1Scgd(for playing) or
881.1Scgd$ hack [-d hackdir] -s [listofusers | limit | all]
891.1Scgd(for seeing part of the scorelist).
901.1ScgdThe shell file hack (in this kit called hack.sh) takes care of
911.1Scgdcalling hack with the right arguments.
921.1Scgd
931.1ScgdSend complaints, bug reports, suggestions for improvements to
941.1Scgdmcvax!aeb - in real life Andries Brouwer.
95