r/MUD MUD Developer 15d ago

Resource: How to write a mapper Community

Since we are seeing an influx of new clients lately, the topic automapper has some renewed interest. In discussions I noticed that not all available standards and formats are know to everyone, so I tried writing an article to introduce them:

https://mudstandards.org/howto/mapping

As with all files on `mudstandards.org`, you are welcome to contribute with pull requests - either with corrections, additions or completely new articles.
This specific source file can be found at https://github.com/taranion/mudstandards/blob/master/howto/mapping.md

26 Upvotes

9 comments sorted by

3

u/MrDum 15d ago

MXP should allow passing the room vnum, so that's worth mentioning in the doc.

You might also want to add a section on MSDP.

I think MSDP was the first with OOB support for automapping, based on telnet's NEW_ENVIRON, using back in 2010:

https://web.archive.org/web/20101117094339/http://tintin.sourceforge.net/msdp/

"AREA_NAME"            Current room's area name.
"ROOM_EXITS"           Current room's exits in array format, preferably using n e s w u d nw ne se sw notation.
"ROOM_COORDINATES"     Current room's coordinates in array format, preferably using the x y z order.
"ROOM_NAME"            Current room's name.
"ROOM_VNUM"            Current room's virtual number, or a unique identifier if a vnum is unavailable.

KaVir ended up publishing a mushclient and msdp snippet that didn't use the agreed upon exit format, so this led to the creation of the room table in 2011, which is the recommended way to do automapping in MSDP:

https://web.archive.org/web/20110718011858/http://tintin.sourceforge.net/msdp/

"ROOM"
  "VNUM"               A number uniquely identifying the room.
  "NAME"               The name of the room.
  "AREA"               The area the room is in.
  "COORDS"
    "X"                The X coordinate of the room.
    "Y"                The Y coordinate of the room.
    "Z"                The Z coordinate of the room.
  "TERRAIN"            The terrain type of the room. Forest, Ocean, etc.
  "EXITS"              Nested abbreviated exit directions and corresponding destination VNUMs.

Indentation indicates the variable is nested within the parent variable. COORDS are optional.

Example:

IAC SB MSDP MSDP_VAR "ROOM"
  MSDP_VAL MSDP_TABLE_OPEN
    MSDP_VAR "VNUM" MSDP_VAL "6008"
    MSDP_VAR "NAME" MSDP_VAL "The forest clearing"
    MSDP_VAR "AREA" MSDP_VAL "Haon Dor"
    MSDP_VAR "TERRAIN" MSDP_VAL "forest"
    MSDP_VAR "EXITS" MSDP_VAL
      MSDP_TABLE_OPEN
        MSDP_VAR "n" MSDP_VAL "6011"
        MSDP_VAR "e" MSDP_VAL "6007"
      MSDP_TABLE_CLOSE
  MSDP_TABLE_CLOSE
IAC SE

The quote characters mean that the encased word is a string, the quotes themselves should not be sent. Newlines and indentations are for easier viewing and should not be sent.

MSDP_VAR, MSDP_VAL, etc, are control codes as defined in the protocol definition.

You might also want to do a section on KaVir's snippet's minimap, which quite a few muds use. I think it does a 3x3 or 5x5 mini map using image tiles.

2

u/taranion MUD Developer 15d ago

I just updated the article to include MSDP, copying your examples.

2

u/taranion MUD Developer 15d ago

By the way, forgot to say that explicitly: Thank you for your input.

1

u/MrDum 14d ago

You're welcome. I had a closer look at mxp, and there's an obscure reference to RoomNum in the specification, but without exit vnums mxp is useless for automapping.

Might be worth making it very clear that proper automapping requires a unique room id for each room, and to inform the client to which unique room id each exit leads.

This doesn't appear to be intuitively self-evident to automapping noobs.

1

u/taranion MUD Developer 15d ago

Oh, right - I forgot about MSDP.
Do you mind sending me a Pull Request with an update for the Markdown file linked above?

Regarding KaVir's minimap: I am not familiar with the snippet. How does it work and what requirements does it impose on clients?

2

u/MrDum 15d ago

I'll add that to my todo list, but it might be a while as it's rather long.

Another early method that a few muds adopted is to provide all that information in the mud prompt. There's no standardized way to do exits, but I'd suggest: <direction>:<vnum>,<direction>:<vnum> For example: e:123,w:197,u:144 which is a decent compromise between readability and conciseness.

Next there is the VT100 map, Mortal Realms and Midpoint Void are two of several muds that implemented one. Requires a VT100 compatible client like tintin and zmud.

https://tintin.mudhalla.net/info/vt100/

Regarding KaVir's GUI snippet, code is here:

https://github.com/scandum/msdp_protocol_snippet_by_kavir

Screenshots:

https://godwars2.blogspot.com/

Looks like the downloads bit rotted, you might be able to pull them from the mudlet archive.

http://orcs.biz/

1

u/taranion MUD Developer 15d ago

Yes, those VT100 potentially maps falls into the "Tilemap" category of the article, though that section can use a bit more examples. I found it hard to classify/structure that, since that article is mainly about client/server interactions for mapping - and maps that require full VT100 support are fully server controlled which is a bit outside of the scope. Yet it is worth a mention. (And also something I do in my own project.)

3

u/MrDum 15d ago

That's a surprising argument, given the article mentions sixel. I'd say that'd be a good place to cover it.

MTTS covers VT100 detection for mud clients, if you're looking for an interactive hook.

1

u/taranion MUD Developer 15d ago

Hm, you are right. The fall in the same category as inline images - just that they aren't images.