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