Re: [QUESTION] Randomly Generated Areas

From: Mental (kjek@excalibur.onate.nmhs.edu)
Date: 02/02/97


On Sun, 2 Feb 1997, Daniel Koepke wrote:

> It's been talked about a bit here, but here's what I want to do.
> I want to start at point 0,0 on my world map and from there, I want
> to create an area with *every* room linked in some way to the others
> (eg., no loose rooms), but with dead ends.  Every room along the
> parimeter (eg., 0,0-0,24 , 0,0-24,0 , 24,0-24,24 , 0,24-24,24) would
> be linked to another parameter wall (thus, there's a clear path around
> the parameter).  Not every parameter "square" would be linked to the
> interior of the area, just to the adjacent parameter walls.
> 
> That last part is easy.  I create the rooms (25x25 grid) and go along
> the parameter adding the exits.  At this same time, I can randomly
> add exits n/s/e/w from the parameter into the interior.  Now, here's
> where I'm stuck.  After doing the parameter, we need to link every
> other room in some way, where we'd have dead ends, etc.  Somewhat like
> a maze. 
> 
> Er, perhaps I'm not stuck, but I'd like suggestions about how to go
> about this.  I have the idea of going through the area in horizontal
> rows and optionally adding turns.
> 
> For instance, we start with this (scaled down to 5x5)
> 
>     A  B  C  D  E
>   1 o--o--o--o--o
>     |        |  |
>   2 o--o  o  o  o
>     |           |
>   3 o  o  o  o--o
>     |           |
>   4 o--o  o  o  o
>     |           |
>   5 o--o--o--o--o
> 
> Then we go horizontally, starting at A2 (first part of the interior),
> we move to B2, C2, D2.  We either make a link to the east, or we decide
> to make a turn.  If we make a turn, we go the square either north/south
> of the current one.  Then we keep going in that same direction until we
> decide to turn again.  That would give us a random patch through the
> grid.  But then we'll have many unlinked rooms.  What to do about them?
> Make a cleanup sweep and link any rooms that aren't presently linked?
> Some code demonstrating generation of a maze would be nice (I'm trying
> to get the major parts of a pkill MUD done before next week)...
> 
> Thank you for any assistance you are willing to give,
> 
> 
> --
> Daniel Koepke
> dkoepke@california.com
> Forgive me father, for I am sin.
> 
> 
> +-----------------------------------------------------------+
> | Ensure that you have read the CircleMUD Mailing List FAQ: |
> |   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
> +-----------------------------------------------------------+
> 
I played on a mud (Ground Zero:  Sites' a bit shaky last time I was 
there... it was at insanity.dorm.umd.edu 6666, then moved to hub.eden.com 
6666 and appears to be back at insanity.dorm.umd.edu again.  Originally 
at smaug.inc.net 6666)  They use a 25x25 grid that expands to 30x30 when 
15+ players log in.  It's a pretty awesome PKmud...  Made for those who 
like raw killing ( I originally played hoping that the majority of the 
players would be smarter than the mobs on most muds.  I was wrong... 
everyone told me it'd take several months to make it to merc status... I 
almost made it to hunter status [more than 2x merc] in the first few 
months...  players are too lazy most of the time)  The mud also has 3 
levels.  Each level connects randomly with member of the same level and 
only members of the same level, then make a few random connections 
between level 1 and 2, and then only 2 connections from level 2 to level 
3.  The connections within a zone (level) are two-way, while between 
zones (levels) it's only one way, unless chance puts an up where a down 
connects.  The object of the game was to nuke the site which is how the 
mud reboots... the better players reboot the mud every 15minutes to and hour.
If you want, check it out...  I'm sure that a few of you have been there 
before and know what I'm talking about.
                                         _--~~^^~~`-.,
               ,--~~~^'~-__            /~             :.
,-~~-_      _--~           ^`,      _-~    _-'~~^`,     `.                 /~
.'----`--,'   _,-~~~~~~~------~---,'     ,'--------`------`--------------|` /
  - - - /   ,-'<- - - -> Justice,~    ,`Justinian <- - - -> - - - - - - (  (
----.--,'  ,~------------------~    .:~------------,-------_-------------|, \
     `\__./  Kwon        ~_        ,: The         ."      .`               \_
              J.           '--..-~` Bringer___ ,-~       .:
               Ekstrom                 _,-')Of`       _,-`
                                      (_  Truth _,--~`
                                        '-,)__-`

+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/18/00 PST