[Home] [Groups] - Message: [Prev in Group] [Next in Group]
9119: [MUD-Dev] Re: AFAP: As fast as possible, non linear...
[Full Header] [Plain Text]
From: "Alex Oren" <alexo@bigfoot.com>
Newsgroups: nu.kanga.list.mud-dev
Date: Tue, 15 Dec 1998 10:01:33 GMT
References: [1] [2] <-newest
Organization: Kanga.Nu
On Mon, 14 Dec 1998 21:38:42 +0000, Mik Clarke wrote:
} Hmmm. A few years ago (quite a few) I had a maze generator running on a
} lowly 0.7Mhz Dragon micro-computer, written in basic.
Deja-vu...
Done the same algorithm on a TRS CoCo (very similar to the Dragon, 0.895MHz
overclocked to x2).
} The baic algorythm was to generate
} the maze by moving from the end of the path to a randomly picked
} adjacent cell that the maze didn't already reach. When it got stuck (a
} square where all adjacent squares were already on the path) it would
} backup to find a cell that it could branch from.
Use a multidimensional array representing the cells. For each cell, keep a
"visited" flag and the direction you reached it from (for backtracking).
Initially, there are no connections between the cells. When you move from a
cell to an adjacent one a connection is made.
Have fun,
Alex.