<!-- MHonArc v2.4.4 --> <!--X-Subject: Re: [MUD-Dev] Autogenerating maps from muds using cardinal directions for exits? --> <!--X-From-R13: Ehaal Uhyngv <fhaaljvmNenqvxf.arg> --> <!--X-Date: Fri, 14 May 1999 01:07:49 -0700 --> <!--X-Message-Id: 373ADB15.D4F24437#radiks,net --> <!--X-Content-Type: text/plain --> <!--X-Reference: E10hLqF-0004L0-00#under,varesearch.com --> <!--X-Reference: 373A0B5F.9CE048CA#cyberhighway,net --> <!--X-Head-End--> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <html> <head> <title>MUD-Dev message, Re: [MUD-Dev] Autogenerating maps from muds using cardinal dir</title> <!-- meta name="robots" content="noindex,nofollow" --> <link rev="made" href="mailto:sunnywiz#radiks,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> [ <a href="../">Other Periods</a> | <a href="../../">Other mailing lists</a> | <a href="/search.php3">Search</a> ] <br clear=all><hr> <!--X-Body-Begin--> <!--X-User-Header--> <!--X-User-Header-End--> <!--X-TopPNI--> Date: [ <a href="msg00235.html">Previous</a> | <a href="msg00237.html">Next</a> ] Thread: [ <a href="msg00217.html">Previous</a> | <a href="msg00203.html">Next</a> ] Index: [ <A HREF="author.html#00236">Author</A> | <A HREF="#00236">Date</A> | <A HREF="thread.html#00236">Thread</A> ] <!--X-TopPNI-End--> <!--X-MsgBody--> <!--X-Subject-Header-Begin--> <H1>Re: [MUD-Dev] Autogenerating maps from muds using cardinal directions for exits?</H1> <HR> <!--X-Subject-Header-End--> <!--X-Head-of-Message--> <UL> <LI><em>To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI> <LI><em>Subject</em>: Re: [MUD-Dev] Autogenerating maps from muds using cardinal directions for exits?</LI> <LI><em>From</em>: Sunny Gulati <<A HREF="mailto:sunnywiz#radiks,net">sunnywiz#radiks,net</A>></LI> <LI><em>Date</em>: Thu, 13 May 1999 09:00:53 -0500</LI> <LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI> <LI><em>Sender</em>: <A HREF="mailto:gulats01#e-markets,com">gulats01#e-markets,com</A></LI> <LI><em>Sender</em>: <A HREF="mailto:mud-dev-admin#kanga,nu">mud-dev-admin#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> Ben Greear wrote: > > J C Lawrence wrote: > > > > > In a long prior life I hacked a tool to build maps from telnet game > > logs. The algorithm was simple: > > > > 1) Pull out all command lines which contain a directional command > > (U/D/N/NE/E/SE/S/SW/W/NW) and the next line of output (the room > > desciption of the room moved to). > > > > 2) Trim out all error/"You can't do that" entries. > > I will be working from my world database, and so can make complex, and > arbitrarily correct assumptions about the exits et al. I can also > do things like stop at zone boundaries and so on... > > > 4) Build a graph of nodes representing thr trimmed log (just walk > > down the log, adding nodes as new locations are found). > > Care to elaborate on that part? > [rest snipped] When I did stuff like this a few years ago, I ran into problems of changes of resolution: for example, while within a city, each "room" was relatively close to the other, and once you left the city.. the scope expanded. And entering a wizard's realm, sometimes going North, East, South, West, didn't bring you back to where you started. Even more common: [street]--[street] | | [shop] [street2] and in the shop: [street] | [shop]-[behindthecounter] [behindthecounter] would bump into [street2] the problem is that the maps would "bump" into each other in very non-visually-pleasing ways. Method 1 to solve it was scoping things (which I picked out of the filename for the room (this was LPC)). Method 2 was interesting: Whenever you're going to "bump" into something, you do the equivalent of inserting a bunch of blank columns or rows into your graph, and then try again. It kinda worked. Method 3 was: If we're going to bump into something, don't map it on this page, draw it on a seperate page. I got a lot of pages; our mud wasn't very well planned. Method 4 (which I did not try) was: choose some level at which to group things together so they map well. If they don't map well, go back and subdivide the groups. [human intervention would be cool there] Algorithm was kinda like this: do { Z dimension = 0 put a starting point on the map somewhere; // possibly set up "current scope" info as well do { for every point that's on the map if there's an exit we haven't followed yet find out if that exit is followable (ie, maybe you don't want different wizard's stuff to pop up on the same map) find out if that exit's target room has already been mapped (if so, is it in the right spot? if not, log it as a problem) if not, put it on the map: if the place we were going to place it is occupied "bump" or log or [your choice] endif endif endif next } until we_could_do_nothing_this_last_pass increase Z dimension } until there are no more rooms left to map I ended up writing an object that would run around in the mud making notes of rooms and the exits within them; this object wrote to a log file like so: /room/file/name north: /other/room/file/name east: /other/room/file/name/also down: /yet/another/room/file/name then, a different program parsed through the log file, calculated coordinates (I used X,Y and "Z", Z being a page number), and stuck them right back into the logfile: /room/file/name 45 60 0 north: /other/room/file/name 45 61 0 east: /other/room/file/name/also 46 60 0 down: /yet/another/room/file/name 39 25 2 I think I wrote that part in perl, or clipper [I was a clipper programmer back then for a living] I then had a last program go through and draw these suckers on a screen (in clipper, using some graphics library or the other). That's about when I shelved the project, other things became more interesting. Cheers, Sunny _______________________________________________ MUD-Dev maillist - MUD-Dev#kanga,nu <A HREF="http://www.kanga.nu/lists/listinfo/mud-dev">http://www.kanga.nu/lists/listinfo/mud-dev</A> </PRE> <!--X-Body-of-Message-End--> <!--X-MsgBody-End--> <!--X-Follow-Ups--> <HR> <!--X-Follow-Ups-End--> <!--X-References--> <UL><LI><STRONG>References</STRONG>: <UL> <LI><STRONG><A NAME="00194" HREF="msg00194.html">Re: [MUD-Dev] Autogenerating maps from muds using cardinal directions for exits?</A></STRONG> <UL><LI><EM>From:</EM> J C Lawrence <claw#varesearch,com></LI></UL></LI> <LI><STRONG><A NAME="00217" HREF="msg00217.html">Re: [MUD-Dev] Autogenerating maps from muds using cardinal directions for exits?</A></STRONG> <UL><LI><EM>From:</EM> Ben Greear <greear#cyberhighway,net></LI></UL></LI> </UL></LI></UL> <!--X-References-End--> <!--X-BotPNI--> <UL> <LI>Prev by Date: <STRONG><A HREF="msg00235.html">Re: [MUD-Dev] Custom Server Roll Call?</A></STRONG> </LI> <LI>Next by Date: <STRONG><A HREF="msg00237.html">Re: [MUD-Dev] Custom Server Roll Call?</A></STRONG> </LI> <LI>Prev by thread: <STRONG><A HREF="msg00217.html">Re: [MUD-Dev] Autogenerating maps from muds using cardinal directions for exits?</A></STRONG> </LI> <LI>Next by thread: <STRONG><A HREF="msg00203.html">Re: [MUD-Dev] Autogenerating maps from muds using cardinal directions for exits?</A></STRONG> </LI> <LI>Index(es): <UL> <LI><A HREF="index.html#00236"><STRONG>Date</STRONG></A></LI> <LI><A HREF="thread.html#00236"><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>Re: [MUD-Dev] Autogenerating maps from muds using cardinal directions for exits?</STRONG>, <EM>(continued)</EM> <ul compact> <LI><strong><A NAME="00186" HREF="msg00186.html">Re: [MUD-Dev] Autogenerating maps from muds using cardinal directions for exits?</A></strong>, Mik Clarke <a href="mailto:mikclrk#ibm,net">mikclrk#ibm,net</a>, Sun 09 May 1999, 11:26 GMT <UL> <LI><strong><A NAME="00188" HREF="msg00188.html">Re: [MUD-Dev] Autogenerating maps from muds using cardinal directions for exits?</A></strong>, Ben Greear <a href="mailto:greear#cyberhighway,net">greear#cyberhighway,net</a>, Mon 10 May 1999, 07:05 GMT <UL> <LI><strong><A NAME="00194" HREF="msg00194.html">Re: [MUD-Dev] Autogenerating maps from muds using cardinal directions for exits?</A></strong>, J C Lawrence <a href="mailto:claw#varesearch,com">claw#varesearch,com</a>, Tue 11 May 1999, 20:13 GMT <UL> <LI><strong><A NAME="00217" HREF="msg00217.html">Re: [MUD-Dev] Autogenerating maps from muds using cardinal directions for exits?</A></strong>, Ben Greear <a href="mailto:greear#cyberhighway,net">greear#cyberhighway,net</a>, Wed 12 May 1999, 22:13 GMT <UL> <LI><strong><A NAME="00236" HREF="msg00236.html">Re: [MUD-Dev] Autogenerating maps from muds using cardinal directions for exits?</A></strong>, Sunny Gulati <a href="mailto:sunnywiz#radiks,net">sunnywiz#radiks,net</a>, Fri 14 May 1999, 08:07 GMT </LI> </UL> </LI> </UL> </LI> </UL> </LI> </UL> </LI> <LI><strong><A NAME="00203" HREF="msg00203.html">Re: [MUD-Dev] Autogenerating maps from muds using cardinal directions for exits?</A></strong>, Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Tue 11 May 1999, 20:11 GMT </LI> </ul> </LI> <LI><strong><A NAME="00167" HREF="msg00167.html">[MUD-Dev] Discussion of large server IO handling desing</A></strong>, J C Lawrence <a href="mailto:claw#varesearch,com">claw#varesearch,com</a>, Sat 08 May 1999, 04:25 GMT <LI><strong><A NAME="00165" HREF="msg00165.html">[MUD-Dev] Virtual Property</A></strong>, J C Lawrence <a href="mailto:claw#varesearch,com">claw#varesearch,com</a>, Thu 06 May 1999, 15:24 GMT <UL> <li><Possible follow-up(s)><br> <LI><strong><A NAME="00166" HREF="msg00166.html">RE: [MUD-Dev] Virtual Property</A></strong>, Koster, Raph <a href="mailto:rkoster#origin,ea.com">rkoster#origin,ea.com</a>, Thu 06 May 1999, 16:31 GMT </LI> </UL> </LI> </UL></BLOCKQUOTE> </ul> <hr> <center> [ <a href="../">Other Periods</a> | <a href="../../">Other mailing lists</a> | <a href="/search.php3">Search</a> ] </center> <hr> </body> </html>