Mapper thoughts

Posted by Victorious on Mon 14 Aug 2017 04:14 AM — 5 posts, 22,320 views.

#0
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.
USA Global Moderator #1
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.
Amended on Mon 14 Aug 2017 12:58 PM by Fiendish
#2
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.
Amended on Mon 14 Aug 2017 04:33 PM by Victorious
Australia Forum Administrator #3
I like the idea of doing layer 2. Using the SQLite3 database system you could make a pretty generic layer there.
#4
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.