From atchity@tc2.fi.ameslab.gov  Wed Mar 23 08:52:03 1994
Received: from ISUMVS.IASTATE.EDU by mellers1.psych.berkeley.edu (4.1/1.31)
	id AA07408; Wed, 23 Mar 94 08:52:03 PST
Received: from 147.155.30.12 by ISUMVS.IASTATE.EDU;
        Wed, 23 Mar 94 10:50:20 CST
Received: by tc2.fi.ameslab.gov (920110.SGI/920502.SGI.AUTO)
        for @isumvs.iastate.edu:dune-heads@mellers1.psych.berkeley.edu id
 AA21032; Wed, 23 Mar 94 10:45:54 -0600
Date: Wed, 23 Mar 1994 10:45:36 -0600 (CST)
From: "Gregory J. Atchity" <atchity@tc2.fi.ameslab.gov>
Subject: Manual explaining D-space
To: DuneMUSH Faction Heads <dune-heads@mellers1.psych.berkeley.edu>,
        DuneMUSH House Heads <dune-houses@mellers1.psych.berkeley.edu>,
        DuneMUSH Admin Staff <dune-admin@mellers1.psych.berkeley.edu>
Message-Id: <Pine.3.89.9403231057.A21022-0100000@tc2.fi.ameslab.gov>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Status: RO

Dynamic Space Use Document

Date: 23 Mar 1994
Author: Greg Atchity (Schmidt@DuneMUSH, atchity@iastate.edu)

Description:
This short introduction to Talek's D-space explains what D-space is and how
to create a map for use with D-space.

Format:
This document is written in question and answer format.  If you've suggestions
for different questions, or corrections to answers, please send them to
Schmidt.

Outline:
Q1 What is D-space?
Q2 How does D-space work?
Q3 What is D-space good for?
Q4 D-space sounds cool.  Why isn't EVERYTHING D-space?
Q5 D-space sounds cool. How can I set up my planet/continent/whatever to
   utilize D-space?
Q5.1 How big are D-space maps?
Q5.3 How does one make a map 360 characters wide when my editor wraps lines?
Q5.2 What are these maps like?
Q5.4 What do I do after I make my map?
Q5.5 Ok, I've made the map and the dpos. Now what?
Q5.6 What about mountains and other blocked terrain?

Q1 What is D-space?

   D-space is a MUSH object system written by Talek (T. Alexander Popiel) to
simulate a very large MUSH area with a small set of rooms which are
'created' as needed, and destroyed when they are not.  The current
implementation on DuneMUSH relies heavily on a set of source code
modifications Talek made in the fall of 1993, and it will not run on under
any other MUSH distribution.  These modifications (and a copy of the D-space
source) are available from Talek, by request to <popiel@colorado.edu>.
Dune's D-space is currently maintained by Schmidt (Greg Atchity).

Q2 How does D-space work?

   The D-space relies upon the fact that any exits in a zone room can be
entered from the rooms zoned to it.  The Dynamic Zone room contains 26
exits named after all resonable compass direction combinations of North,
South, East, West, Up, and Down.

   A room is 'linked' to D-space in the sense that it is zoned to the
Dynamic Zone Room, assigned a coordinate in space (an x, y, z triple
corresponding to the rooms location in a 3-dimensional cartesian system),
and attached to a special bookkeeping room (the Dynamic Nexus).  Once the
room is zoned to the Dynamic Zone Room, all the zone exits (East, West,
UpWest, SouthEast, etc.) are available.

   A room's coordinate is stored in its COORD attribute, which has the form
'X Y Z Name' where X, Y, and Z are the cartesian coordinates of the room
and 'Name' is the one-word name of the D-space area.  On DuneMUSH, 'Name'
is usually the name of a planet, e.g. Arrakis or Caladan.

   When you step through one of these zone exits, the D-space system
calculates the coordinate of the destination room, and if a room with those
coordinates does not already exist, it will set up such a room and
transport you to it.  Further, if a MAP for that area (planet) exists the
D-space system will consult the map, determine what type of terrain the
destination room is part of, and parent that room to the correct terrain
DPO (D-space parent object).

Q3 What is D-space good for?

   Dspace is good at providing large, less often used tracts of similar areas.
For example, a wide ocean, or a prairie between two cities, are perfect for
D-space.  So are huge, arid, dangerous deserts.

   New uses for D-space are being discovered daily.  Long stretches of
highway, skies through which vehicles fly, even long corridors inside
palaces have been experimented with.  Ski slopes and treacherous
mountainsides also look very promising.

Q4 D-space sounds cool.  Why isn't EVERYTHING D-space?

   Movement through D-space is more computationally expensive than moving
through normal rooms.  Also, D-space rooms are less flexible than normal
rooms - each must be owned by the Dynamic character, each must be zoned
to the dynamic zone room, and most are parented to one of the D-space
parent objects.

Q5 D-space sounds cool. How can I set up my planet/continent/whatever to
   utilize D-space?

  The first step in setting up a D-space is to make a map.  You must decide
how big an area you wish represented by the D-space, and what sort of terrain
it will contain.

Q5.1 How big are D-space maps?

  The current dune planets are 360 'units' wide and 181 'units' tall.  These
'units' represent degrees of longitude and lattitude in a very loose sense.
The X axis is numbered from -179 (at left) to  180 (at right), including
coordinate 0.  The Y axis is numbered from 90 (at top) to -90 (at bottom),
again including 0.

   The planets currently are NOT spherical, but instead are represented by
cylinders - the X axis wraps from -179 to 180 going west and from 180 to
-179 going east.  The north and south 'poles' are the flat parts of the
cylinder, from which south and north are the only directions you may
travel.  Ongoing research in map coordinates may result in a more realistic
mapping.  However, the current mapping provides a simplicity which far
outweighs the unrealistic pole behavior.

   Not all dune planets are 360x181.  One planet is only about 40x80.  The
real decision is up to you, although 360x181 is a standard some people wish
to be adopted by all.

Q5.2 What are these maps like?

  The D-space maps are simply ascii text files that the authors have typed in
with text editors of some sort and e-mailed to Schmidt.  Accompanied with each
is a 'key', which provides an explanation of what each character on the map
means.

  Here is a small example map depicting an island in the middle of an ocean:

       1                   1
     10987654321012345678901234
    4..........................
    3.........bb...............
    2.......bbbbbbbbbbbbbbb....
    1......bbffffffffffbbb.....
    0......bbfffMffffbb........
   -1......bbffffffffbb........
   -2.......bbbbbbbbbb.........
   -3.........bb...............
   -4..........................

Key:
   . = Ocean
   b = Beach
   f = Forest
   M = Mountain

The above map is only  26 units wide and 9 units high, but it serves to
illustrate how simple it is to make a map.  The numbers along the top and
left are not actually part of the map, but serve as references; using them
it is easy to ascertain that the Mountain spot in the map has coordinate
0 0 0 (Z is assumed to be zero everywhere).

   The DuneMUSH maps are very similar to the above example, only larger
with more types of terrain.

   Take special note that maps must be case insensitive (i.e. don't use
'a' and 'A', they are considered the same), and that you should avoid using
the special characters '*' and '?'.

Q5.3 How do I make a map 360 characters wide when my editor wraps lines?

   Simply make the map as a series of files each 80 characters wide or less.
Schmidt can easily paste together files of different widths (but same length!)
when he generates the mush map.

Q5.4 What do I do after I make my map?

   After the map is made, the different DPOs (D-space parent objects) must be
made.  Typically, in order to provide some variation, the DPOs are given a
description which changes randomly each time you look at or enter them.  If
someone were ambitious and wished to describe every spot on a 360x181 map,
this could be done.  Likewise, specific map coordinates in D-space can be
given unchanging descriptions while others have random ones.

   There is much flexibility in the DPO objects.  New and inventive ways
of providing D-space variation and exitement are constantly being discovered.

Q5.5 Ok, I've made the map and the dpos. Now what?

  If you've not yet, email the map to Schmidt at atchity@iastate.edu, so he
can load it up.  Tell him where the DPOs are, he'll need to examine them
and place them inside the map object, which is placed in a standard location.
He'll also provide you a map viewer so you can look at your map.

  THEN comes the part where you need to 'link'  your permanent locations to
the D-space map.  You must decide from which permanent (i.e. normal mush
object) rooms you wish D-space to be accessible from, and assign those
rooms coordinates on your map.

   NO TWO PERMANENT ROOMS MAY HAVE THE EXACT SAME D-SPACE COORDINATES.

   When you've decided which rooms will be linked up with what coordinates,
contact Schmidt or another admin and ask them to do the actual linking for
you.  This is an admin reserved command which requires very little of the
admin, except that they must be physically present in each room in order
to do the linking (so have your dbrefs handy).

Q5.6 What about mountains and other blocked terrain?

   To enter a D-space room, you must be able to pass the @elock on a DPO
object of the room you are about to enter.  Impassible Shield Wall, for
example, is made simply by an @elock Shield Wall=#0.  Water can be made
passible only for boats with an @elock Water=ISBOAT/1 (and an appropriate
&ISBOAT attribute, see Schmidt for help).

---
Greg Atchity (atchity@IaState.edU and atchity@ameslab.gov)
Iowa State University and Ames Laboratory - USDOE


