[alt.hackers] Random/Custom Dungeons are an old hack!

sorgatz@ttidca.TTI.COM ( Avatar) (09/19/90)

In article <F!uz0&02@cs.psu.edu> okunewck@psuvax1.cs.psu.edu (Phil OKunewick) writes:
+ObHack:  A Generic dungeon.  You supply the map, rooms, objects, puzzles,
+and challenges (as a text file), and it does the rest.  (No operational
+version, yet.)
+Variation: a random dungeon.  Take the generic dungeon database, and use
+a random number generator to draw the map and assign the rooms.  Better
+yet, use an active generator to continuously remap a maze when somebody
+is lost in it.  Or, what th' heck - if you're in a nasty mood, remap the
+entire dungeon a little bit at a time, as a person travels through it.
+--
+                                   ---Phil
 Ancient idea.  I built a version of the Fortran based "Adventure" in 1979
that  did  both  of these.  The "-r" random switch could build some really
nasty little twisty passages..all the same/different, it would  drive  you
ape!  The  only  bummer was the amount of time it took (on a fairly loaded
DEC 20/60) to actually build the damn tables.  If you remember  the  table
layout,  there  were  a  pair  of  numbers denoting the object, room, etc,
locations.  Then there was a series of connector descriptors.  Hence,  the
only  thing  that  was  a  constant  was  the startup location of the Well
House.. it then hit the random number pot for  everything  else,  checking
first  to  make sure that the combination had not already been used.  Took
about an hour to run, then it saved the dungeon and  sent  you  mail.  The
interactive  (what  you  call generic) or custom version, had a menu.  You
could specify the sequence necessary to get  from  one  room  to  another,
specify  where to put the treasures, enable or disable the thief, etc.  It
was a real pain to code and it was huge.  I  never  did  try  to  add  the
dynamic  pathway  modification  hack  so  I could fuck with people already
playing a dungeon..might be fun.

-Avatar-> (aka: Erik K. Sorgatz) KB6LUY           +-------------------------+
Citicorp(+)TTI                          *----------> panic trap; type = N+1 *
3100 Ocean Park Blvd. Santa Monica, CA  90405     +-------------------------+
{csun,philabs,psivax,pyramid,quad1,rdlvax,retix}!ttidca!sorgatz **
(OPINIONS EXPRESSED DO NOT REFLECT THE VIEWS OF CITICORP OR ITS MANAGEMENT!)

lum@junk.cis.ohio-state.edu (Lum Johnson) (09/20/90)

In article <F!uz0&02@cs.psu.edu> okunewck@psuvax1.cs.psu.edu (Phil OKunewick) writes:
>
> ... A Generic dungeon.  You supply the map, rooms, objects, puzzles,
> and challenges (as a text file), and it does the rest.  ...
> Variation: a random dungeon.  Take the generic dungeon database, and use
> a random number generator to draw the map and assign the rooms.  ...

About 1981 I rewrote a "fast food"-style dungeon dresser in assembly language.
Most of the details appear in the excerpt from the commentary below.

In article <19889@ttidca.TTI.COM> sorgatz@ttidca.TTI.COM ( Avatar) writes:
> 
> Ancient idea.  I built a version of the Fortran based "Adventure" in
> 1979 that did both of these.  The "-r" random switch could build
> some really nasty little twisty passages..all the same/different ...

This does sound pretty neat...  Care to trade sources?  I'll see whether
I can find something that _isn't_ in assembly language, in case you've lost
your 20/60 - ours will be going away at about year's end as well.  :-(

 
	title	McDngn -- "Fast Food"-style Dungeon Dresser -- LUM/KEJ
	subttl	Lum (J Columbus) Johnson II and Keith E Jackson

	sall				; suppress list of all macro expansions
	.direc	flblst			; list first line (only) of binary

	search	monsym,macsym,cmd	; get symbol definitions
	.requi	sys:macrel,sys:cmd	; get supporting code

	stdac.				; standard AC definitions

; -----------------------------------------------------------------------------
;
;                          McDngn -- 3/6/81 -- LUM/KEJ
;
; Copyright (c) 1981, 1985, 1990 by The Ohio State University and the authors.
;
;              This program was designed in PL/I by Rick McGuire,
;                     redesigned in BASIC by Keith Jackson,
;                    and redesigned in MACRO by Lum Johnson.
;
; -----------------------------------------------------------------------------
;
;                                SPECIFICATION
;
;	This program is not a complete A D & D game, but merely an aid
;	to the DM (Dungeon Master).  Characteristics may be chosen or
;	randomly generated for as many rooms as the DM wishes.
;
;	The DM names the dungeon and level to generate, and gives the
;	base level and percentage probabilities of monsters or treasure
;	appearing and how many rooms to generate.  (Wherever a monster
;	appears, treasure is more likely to appear there also.)
;
; ----------------------------------------------------------------------

	mcdver==1			; major version
	mcdmin==0			; minor version
	mcdedt==^d114			; edit version
	mcdwho==0			; DM (0=developer)

	subttl	table of contents

; -----------------------------------------------------------------------------
;				TABLE OF CONTENTS
; -----------------------------------------------------------------------------
;
; Section  Subsection  macro/routine					   Page
;
; Specification								     1
; Table of Contents							     2
; Program Structure							     3
; Constants and Data							     4
;
; Macros
;    Typeout:	tmsg	tcrmsg	titem	tnmbr	tstr			     5
;    Printout:	pmsg	pcrmsg	pitem	pnmbr	pstr			     6
;    Error:	%jserr	%ermsg						     7
;    Tables:	table	endtab	item	m	t			     8
;    Misc:	chatrs	maxtrs	pick	roll	potof	summon		     9
;
; Main program routine							    10
;
; Random feature routines:
;		furnis	genera	mist	monstr				 11-14
;		odor	plenty	sound	trap				 15-18
;
; Utility routines:
;		header	trailr		(begin and end work on room)	    19
;		ignchk	ignlst		(ignore some rooms)		    20
;		lvlarg			(set level params)		    21
;		trsarg			(set treasure params)		    22
;
; Lists of Items
;    Furnishings							    23
;    General				(junk, trash and crud)		    24
;    Mists:	Colors	Smells						 25-26
;    Odors				(of rooms, not mists)		    27
;    Sounds								    28
;    Traps								    29
;
; Lists of Monsters
;    levels and monsters						    30
;    1st level -- 16th level						 31-46
;    Templates								    47
;
; Error and file handling:
;		fatal	warn	opnfil  clsfil				    48
;
; -----------------------------------------------------------------------------

	subttl	program structure

; -----------------------------------------------------------------------------
;			       PROGRAM STRUCTURE
; -----------------------------------------------------------------------------
;
;				     start
;				       |
;	  -------------------------------------------------------------
;	  |	      | 	  |	      | 	  |	      |
;	lvlarg	    trsarg	ignlst	    opnfil     new-room     clsfil
;							  |
;	  -------------------------------------------------------------
;	  |	       |		      | 		      |
;	header	     ignchk	   random-feature-generators	    trailr
;					      |
;	  -------------------------------------------------------------
;	  |	  |	   |	    |	    |	   |	    |	      |
;	 odor	sound	 genera   furnis   trap   mist	  monstr    plenty
;
; The main routine, at start, requests parameters, an optional list of rooms
; to ignore, at the DM's discretion, and opens the output file.
;
; For each new room, a header is written, the room is checked to see whether
; it is on the list of rooms to be ignored, and, if not, various features are
; generated for the room and written to its description.
;
; If there is a mist, there cannot be a monster.  If there is a monster,
; the chance of treasure rises (by 10% default).
;
; When the rooms are finished, the file is closed and the program is halted.
; it may be CONTINUEd to prepare additional levels.
;
; -----------------------------------------------------------------------------
--
-- 
Lum Johnson      lum@cis.ohio-state.edu      lum@osu-20.ircc.ohio-state.edu
"You got it kid -- the large print giveth and the small print taketh away."
-------