Where to start? I need a simple GMCP-based mapper...

All and any discussion and development of the Mudlet Mapper.
Post Reply
CurryMUD
Posts: 19
Joined: Sat Mar 26, 2016 3:53 am

Where to start? I need a simple GMCP-based mapper...

Post by CurryMUD »

Hello! I'm a MUD dev and I'd like a mapper script for my MUD. I'm wondering where to start. I don't think I need anything flashy or unusual.

My MUD is sending GMCP room info like this:

Code: Select all

Room.Info { "num": 10, "room name": "Basement", "room area": "Admin zone", 
"exits": { "n": 11, "ne": 50, "e": 59, "se": 102, "s": 103, "sw": 163, "w": 170, "nw": 176, "u": 6, "manhole": 187 } }
I do have up ("u") and down ("d") exits, as well as ad-hoc exit names like the "manhole" above.

Unfortunately I don't know Lua. Does there exist a generic script for simple mapping based on GMCP? Or should I dive in and try to write my own?

Thanks!

Jor'Mox
Posts: 1142
Joined: Wed Apr 03, 2013 2:19 am

Re: Where to start? I need a simple GMCP-based mapper...

Post by Jor'Mox »

Having all of that info would actually make a mapping script fairly easy to develop, but if you were to also provide room coordinates (which I realize are not something that you would just have laying around), it would make a mapper script almost trivial. But, if you don't want to add in coordinates, but want a fully automated mapper, then you either need room layouts that avoid overlap, or you need a rather more complicated script that can dynamically expand a map to keep rooms from being on top of each other.

Granted, I happen to have created a mapper script that doesn't have any of the advantages that you provide via GMCP, and it does what I describe above, along with all of the tricky things that come with only being able to work with room names and exits, so if you don't mind it taking a bit (I'm rather busy for the next few weeks), I may be able to whip something up. I have no experience with GMCP, so that side of things would need to come from someone else, but really that is a fairly minor part of things, since once the data is in a table, I don't need to know anything about GMCP to work with it.

CurryMUD
Posts: 19
Joined: Sat Mar 26, 2016 3:53 am

Re: Where to start? I need a simple GMCP-based mapper...

Post by CurryMUD »

Jor'Mox, thanks very much for your reply and for offering to help!

Actually, adding room coordinates won't be a big deal for me. I've been working on my MUD for over 3 years now, but I haven't developed much of the world content yet (I'm developing my MUD from scratch). I probably have less that 20 rooms. It won't be hard to change my room data so that it includes coordinates, and then to send those coordinates in GMCP. So I'm thinking that I'll try that.

It helps a lot to know that writing a Mudlet mapper script ought to be trivial at that point. I've been messing around a bit with Lua... Following the Mudlet mapper tutorials, I was able to grab the GMCP data and add a single room to a new map. If I can figure out how to connect the rooms with lines on the map, I'll probably be good to go. I'll ask again on the forum if I have any questions.
Thanks again!

Jor'Mox
Posts: 1142
Joined: Wed Apr 03, 2013 2:19 am

Re: Where to start? I need a simple GMCP-based mapper...

Post by Jor'Mox »

To draw in the connecting lines, you just need to have the two rooms already in existence, and then use the setExit function (syntax: setExit(from roomID, to roomID, direction) ).

CurryMUD
Posts: 19
Joined: Sat Mar 26, 2016 3:53 am

Re: Where to start? I need a simple GMCP-based mapper...

Post by CurryMUD »

Awesome! I'll try it out.

User avatar
SlySven
Posts: 1019
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Where to start? I need a simple GMCP-based mapper...

Post by SlySven »

Actually when you are creating the MUD content actually having the rooms in a logically consistent relationship can help users greatly when they explore your creation and enhance the sense of being "in" your world. Of course the odd counter-intuitive twist in the geometry can be used sparingly for some "features". Just for the record, make sure you have something to handle the Telnet TTYPE sub-option (24) most recent Mudlet would report something that you can use to tell your Server that it IS talking to a Mudlet client - but try to make sure that the Server still works for a "dumb" or unrecognised client...!

You might also consider making a skeleton map available as an Xml File to download from your Server - handling this is hardcoded into Mudlet for I.R.E. MUDs already but it only works (to show a "download" map button on the settings screen) for them. However we recently added code that allows manual download of files from https: as well as http: Servers (though the needed OpenSSL libraries for the former may not always be on all Windows systems if they have hand built binaries) AND it is now possible in versions sometime after the release of 3.0.0. preview "epsilon" to use the loadMap(filename) command to parse an Xml file that conforms to the format that IRE uses - to get a copy of one of these use the url: "https://<IRE MUD name>.com/maps/map.xml" where <IRE MUD name> is one of:
  • achaea
  • aetolia
  • imperian
  • lusternia
and take a look in a text editor...!

Post Reply