🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: rec.games.programmer
Article #455

Re: Maze generating algorithm

#455
From: Scott Mayo
Date: Thu, 06 Aug 1992 17:18
31 lines
2012 bytes
rossw@ccu1.aukuni.ac.nz (Ross Williamson) writes:

>    Hello.
>    I'm looking for some code to generate consistent mazes.  This 
>can be in any language but preferably either just a basic algorithm or 
>C.  Can any one help me ??

I'm not sure what a "consistant" maze is. I have some C code that generates
3d mazes, but it is a probabilistic thing: it just grows a random tree
of branching, turning corridors, and when one of them reaches the pre-chosen
exit point, it stops. Occasionally, all the branches on the tree dead end
before the pre-chosen exit point is reached, and the program simply
apologises and requests you start it again. That's fairly rare. The program
is neither bright nor brilliantly written, but it serves my purposes. It
more or less tries to fill a 3d cube, with a starting point on one face of
the cube and an ending point on the opposite face. Myriad improvements
are possible, but I haven't needed them. All the turns are right angles.

The output is to stdout and is an ascii description of the maze in
a language my 3d display code understands. If you want it badly enough,
I could mail the maze generator. It is *not* elegant code. But it is free.

Try sending mail to spider@decvax.dec.com. I seem to recall, some years
ago, that he wrote a good 2d maze generator. I vaguely recall that it
always succeeded, but he wrote it in SNOBOL and that the algorithm was
a bit bizarre. If you do, send along parts of this mail so he has some
idea what you are talking about.
--
He is a slave to a sign who uses or worships a significant thing without
knowing what it signifies.			-Augustine
smayo@wang.com
Technical Details
Message-ID: <bsko27.6wl@wang.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!decwrl!bu.edu!wang!smayo
References: <1992Aug5.202648.12058@ccu1.aukuni.ac.nz>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!decwrl!bu.edu!wang!smayo
From: smayo@wang.com (Scott Mayo)
Newsgroups: rec.games.programmer
Subject: Re: Maze generating algorithm
Message-ID: <bsko27.6wl@wang.com>
Date: 6 Aug 92 17:18:06 GMT
References: <1992Aug5.202648.12058@ccu1.aukuni.ac.nz>
Sender: news@wang.com
Organization: Wang Labs, Lowell MA, USA
Lines: 31