X-NEWS: dayton.saic.com rec.games.moria: 4176 Relay-Version: VMS News - V6.0-3 14/03/91 VAX/VMS V5.4-2; site dayton.saic.com Path: dayton.saic.com!mvb.saic.com!unogate!orion.oac.uci.edu!ucivax!ucla-cs!elroy.jpl.nasa.gov!ames!agate!darkstar!ucscb.UCSC.EDU!urbndv8 Newsgroups: rec.games.moria Subject: Moria tunnel generation misfeature Message-ID: <24971@darkstar.ucsc.edu> From: urbndv8@ucscb.ucsc.edu (Bleeding Rivets) Date: 7 Dec 91 09:00:50 GMT Sender: usenet@darkstar.ucsc.edu Organization: University of California, Santa Cruz; Open Access Computing Lines: 56 I found a small nasty code problem in the tunnel generation. What happens is that it is impossible for a tunnel to drill through 2 granite walls that are side by side, since the first time a tunnel hits a granite wall, ALL surrounding spaces are converted to TMP2_WALL, which causes the tunnel on its next space forward to simply skip that space. This causes rooms that look like this, with lots of stunted passages out, if 2 rooms were created ################# smacked together, 1/2 panel (fullsize) high. (9 inside #...............# plus two walls in current dimensions). As it stands, #...............# this will only happen if 2 treasure rooms are next to ##.###.#.#.#.#### each other, since normal rooms max out at 1/2panel-1. ################# This is not terribly uncommon at low levels, though, and is ugly, and may also lead to rooms with no doors. I had to fix this myself because I made panels 40 high (for 43-line mode on EGA) and 4 rooms high per panel, so they bumped into each other a lot! in GENERATE.C, near the start of the tunnel-carving code: else if (c_ptr->fval == GRANITE_WALL) { row1 = tmp_row; col1 = tmp_col; if (wallindex < 1000) { wallstk[wallindex].y = row1; wallstk[wallindex].x = col1; wallindex++; } /******* bug fix here, to let tunnel encountering double wall keep on going */ i=row1+row_dir; j=col1+col_dir; /* if just encountered granite wall, and 'next' space also granite wall, just punch through */ if (in_bounds(i,j) && cave[i][j].fval==GRANITE_WALL) cave[i][j].fval=CORR_FLOOR; // (RW: case of double walls) /******* end bug fix */ for (i = row1-1; i <= row1+1; i++) for (j = col1-1; j <= col1+1; j++) if (in_bounds(i, j)) { d_ptr = &cave[i][j]; /* values 11 and 12 are impossible here, place_streamer is never run before build_tunnel */ if (d_ptr->fval == GRANITE_WALL) d_ptr->fval = TMP2_WALL; } -- Rich -- "The possessed's mad speech is the higher wisdom of the world, since it is human...Why have we not yet acquired this insight in relation to the world of the free will? Because outwardly we are the masters of madness, because the insane are violated by us, and we hinder them from living according to their ethical laws...Now we must endeavor to overcome the dead point in our realtionship to insanity." --Wieland Herzfelde, 1914