[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Miniwindows
. . -> [Subject]  XYZ Map?

XYZ Map?

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by LupusFatalis   (154 posts)  [Biography] bio
Date Sun 11 Apr 2010 11:35 PM (UTC)
Message
Alright, remember me? Of course you do! Until recently I've not had time to work on my mapper. Its very mud specific, so I'll post a generic copy for you all after I finish a few more key stages and am in a position to do so. It is entirely coded in Python.

It has the following functionality:
- Creates/Loads a database.
- Extracts room information: Name, Description, Exits
- Generates room coordinates based on equivalent path length
- Matches room up-to room info/coordinates.
- Generates new IDs for new rooms.
- Extracted information is depicted in a miniwindow.

After I deal with pathing, I will recode this to use path equivalence for matching and coordinates only for the baseline map visualization. However, that isn't the next stage.

So, here is my next big goal for development, which probably won't get worked on for another 1-2 months:
- Generate boxes pertaining to each room.
- Boxes vary in colors: Red (current), Dark Gray (incomplete), Light Gray (complete), Blue (unique)
- Lines are drawn to depict links.
- Rooms above and below will be: Offset, Not filled or Transparent
- Vertically I plan to show either 3 or 5 levels in this way, in the plane I plan to show a 9x9 or 11x11 grid. Ideally these would be dynamic.

Has anyone done something similar, and can you guys point me in the right direction. Aside from a pretty simple text extraction, I've done very little with miniwindows. Generally speaking, I've done very little graphical work.

Anyhow, thanks for your time and consideration guys!
[Go to top] top

Posted by Nick Gammon   Australia  (22,989 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Mon 12 Apr 2010 05:11 AM (UTC)
Message
LupusFatalis said:

Has anyone done something similar ...


Yes.

Template:post=10138 Please see the forum thread: http://gammon.com.au/forum/?id=10138.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by LupusFatalis   (154 posts)  [Biography] bio
Date Reply #2 on Mon 12 Apr 2010 11:39 PM (UTC)

Amended on Mon 12 Apr 2010 11:41 PM (UTC) by LupusFatalis

Message
Oh wow, now that's beautiful. Looks like I'll have to spend some time learning Lua to get this working! Or will this integrate with my current python plugin that does all the text extraction, for name desc, etc.. (and rips out variable parts of room descriptions, like light levels)?

I read that it had some issues dealing with non-unique areas. Which is essentially my problem. Neverfear though, for I have a foolproof solution, but haven't both the time and coding skills to manage it! (I do make one assumption in this an exit from one room will always take you to the same place)

Ultimately this can be resolved entirely by checking path equivalence. i.e. Here is the setup, your character is running around the mud and you come across a room, we'll call it room A. It looks familiar to another room (B), because it has the same name, description, exits, etc... So, how can we check that room A and room B are the same? Simple. To know of room B's existence in the first place, the mapper has to have seen it. Presumably there are SOME unique rooms SOMEWHERE. So, all the mapper must do now is from room A take the path to a unique room as if it were leaving from room B. Now, all the rooms it generates along the way will either be flagged as possible matches and checked at the same time, or at some point prove that the original suspected match and every subsequent suspected match was in fact unique to the best of the mapper's knowledge.

In short, this would amount to adding a uniqueness tag as a option. And manually specifying unique rooms. OR, what I've done--assume every room is unique unless it has certain characteristics. i.e. in my case the non-unique area is a cave system, so the names are "A * cave" "A * tunnel" and so on. So, unless it has something to that effect in the name, it automatically gets tagged as unique.

In any case, I absolutely love what you've done with it, and I hope to learn Lua as I get the time; if only to implement this! Are there any good sources for newcomers to the language but not to programming?
[Go to top] top

Posted by Nick Gammon   Australia  (22,989 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Tue 13 Apr 2010 08:46 AM (UTC)
Message
I'm inclined to agree with your comments about rooms being made unique by their proximity to other rooms.

As for Lua, check out the Programming in Lua book, link to it in the Lua section of the forum here.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Twisol   USA  (2,257 posts)  [Biography] bio
Date Reply #4 on Tue 13 Apr 2010 09:30 AM (UTC)
Message
That reminds me distinctly of Cepheid stars, which have known distances from us and which can be used to determine the distance to an unknown star. You're using known rooms to determine where an unknown room is.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #5 on Tue 13 Apr 2010 01:46 PM (UTC)
Message
I don't think that algorithm is formally correct, without some form of user input to seed the data (i.e., an assertion that a few rooms are in fact unique), and also because for all you know the room could resemble something you haven't seen yet. That said, I think that it is a very good heuristic and probably quite sufficient; good idea. :)

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by LupusFatalis   (154 posts)  [Biography] bio
Date Reply #6 on Mon 19 Apr 2010 05:13 PM (UTC)
Message
Yeah, like I said there are two basic criteria for this to be foolproof:
(1) A path between two rooms must always yield the same result.

Example: If I go north from room A, I must always end in room B. For all rooms A and B.

(2) There is at least one identifiable room with an unique HASH value (ROOM:DESC:EXITS_DESC) after variable data is extracted.

Example:
A Simple Room
This is a simple room, courtesy of LupusFatalis. The sun shines outside, letting light in.
Exits: a closed oak door leading south.

So, here our HASH value would be:
"A Simple Room:This is a simple room, courtesy of LupusFatalis.:oak door leading south"

Now, if this value is unique to the entire MUD we can use it as a unique room for the mapper. If not, we need some other such unique room.

Criterion 1, I've definitely seen violated in some MUDs. Typically its in a maze type area where you need some sort of 'navigation' type skill to get the 'proper' result. I've never seen one in which this was a sizeable portion of the mud, and the user should just denote the entrance to this area on his mapper and not map it.

Criterion 2, I've yet to see violated by any MUD. i.e. I've yet to play a mud that doesn't have at least one unique room. In fact, most mud out of the hundreds I've tried over the years have 'most' of their rooms as unique. (Save ones which generate more rooms as the player explores, i.e. an infinite ocean)

So seeing as violations to (1) are limited to small fractions of the map, and violations to (2) would be user error. I'd say this is a hugely powerful technique, much more so than others I've seen.

Anyhow, I poked through that mapper code a bit. I really can't make heads or tails of it. To the extent that I can't even see where triggers are that capture room name, desc, etc...
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #7 on Mon 19 Apr 2010 05:36 PM (UTC)
Message
Quote:
Now, if this value is unique to the entire MUD we can use it as a unique room for the mapper. If not, we need some other such unique room.

Well the question in general is how you determine that a given room is indeed unique. I agree, though, that in most MUDs, the vast majority of rooms are indeed unique -- barring things like wilderness, as you mentioned.
I'm not sure why you call violations "user error" though.

(By the way, did you truly mean that you've meaningfully tried "hundreds" of MUDs?)

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by LupusFatalis   (154 posts)  [Biography] bio
Date Reply #8 on Mon 19 Apr 2010 08:28 PM (UTC)

Amended on Mon 19 Apr 2010 09:24 PM (UTC) by LupusFatalis

Message
Maybe user error isn't the right phrase. But aside from the random exit type situation, your error is something I haven't thought of or miscoding uniqueness. And if that is the only thing the user does manually... I.E. The mapper should default every room to non-unique as this won't hurt, it just makes checking path equivalence a long, arduous (but possibly automated) process. Whereas the user should manually flag rooms he is 100% confident have a unique HASH value. For example, in my situation I would likely use the entrances to each of the areas I intend to map as my 'unique' rooms. My 'wilderness' areas consists of hexagons, so I have a simple coordinate system I can use to track my position relative to that 'global' map. Now I've definitely got to call that plugin my GPS :).

-----------------------------------------------------------

As far as how many muds I've tried for more than say, a week, hundreds is probably a bit much. But its definitely getting up there. Been at it on and off for 10+ years after-all. And it took me a very long time to determine what it is that keeps me interested in a MUD.

To me there are really a few important factors. The environment has to be real enough that I can 'suspend disbelief.' It must also be harsh enough to be challenging (and realistically, after a while NPCS just don't cut it--so I look for PK and permanent death). I also prefer 'skill-based' to a 'class/level' system, though I'm always willing to give something a shot if it fits the rest.

The best suitor to those criteria I've found has been Dartmud. Its a pretty niche community--most people don't like spending months generating a character to constantly have it in danger of being permanently killed. That said, the player base has gotten tame over the years. And the admins try to make sure that there isn't 'griefing' going on.
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


25,327 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]