MUD-Dev
mailing list archive

Other Periods  | Other mailing lists  | Search  ]

Date:  [ Previous  | Next  ]      Thread:  [ Previous  | Next  ]      Index:  [ Author  | Date  | Thread  ]

[MUD-Dev] Re: AFAP: As fast as possible, non linear...



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.




Other Periods  | Other mailing lists  | Search  ]