Neop / mudmap2

A mapping tool for text-based games, like text adventures, MUDs and MUSHs
42 stars 12 forks source link

Map import #41

Open MarkHesk opened 4 years ago

MarkHesk commented 4 years ago

Hey,

another suggestion. If more people want to work on the same world, it would be good to be able to import/export maps.

Thanks

Neop commented 4 years ago

This is a good idea, I'll see what I can do some time next week.

SlySven commented 4 years ago

I'm a major coder on a GPLed MUD client project Mudlet and I was wondering whether our map data is anything like your map data and whether import/export between the two is a viable prospect. I am not familiar with your Project so far (or Java) so I am at a bit of a disadvantage!

Our project currently does have a limited XML import capability ( https://wiki.mudlet.org/w/Standards:MMP ) and eventually I want to fully flesh that out so that a user can use the more verbose but human readable (and larger) XML file type to fully load a world's data in a file which can currently only be done via a binary format (which I have amended over the last six years!) At the same time it would need to also permit a full export of all the map data in the same XML format - that is something I still have to code.

Preliminary checking suggests that you only use a 2D model for your worlds - how does that work when many MUDs definitely have Up and Down directions as well? :stuck_out_tongue_winking_eye:

Neop commented 4 years ago

That sounds interesting. Does Mudlet create maps on the fly while playing or just display premade maps?

MUD Map uses a JSON based file format but I made the code extensible to read and export other file formats, as long as the general world structure can somehow be converted.

The world structure is like this: You got one world with one or more layers/maps (I did some renaming of terms a while ago, you might find both names). Each of those can contain several places that are laid out on a 2D grid. Paths are always exit to exit, but one exit can be marked as one-way-entrance. Besides that places can be connected by a parent-child relation, like when you enter a building, linking to a different map (but paths can go between maps as well).

If you want to go up or down (or any direction basically) you will either have to create the connected places somewhere else on the same map or on a different one. I can imagine converting your z-coordinate to numbered layers/maps, but I can't tell how usable that might be.

We might get into some problems with the differences in other data. Areas in your XML seem to be the same concept as areas/place groups in MUD Map. But I also use them for some background colors, which you got environments for, so we might get some issues distinguishing those two. One solution, though not a clean one, might be to just map the environments to my colored information rings.

I generally think it's possible to import/export your format from and to MUD Map with some workarounds for our different concepts.