1998Q4/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD&#45;Dev] Re: AFAP: As fast as possible, non linear... -->
<!--X-From-R13: "dhmnu Mfbsgubzr]" <dhmnuNfbsgubzr.arg> -->
<!--X-Date: Tue, 29 Dec 1998 00:27:44 &#45;0800 -->
<!--X-Message-Id: 000701be32b4$e4a3e180$59066520@k6 -->
<!--X-Content-Type: text/plain -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, [MUD-Dev] Re: AFAP: As fast as possible, non linear...</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:quzah#softhome,net">
</head>
<body background="/backgrounds/paperback.gif" bgcolor="#ffffff"
      text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000">

  <font size="+4" color="#804040">
    <strong><em>MUD-Dev<br>mailing list archive</em></strong>
  </font>
      
<br>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->

Date:&nbsp;
[&nbsp;<a href="msg01053.html">Previous</a>
&nbsp;|&nbsp;<a href="msg01054.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00974.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00963.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#01055">Author</A>
&nbsp;|&nbsp;<A HREF="#01055">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#01055">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>[MUD-Dev] Re: AFAP: As fast as possible, non linear...</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: &lt;<A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A>&gt;</LI>
<LI><em>Subject</em>: [MUD-Dev] Re: AFAP: As fast as possible, non linear...</LI>
<LI><em>From</em>: "quzah [softhome]" &lt;<A HREF="mailto:quzah#softhome,net">quzah#softhome,net</A>&gt;</LI>
<LI><em>Date</em>: Mon, 28 Dec 1998 14:53:26 -0800</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
From: Mik Clarke &lt;mikclrk#ibm,net&gt;
Date: Tuesday, December 15, 1998 3:56 PM


&gt;Thinking about it, I'm not convinced that your algorythm will always
&gt;generate a solvable maze.  Condiser:
&gt;
&gt; A-O-O-O O-O
&gt;   | | | | |
&gt;   O-O-O O-O
&gt;   |     | 
&gt;   O-O O-O-O
&gt;   | | | | |
&gt;   O-O O-O-O-B
&gt;
&gt;I think this would meet your loop exit crietria (used = 100), but it is
&gt;not possible to get from A to B.  This could pose something of a problem
&gt;for your players...
&gt;
&gt;Mik


Greetings everyone. I've got a simple maze generator working if anyone
cares to take a peek at it. I replied to this message because it is the
last one in this thread that I have saved. Anyway, regarding the above,
yes, the old method was really bad and I scrapped it all together. This
is what I do now:

(1) Store only the inner E and S walls for each row. This fits nicely
into a short integer for an 8x8 maze, requiring only 15 bits of each
short integer. The even bits (starting with bit0) are used for "south
walls" and the odd bits (starting with bit1) are used for "east walls".

(2) I only check east and south when generating the maze. If the room
to the east is unused, or south is unused, pick one and remove the wall.

I "cheat recurrsion" by using a switch/loop, and avoid any overhead that
the recurrsion normally would produce. In addition, I was (I'm sure it
was very inefficient) running out of stack space in the early versions
of the old generator, and this avoids that aspect all together.

The outer wall of the maze is never used. In addition, it is not even
stored. It is assumed, and therefore it is never needed. Since it is
not needed, why bother keeping track of it?

I have uploaded the first releasable version (read: working, ok-ish)
to the below two links, if anyone wants to check it out/comment on it:

&lt;url:<A  HREF="http://members.xoom.com/quzah/qmaze1.c">http://members.xoom.com/quzah/qmaze1.c</A>&gt;
&lt;url:<A  HREF="http://members.xoom.com/quzah/qmaze1.h">http://members.xoom.com/quzah/qmaze1.h</A>&gt;

Its purpose is simplicity, with mock elegance, while retaining a vast
number overexplaining comments. Enjoy. (And feel free to comment on it,
as I like to have my stuff ripped to shreds ;)

Quzah.



</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg01053.html">[MUD-Dev] ADMIN: New text formatting rule for MUD-Dev</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg01054.html">[MUD-Dev] MUD Design doc - Combat</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00974.html">[MUD-Dev] Re: AFAP: As fast as possible, non linear...</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00963.html">[MUD-Dev] AFAP: As fast as possible, non linear...</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#01055"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#01055"><STRONG>Thread</STRONG></A></LI>
</UL>
</LI>
</UL>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
<ul><li>Thread context:
<BLOCKQUOTE><UL>
<LI><strong><A NAME="00978" HREF="msg00978.html">[MUD-Dev] Graphic design, client questions</A></strong>, 
Thinus Barnard <a href="mailto:thinus_barnard#bigfoot,com">thinus_barnard#bigfoot,com</a>, Thu 17 Dec 1998, 08:50 GMT
<UL>
<LI><strong><A NAME="00989" HREF="msg00989.html">[MUD-Dev] Re: Graphic design, client questions</A></strong>, 
Ben Greear <a href="mailto:greear#cyberhighway,net">greear#cyberhighway,net</a>, Fri 18 Dec 1998, 00:52 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00970" HREF="msg00970.html">[MUD-Dev] Re: AFAP: As fast as possible, non linear...</A></strong>, 
quzah [softhome] <a href="mailto:quzah#softhome,net">quzah#softhome,net</a>, Tue 15 Dec 1998, 12:30 GMT
<UL>
<li>&lt;Possible follow-up(s)&gt;<br>
<LI><strong><A NAME="00974" HREF="msg00974.html">[MUD-Dev] Re: AFAP: As fast as possible, non linear...</A></strong>, 
quzah [softhome] <a href="mailto:quzah#softhome,net">quzah#softhome,net</a>, Wed 16 Dec 1998, 12:29 GMT
</LI>
<LI><strong><A NAME="01055" HREF="msg01055.html">[MUD-Dev] Re: AFAP: As fast as possible, non linear...</A></strong>, 
quzah [softhome] <a href="mailto:quzah#softhome,net">quzah#softhome,net</a>, Tue 29 Dec 1998, 08:27 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00963" HREF="msg00963.html">[MUD-Dev] AFAP: As fast as possible, non linear...</A></strong>, 
quzah [softhome] <a href="mailto:quzah#softhome,net">quzah#softhome,net</a>, Mon 14 Dec 1998, 06:41 GMT
<UL>
<LI><strong><A NAME="00966" HREF="msg00966.html">[MUD-Dev] Re: AFAP: As fast as possible, non linear...</A></strong>, 
Mik Clarke <a href="mailto:mikclrk#ibm,net">mikclrk#ibm,net</a>, Tue 15 Dec 1998, 04:05 GMT
<UL>
<LI><strong><A NAME="00969" HREF="msg00969.html">[MUD-Dev] Re: AFAP: As fast as possible, non linear...</A></strong>, 
Alex Oren <a href="mailto:alexo#bigfoot,com">alexo#bigfoot,com</a>, Tue 15 Dec 1998, 10:01 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00967" HREF="msg00967.html">[MUD-Dev] Re: AFAP: As fast as possible, non linear...</A></strong>, 
Dan Shiovitz <a href="mailto:dbs#cs,wisc.edu">dbs#cs,wisc.edu</a>, Tue 15 Dec 1998, 06:18 GMT
</LI>
</UL>
</LI>
</UL></BLOCKQUOTE>

</ul>
<hr>
<center>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
</center>
<hr>
</body>
</html>