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

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Plugins
. . -> [Subject]  Mapper questions
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Mapper questions

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


Posted by Victorious   (85 posts)  [Biography] bio
Date Tue 08 Nov 2016 10:12 AM (UTC)

Amended on Tue 08 Nov 2016 10:15 AM (UTC) by Victorious

Message
Hi,

I'd like to use the mapper module.

1. If the mud doesn't send unique room numbers, I know that an uid can be generated by hashing the room's title, exits, and description. But in some cases there would be collisions caused by e.g 2 different rooms having identical name/description/exits. Is there a way of overcoming this problem? For example, if room A and B have the same hash, and A's north exit is B, I'd want different uids. If this is impossible to do, how would it affect pathfinding if the calculated path passes through such rooms - would it just get stuck there?

2. The mud provides the ability to set different colours for room name, exits and description, providing an easy way of extracting this information. However, when the incoming text is printed to screen, I don't actually want the colour to be shown as that would interfere with my screen reader. How can I get the best of both worlds?

3. How exactly does an exit of a room get mapped so that it points to another room when you walk? I know that conceptually, when you type east and you are in a new room, that it should update appropriately - but how does it associate typed commands with responses? What about custom exits like "inn" or "shop"?

4. Is teleportation supported for pathfinding? E.g, casting a spell to recall? In another mud, you can either walk, or use waypoints. Waypoints are rooms that allow instant travel to other waypoints.
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Tue 08 Nov 2016 11:15 PM (UTC)
Message
Quote:

Is there a way of overcoming this problem? For example, if room A and B have the same hash, and A's north exit is B, I'd want different uids.


The problem is, rooms should be identifiable in their own right. That is, to know that A's north exit is B, you would actually have to walk north and see what happened. And if B happens to be full of angry mobs, you may not want to do that.

Quote:

If this is impossible to do, how would it affect pathfinding if the calculated path passes through such rooms - would it just get stuck there?


If you have rooms that are different but "look" the same, then the mapper will get confused. For example, if you had something like:


Village
  ^
  |
  v
A narrow path
  ^
  |
  v
A narrow path
  ^
  |
  v
A narrow path
  ^
  |
  v
The Town


As you go north from the town, it thinks that you reach "A narrow path" (which you do). Then when you go north again it thinks that north from "A narrow path" leads back to itself. Ditto when you go north a third time. Finally when you hit the village, it would correct the north exit for "A narrow path" so that its view of that part of the MUD is now:


Village
  ^
  |
  v
A narrow path
  ^
  |
  v
The Town


Which is obviously incorrect. Attempts to speed-walk or path-find will fail for that segment. However once you clear the problem spot everything should be OK after that.




Quote:

The mud provides the ability to set different colours for room name, exits and description, providing an easy way of extracting this information. However, when the incoming text is printed to screen, I don't actually want the colour to be shown as that would interfere with my screen reader.


I don't see why colours would affect the screen reader. The screen-reading plugin uses a callback that gets the raw text as displayed, without colours.




Quote:

How exactly does an exit of a room get mapped so that it points to another room when you walk?


As described in this post:

http://www.gammon.com.au/forum/?id=12635

The mapper is "MUD agnostic" (the mapper module). It is supported by other functions in a plugin, those functions call functions like "get_room" to get room information. These would vary from MUD to MUD (eg. depending on whether you have room numbers, or have to create your own).

If the MUD doesn't tell you where each exit leads, what I normally do is remember when the user types an exit (eg. "east") and then when we end up in a new room we deduce that going east from the previous room must lead to this room, hence we can add that exit link to the database for that room.


Quote:

What about custom exits like "inn" or "shop"?


They won't work unless you allow for them somehow. In any case the drawing part of the mapper only draws the main directions (n/s/e/w) plus the ones inbetween (ne/nw/se/sw) and the two directions "up" and "down".

Quote:

Is teleportation supported for pathfinding?


Not in the version I did, however I believe some people have added portals - I'm not sure how. I think Aardwolf does that, you could ask Fiendish how he did it.

- Nick Gammon

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

Posted by Victorious   (85 posts)  [Biography] bio
Date Reply #2 on Wed 09 Nov 2016 06:33 AM (UTC)
Message
I think that if colours happen to match those that screen readers look for when watching for screen changes, they announce it, which causes problems.
[Go to top] top

Posted by Victorious   (85 posts)  [Biography] bio
Date Reply #3 on Mon 21 Nov 2016 06:44 PM (UTC)
Message
Regarding colours, is it possible to do something like the following?

* have all triggers that use colour do a keep evaluating, hide text from output and log
* have a trigger with a high sequence number catch all coloured text, printing the text out without colours?
* Since I can't visually see the colours myself, is there an easy way of having it print what colour text is? E.g colour<black>hp:250/250</colour:black>

I understand the heuristic used for mapping uses last sent text to match directions, but that breaks if you're sending stacked commands. Is there any way around this problem besides going to each room slowly?
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #4 on Tue 22 Nov 2016 05:35 AM (UTC)
Message
You must be using a different screen-reader to what ships with MUSHclient. That is specifically designed to read the text-only output of the MUD.

If you are using something else that you are more comfortable with (and I don't know how it is reading the graphics) you can always set all the ANSI colours to white (except the background of course) so there won't be any colour changes.

- Nick Gammon

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

Posted by Victorious   (85 posts)  [Biography] bio
Date Reply #5 on Tue 22 Nov 2016 12:26 PM (UTC)

Amended on Tue 22 Nov 2016 07:21 PM (UTC) by Victorious

Message
If you're talking about the plugin that reads incoming text using sapi5, then I don't know of anyone who uses that due to high latency in the voices themselves and speech rates for most voices being too slow. Most use MushReader instead, which directly communicates with screen readers: https://www.allinaccess.com/mc/

If I did that, that would defeat the point of using it - I want to have the mud send me different colours so I can differentiate them, and yet have it displayed as if ascii was not turned on (i.e, treat everything as white on black). Unless you mean there's a way to do this?

What're the performance characteristics of the mapper module or the pathfinding algorithm used? The mud I want to use it with has large overland areas (e.g materia magica). One continent has 200,000 rooms (counting these rooms).

I have data about the terrain for all these rooms, and was thinking of using the mapper to compute optimal paths between areas. Fully mapped, the mud probably has millions of rooms.
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #6 on Tue 22 Nov 2016 08:38 PM (UTC)
Message
You said before:

Victorious said:

I don't actually want the colour to be shown as that would interfere with my screen reader.


Now you are saying you want the colours to be spoken. I am confused about what you are asking for.

- Nick Gammon

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

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #7 on Tue 22 Nov 2016 08:42 PM (UTC)
Message
Victorious said:

What're the performance characteristics of the mapper module or the pathfinding algorithm used? The mud I want to use it with has large overland areas (e.g materia magica). One continent has 200,000 rooms (counting these rooms).


The mapper is quite fast however you normally limit the depth of the search. Obviously searching 200,000 rooms would take time. Normally you set a limit (which is configurable) of around 50 rooms. That is, 50 rooms outwards from the starting point (that would be more than 50 rooms in total, eg. 50 rooms east, 50 west, 50 north and so on).

My thinking there is that you want the fastest path to a local shop, not the fastest path to somewhere on the other side of the continent where taking a portal is probably a better option. There is a bit of background to the algorithm in this thread:

http://www.gammon.com.au/forum/?id=7306

- Nick Gammon

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

Posted by Victorious   (85 posts)  [Biography] bio
Date Reply #8 on Wed 23 Nov 2016 05:07 AM (UTC)
Message
Let me try explaining it more clearly.

If I have ascii colours being displayed from the mud in mushclient, they have problems since they interpret certain colour changes as new text being drawn to the screen, and try reading parts of it. This interferes with the other plugin, mushreader, which uses the provided callbacks to directly tell the screen reader what to read.

What I want is the ability to turn on ascii colour in muds, so that I can do this:
1. create triggers based on colour attributes.
2. Just before the screen is updated with the new text, to intercept the text about to be drawn, strip ansi from it, and then draw the modified text.

This would allow me to create colour matching triggers, and have my screen reader not break.
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #9 on Wed 23 Nov 2016 05:30 AM (UTC)
Message
I wish you would give more detail about this screen reader "mushreader". If it is reading out colour changes you can surely tell it not to?

As for detecting colours, if you are displaying ANSI colours (the standard 16 normal and bold ones) you can still detect that "brown" has arrived even if you choose to display it as blue on the screen.

- Nick Gammon

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

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #10 on Wed 23 Nov 2016 05:32 AM (UTC)
Message
Your question:

Quote:

2. The mud provides the ability to set different colours for room name, exits and description, providing an easy way of extracting this information. However, when the incoming text is printed to screen, I don't actually want the colour to be shown as that would interfere with my screen reader.


... seems to me to be a different topic to "mapper questions". It is nothing to do with the mapper, but an ancillary question about displaying colours and screen readers. It is confusing to jump back and forwards between discussions about detecting room numbers, and how long it takes to pathfind, to asking about how to suppress colours.

- Nick Gammon

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

Posted by Victorious   (85 posts)  [Biography] bio
Date Reply #11 on Wed 23 Nov 2016 06:33 AM (UTC)
Message
Apologies, should I create a new topic for it? It came up because some muds allow you to colour room names and descriptions differently, which makes detecting them much easier.
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #12 on Wed 23 Nov 2016 08:47 PM (UTC)
Message
I think a new topic for how colours are drawn, and screen-readers would be appropriate, yes.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[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.


3,798 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 FutureQuest]