Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ MUSHclient ➜ Plugins ➜ Mapper thoughts

Mapper thoughts

Posting of new messages is disabled at present.

Refresh page


Posted by Victorious   (89 posts)  Bio
Date Mon 14 Aug 2017 04:14 AM (UTC)
Message
Hi,

Just some thoughts after successfully implementing a mapper for a mud using the built-in mapper module.

1. Would anyone be interested in a "higher level" generic module/plugin? Most of the work involved was setting up aliases to do things like creating custom exits, querying the database etc, which is very reuseable across muds. E.g something like what mudlet has.
2. To resolve / figure out where we are if rooms dont send room numbers and if we walk down e.g streets with identical room descriptions, names and exits, we could use the previous room that the player was in and the walk direction as a fallback to hashing the other attributes to resolve conflicts. Anyone tried this approach before? I believe this is what Mudlet does.
Top

Posted by Fiendish   USA  (2,533 posts)  Bio   Global Moderator
Date Reply #1 on Mon 14 Aug 2017 12:57 PM (UTC)

Amended on Mon 14 Aug 2017 12:58 PM (UTC) by Fiendish

Message
I think that it will be hard to get a good answer to your question without going into a lot more detail about what you're adding and why.

For my part, I'm always interested in seeing what other people invent, but I foresee very little chance of desiring to convert the Aardwolf mapper plugin to whatever you create, because so much of it is my own code that the amount of work involved in the migration could be terrifying. I suppose this would be for someone trying to newly adapt a mapper for their mud, but then they need to understand what your idea would do for them.

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Victorious   (89 posts)  Bio
Date Reply #2 on Mon 14 Aug 2017 04:32 PM (UTC)

Amended on Mon 14 Aug 2017 04:33 PM (UTC) by Victorious

Message
Yeah, this is never intended to replace what someone already has, just to make implementing this easier for muds that don't already have them.

I'm not sure what the final form of this would be. I imagine 3 "layers":


  1. The foundational layer: primitives for computing paths, drawing etc, basically what the supplied mapper module does. Would like to take a look at the algorithm at some point and add the ability to assign weights.
  2. Higher level code for serialization to a database, adding areas, adding / updating room properties and querying rooms. These functions are provided by mudlet e.g, see the mapper functions section here https://wiki.mudlet.org/w/Manual:Lua_Functions#Mapper_Functions
    There's a neat ability to add arbitrary userdata to rooms/areas, then using that to store scripts to be executed to handle special exits as outlined in the higher level intro at https://wiki.mudlet.org/w/Manual:Mapper#Mapping_Special_Cases
  3. Finally, aliases and mud-specific stuff like getting room info. For my mapper, I used broadcasts from another plugin that captures this.


My idea was to implement layer 2 in a generic way, then have a sample plugin that does layer 3.

About using previous room info and walk direction as an identifier, the original inspiration was the mud having instanced areas. Unfortunately, room numbers change across instances of the same area, so this seemed the perfect solution to that problem, as well as resolving conflicts when you have identical rooms.
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #3 on Mon 14 Aug 2017 10:57 PM (UTC)
Message
I like the idea of doing layer 2. Using the SQLite3 database system you could make a pretty generic layer there.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Victorious   (89 posts)  Bio
Date Reply #4 on Tue 15 Aug 2017 08:52 AM (UTC)
Message
So probably the hardest part about it now is to define an API that makes sense, probably one modeled off the Mudlet one, at least for a start.
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.


16,367 views.

Posting of new messages is disabled at present.

Refresh page

Go to topic:           Search the forum


[Go to top] top

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