30 Aug, 2012, arendjr wrote in the 1st comment:
Votes: 0
Hey all,

While working on my own MUD game, I came to realize it would be a really great advantage if builders would have a graphical map and interface to aid in building, as well as being able to view statistics.

Let me clarify through these two use cases:

- For example, I want to create a road. Rather than typing repeated commands for adding rooms and setting the descriptions, I would like to click a few times in the direction of the road. Rooms would be created with the name and description of the start of the road copied.

- I want to see which parts of my map are most actively visited. Or which rooms cause most player deaths, or in which rooms players most commonly are when they quit. Such statistics could be tremendously helpful for improving the game world to be more friendly to newcomers, or to detect excessively hard areas, for example. Preferably, this information could be presented in a map similar as the one used for editing, but using color codings to identify hotspots, for example.

I already found the MUD Map Designer: http://realmsofkaos.net/forum/viewtopic....
I think this client is a good example for the clearity of a good map. A map like this would lend itself well to color coding, and it's easy to imagine how editing controls could be added.

Unfortunately, for my own project I have a very hard requirement that such a tool would be webbased, so the above client doesn't fit my needs. As far as I am aware, there's nothing webbased out there yet that comes even close to this. Please correct me if I'm wrong here :)

Now, I could try to build something like this myself, but it would take away time from building the core of my game engine, so I want to try to cut corners. If anyone is willing to build something like I am suggesting, I am willing to sponsor him or her by donating EUR 500,- to him/her.

In order to qualify, you will need to follow these requirements:

- The solution should be written in JavaScript, follow HTML5 standards, and work in recent standard-compliant browsers (Chrome, Firefox, Safari). Internet Explorer would be nice to have, but is not required. Reliance on extra plugins (Flash, Java) is out of the question. If possible in the slightest, I would prefer to not depend on additional JavaScript libraries like jQuery either. But if you pull in a lightweight library to work with the canvas element elegantly for example, that's fine.

- The solution should present a map within the browser (I would suggest using an HTML5 canvas element, but other solutions may apply too). Your solution should be able to generate the map on the fly, which means my engine is not going to give you instructions on which coordinates to draw what. You will simply get a list of rooms, with their exits, and that's it. Not even all exits will specify a direction. Writing a proper algorithm to generate the map will probably be the toughest part of the solution, so please pay proper attention to it.

- The solution should be flexible enough that it can update its views depending on different data sources. For example, once you have generated the map, I may want to feed it with statistical data about number of player visits per room, and the view of the map should reflect that. From there, I may want to switch back to edit mode, so the view may need to be updated accordingly.

- I encourage anyone building this to also build in flexibility to have different sources from which you can generate the actual map. That should allow the tool to become useful to other MUDs as well. That said, I only really need it to work with my engine, and that's what I will judge it on. To work with my engine, you will need to query for the necessary data over a WebSockets connection. If you need specific server-side support to get the necessary data, I can help with that.

- Your solution should be licensed under a BSD license. You don't need to assign me copyright, and you are free to use the code in any other way you like as well, but once delivered I want to use it however I like as well.

You can find my engine here: https://github.com/arendjr/PlainText

If you have any other questions, or are just interested in working on this, please let me know! I'll be happy to get anyone interested up to speed.

30 Aug, 2012, Runter wrote in the 2nd comment:
Votes: 0
I might be interested. I'll see what work is coming up for me and if I'll have free time available.
30 Aug, 2012, arendjr wrote in the 3rd comment:
Votes: 0
@Runter: Cool! Let me know if you have time!

Btw, there's some more discussion going on here: http://www.mudconnect.com/discuss/discus...

30 Aug, 2012, Idealiad wrote in the 4th comment:
Votes: 0
It would be extra cool if multiple people could share a map view. So while Bob is building out a road, he'll see on his map Sue building the forest to the south.
31 Aug, 2012, quixadhal wrote in the 5th comment:
Votes: 0
You might want to glance at CoffeeMUD's building system for some ideas too. It seems to be pretty full-featured.
25 Sep, 2012, arendjr wrote in the 6th comment:
Votes: 0
Just a little message to inform that the bounty is closed.

I did find a student who was willing to implement the feature, but eventually couldn't due to time constraints. Nevertheless, we exchanged some ideas and requirements which did help to get my mind set to building the mapping algorithm on my own.

If anyone is curious about the final solution, I can do a small write-up about that.

Arend jr.
25 Sep, 2012, Davion wrote in the 7th comment:
Votes: 0
arendjr said:
If anyone is curious about the final solution, I can do a small write-up about that.

Leaving us hanging is just cruel :). I'd love to hear it!
25 Sep, 2012, arendjr wrote in the 8th comment:
Votes: 0
Alrighty, here comes :)

The solution I created was written during some spare time past weekend and yesterday evening. I consider it a start rather than a destination.

As stated in the requirements, the solution is written in pure JavaScript and uses the HTML5 canvas element through KineticJS. Here is what it does:
* Generates a map on the fly from a list of areas (rooms) and exits.
* Areas don't need to have x and y coordinates; they will be determined automatically.
* Exits can be directional (north, southwest, …) which will be obeyed, but don't need be (in which case the algorithm may plot the adjacent area to any free corner).
* The resulting map doesn't need to be consistent; the algorithm will attempt to resolve this itself.
* I can edit area names and descriptions right from the map. Adding areas and modifying exits is under construction.
* Various statistical data can be plotted on the map.

It also has some limitations:
* No area may have more than 8 exits.
* No 2 adjacent areas may be more than 3 rows or columns apart. This is purely an implementation limitation though.
* It works for my demo world (about 50 areas), and should work with bigger worlds though, but I have not done any performance testing on that yet.
* The code is currently highly integrated into my own MUD web frontend. If someone wants to make it more reuable, just contact me.

Here are some screenshots of my work so far (please bear in mind I have only focused on functionality, not yet on styling)…

The MUD itself:

The map:

The map with stats of most visited areas:

Editing an area description:

Not mapping related, editing the JavaScript of an NPC trigger:

Link to the project page: https://github.com/arendjr/PlainText

Arend jr.
25 Sep, 2012, plamzi wrote in the 9th comment:
Votes: 0
What about one way links, as in A connects to B but B doesn't link back to A? And how about "simple overlaps" such as, A - west - B - east - C? And what about links like: A - west - B - west - A? I'm not even going to mention any of the more complicated stuff that can happen across more than 3 non-logically linked rooms…

I'm just curious if your algorithm supports something that hasn't been supported before, especially since you started out with some pretty complicated requirements. Or did you decide (like many folks did before you) to simplify?
25 Sep, 2012, arendjr wrote in the 10th comment:
Votes: 0
Hey plamzi,

I definitely still want to do one way links. Shouldn't be too difficult to represent either (just an arrow). But I have to admit none of the special cases you mention are currently implemented. So yes, I took the simplification route.

Arend jr.
25 Sep, 2012, Idealiad wrote in the 11th comment:
Votes: 0
plamzi said:
And how about "simple overlaps" such as, A - west - B - east - C? And what about links like: A - west - B - west - A?

Could you draw these out? I'm reading them as,

simple overlap:

A <-west– B –east-> C

Which looks like a normal room layout to me, and

A <-west– B
A <-west– B

Which doesn't make sense either. Do you mean two west exits from B to A? I guess it's possible but in mud terms no one would ever build like that.
25 Sep, 2012, Davion wrote in the 12th comment:
Votes: 0
I believe, Idealiad

such as, A - west - B - east - C?

A -> west -> B
C <- East <-

A - west - B - west - A?

would be
A < - West <- B <- West <- A