Top Mud Sites Forum

Top Mud Sites Forum (http://www.topmudsites.com/forums/index.php)
-   MUD Coding (http://www.topmudsites.com/forums/forumdisplay.php?f=9)
-   -   auto maps (http://www.topmudsites.com/forums/showthread.php?t=455)

Emit 05-16-2002 03:47 PM


visko 05-16-2002 04:20 PM

A while ago, a good friend of mine decided that he was going to allow for tracking based on a map created in-game of the entire world. This map would basically assign grid points to every room in the game radiating out from recall, and then calculate where a mob/char was in relation to the char trying to track.

Bounds weren't the problem; non-Cartesian rooms were. What you're going to find is that if you have any place in the game where a room goes back to itself, or goes to one room, then another, and back, the game is going to cycle into an infinite loop. I'm actually interested in getting something like this going because track is a nice feature in a mud, so if anyone has suggestions, I'd love to hear them.

-Visko

cronel 05-17-2002 11:13 AM

What you need to do to avoid loops is to remember the rooms you've visited so far. But yes, "non-cartesian" arrangements of rooms will always screw you as they are unmappable.

A basic approach would be to not only remember that you've visited a room, but remember where in the "grid" you found it. So if you find it again in a different position or find a different room for the same position, you have a problem. And when you are about to visit one such room, you add some mark to your ascii map, or such, and move on.

What I wonder is, what would happen if you stop assuming all exits are the same length. For instance an exit east, could mean the next room is not just one unit to the right, but two, three... Making a mapper that does this, however, seems a daunting task. I'm thinking it might be able to digest some non-cartesian areas but might produce maps you'd never expect.

By the way, some clients have automap, like Zmud and Kmud. Kmud is open source... may be worth a look. Also look at the SMAUG "track" code for a related problem.
--cronel

mhc 05-20-2002 11:23 AM

cronel> "non-cartesian" arrangements of rooms will always
cronel> screw you as they are unmappable.

I'm not sure if I understand what you mean here. 'unmappable' in what respect?

cronel 05-20-2002 01:12 PM

In that they can't be mapped to a 2d grid. I thought this was clear from the context of the thread.

mhc 05-22-2002 03:39 PM

Toplogically speaking, everything can be mapped on 2D, especially if it's on a regular grid in N dimensions.

Emit 05-22-2002 10:34 PM


Eddy 05-23-2002 05:34 PM


cronel 05-23-2002 06:32 PM

I admit I don't fully understand that, mhc... what is "N" if the map is 2D?

The point of the exercise (for me) is to make a map, not a drawing of the nodes. I.e. This node here has two connections to two other nodes, one labelled "east", the other labeled "closet", and sure, it can easily be drawn. But is it a map?

For example, there's a room with the eight standard exits n,ne,e,etc, and they all point to the same room. Or, room A northeast exit points to room B, and its southwest exit points to C. But B's southwest exit also points to C. The nodes aren't hard to visualize. But the maps?

Basically I agree with Eddy's point; the rooms model space, but very weirdly as we all know. Maps can easily be drawn of Real Space, say the plans to a house, for example. Groups of rooms can easily be drawn as nodes, since that's what they are. But as they deviate from a "realistic" model of some piece of space, it will be harder to draw them as a map. Perhaps even impossible in some cases, or at least I don't see how.

What I said above and now Eddy I think concurs is that you can drop some of the assumptions for a map and make it approach a node drawing a little, but still come up with something with some semblance of a map. For instance,some assumptions are:

* All rooms are the same size and shape
* All exits have the same length and shape
* All exit "directions" (east) translate to
 the same map direction (to the right)

--cronel


All times are GMT -4. The time now is 12:35 PM.

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright Top Mud Sites.com 2022