[MUD-Dev] Thinking outside of the room . . . ur . . . box

MIKE MacMartin mike at igs.net
Thu Jul 31 01:12:38 CEST 2003


Nolan J. Darilek wrote the quoted text.

> Another idea: descriptions are comprised of objects, not strings
> of text attached to rooms. If, for instance, you stand at an
> intersection of 4 streets with a building on each corner, each
> building's facade contributes to the description. The building
> covers a lot, so teleport the building away and the "room"
> description alters. Destroy it, and the building becomes a pile of
> rubble. As I also want descriptions to change based on perspective
> and read more like a book than a random string of text that just
> so happens to be connected, descriptions will consist of a
> tag-based language which will allow for both textual substitutions
> (I.e. something that inserts the words "ahead/behind/right/left")
> and "hints" (I.e. even though the flashing neon sign is smaller
> than the skyscraper, you'd probably notice it first.)

The way I'm intending to deal with things like this is doing it with
a room system (the way I see it, the mud boils down to locations and
system).  The rooms are an undefined size, so a planet could occupy
a room in the spaceship operates, but at a different scale, say
building scale, each room is a room, or at a larger scale, each room
is a building, or city or forest or whatnot.  Remember that there is
a 3-d co-ordinate system there (well, not really.  Each room can
have an exit pointing in whatever direction).  I was thinking that I
could design a client that would use the extensible stat framework
and keep track of co-ordinates within a room that way.

I rather like your description language ... mind if I steal that
idea?

> I'm having a few problems determining how this system will work
> (just a few, huh ;) so I wanted to toss out my ideas long before I
> start coding. First, I'm not terribly clear on how to integrate
> polar and Cartesian coordinates. I mean, say I have a square area
> on a planet's surface. I want the square area to represent a city,
> so I decide that it's, say, 5X5 KM. It would be easiest to handle
> this as a square using cartesian coordinates . . . and, for such a
> small area, the curvature of the sphere won't matter. What if the
> area is, say, 1000X1000 KM, however? I'm trying to avoid
> special-case situations ("You can instantiate rectangular areas,
> but don't make them larger than X!"), so I'm wondering if there's
> a more elegant solution for creating shapes atop spheres?

None that I can think of, but if you do figure one out, make it
LGPL/BSD licence so I can use it!

> Within the game, many of the shapes used will be rectangles as to
> make navigation a bit easier (I'm not entirely sure how to handle
> oddly-shaped rooms as of yet.) I would, however, like to offer the
> option of making triangles, octagons, whatever your twisted
> builder heart desires. :) I thought about doing this with a
> generic polygon containing a list of vertices, but are there any
> generic algorithms for taking a polygon of N sides and determining
> whether a point is contained within, or is this problem solved on
> a case-by-case basis (I.e. define a triangle class, rectangle
> class, etc.?)

Google search for "point in polygon" and MacMartin.  My father found
possibly the most efficient C implementation for the "raytrace"
method of finding it.

MIKE
--
Beware the JabberOrk
_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev



More information about the mud-dev-archive mailing list