[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 thoughts
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Mapper thoughts

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 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.
[Go to top] top

Posted by Fiendish   USA  (1,641 posts)  [Biography] 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
[Go to top] top

Posted by Victorious   (85 posts)  [Biography] 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.
[Go to top] top

Posted by Nick Gammon   Australia  (21,324 posts)  [Biography] 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
[Go to top] top

Posted by Victorious   (85 posts)  [Biography] 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.
[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.


1,145 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]