Saturday, 19 November 2011

GUI snippet version 6

Version 6 is now available from MudBytes, and contains the following minor changes:

  • Removed a stray semicolon.

The "if ( !pProtocol->bMSDP );" statement had a semicolon at the end, which should be removed.  This bug has very little impact, as MSDP already overrides ATCP, but it does mean that if the user's client supports both MSDP and ATCP, they will be sent the SERVER_ID variable twice.

  • Made it easier to add MCCP support.

Quite a few muds already support MCCP, and had trouble getting it working with the snippet - particularly if they were using copyover as well.  So I've improved the documentation and made it easier to integrate.

  • Made several minor updates to the installation instructions.

The INSTALL_MERC.TXT had actually been written for GodWars rather than Merc, and relied on a couple of GodWars-specific changes.  It's been updated to work with both, and now also defines MSDP_CLASS.  The INSTALL_TBA.TXT instructions now define MSDP_CLASS as well.

  • Added an INSTALL_ROM.TXT.

Although the ROM instructions are very similar to Merc, there are a few minor differences, and someone had trouble adding it to their ROM derivative.  So I added another set of installation instructions.

Thursday, 13 October 2011

GUI snippet version 5

Version 4 was just a tiny update to fix a memory allocation problem, but this version has more changes.

While helping Splork get the snippet working in SlothMUD, we came across an interesting problem - it seems that the MXP specification doesn't actually define whether the server should initiate negotiation with IAC WILL MXP or IAC DO MXP. While some clients therefore support both, others support only one or the other. I've therefore updated the snippet to support both (it attempts one if the other fails).

There was also a complaint from another user about the MSSP table being cumbersome to update for non-static fields such as players and uptime. I've therefore changed the table to use function pointers, which should make it much easier to update in future.

Scandum also asked me to change LIST to use an array, as per the latest specification, which I've done.

Other than that there were a couple of bugfixes, but nothing serious. Here's the list of changes:
  • Added symbolic constants for MSDP_TABLE_OPEN/CLOSE and MSDP_ARRAY_OPEN/CLOSE.
  • MSDPSetArray() was using table values rather than the array values. Fixed.
  • Added MSDPSendList(), used for the MSDP LIST command (updated to an array in the spec).
  • Doubled MAX_VARIABLE_LENGTH for the list variables.
  • Some of the LISTs had no separators between values when sent using ATCP. Fixed.
  • The MSSP table now uses function pointers, making it easier to update dynamic fields.
  • Added support for both variants of MXP negotiation.
As usual it can downloaded from the GW2 website:

Or from the MudBytes code repository:

Sunday, 28 August 2011

GUI snippet version 3

There was a small update to the snippet on 13th June, to fix a cyclic TTYPE issue, add some extra MSSP variables, and add support for broken packets.  But this update (version 3) is somewhat bigger, primarily due to some changes that were made to the MSDP specification since the snippet was released:

  • Added an AllocString() wrapper function, as strdup() isn't standard C.
  • Added support for the new MSDP tables and arrays.
  • Added support for the new UNREPORT and RESET MSDP commands.
  • Added a new REPORTED_VARIABLES list, as described in the latest MSDP spec.
  • Renamed VARIABLES to SENDABLE_VARIABLES as described in the latest MDSP spec.
  • Cleaned up the code, adding consts and fixing -ansi and -pedantic warnings.
  • Added support for the new Mudlet GUI autoinstaller.
  • Added an MCCP flag to make integration with the snippet easier.
  • Updated CopyoverGet() and CopyoverSet() to include TTYPE, MCCP and CHARSET.
  • Added an MSDPFlush() function for variables that need to be sent immediately.
  • ProtocolOutput() now lets you send tabs.
  • The snippet now recognises that DecafMUD supports 256 colours.
  • Updated the TBA instructions with a fix for strfrmt().
  • Updated the Merc, SMAUG and TBA instructions to use MSDP tables.

You can download it from here:

If you're already using the snippet, the README.TXT has some information about updating.

The generic plugin has also been updated:

The plugin doesn't handle fully nested data, but it does handle basic tables and arrays, as used in the installation instructions.

Thursday, 18 August 2011

4 Dimensions themed GUI

I've recently been helping 4 Dimensions get my protocol snippet working, and I decided to put together a simple Mudlet GUI to show it in action (and also because I wanted to test out the Mudlet autoinstaller on another mud).  As you can see, the layout is based on the God Wars II GUI, although I've replaced the graphics, recoloured the energy bars (to match 4D's prompt colours), and dropped the second map and bottom-left icons:

(click image to enlarge)

4 Dimensions already has a 'map' command that draws an ASCII map, so it was fairly straightforward to add the same data to an MSDP variable whenever the player changes room, and then I just threw together some basic graphical tiles for the client using Paint.

I decided to put together a MUSHclient version as well, and added some textured background and border graphics to make it feel a little less plain:

(click image to enlarge)

There's no information about your enemy, the spell icons are currently all the same, the avatar is fixed, and (as I recently discovered) there's an important 'stamina' value which will need a bar of its own.  But these were never intended to be final versions, just a way to demonstrate the protocol snippet, and an example of what you can throw together in an afternoon.

Sunday, 14 August 2011

GamingHUD interview

I was recently interviewed by Dean of GamingHUD, where I took the opportunity to share my views on the state of MUDs, and where I see them going in the future.  You can read the interview here:

GamingHUD covers mainstream video games as well as MUDs, so I'm hoping it may draw some attention from outside of the MUD community.

Saturday, 30 July 2011

Customising icons

I'm not very artistic, but fortunately there are plenty of people out there who are, and some of them are happy to offer their work for free.  Grulk recently pointed out a free album of icons that someone had created for use in games, and I think they would be superb for mud GUIs.

You can view and download them from here:

They're initially black and white, but the idea is you can customise them to your theme (the top six images on the above link serve as examples of what you might do with them).

If you don't have Photoshop, there are other ways to customise images.  One tool that I occasionally use is the MyTheme Online Photo Editor.  It can be a bit annoying at times, but it's free and it gets the job done.

For example, supposing I want to create an icon for a magical hammer.  First I copy a base icon (from the album mentioned above), then I invert the colours and save it:

Next I open the Photo Editor, click "Browse...", enter the file name, then click "Upload now!".  Then I click "Effects" and select "Lightning Effect", and it generates a new icon.  You can do other effects as well, including blending it with your own backgrounds:

There are now at least 17 muds supporting MSDP, 15 of them using my snippet, so I'm hoping we'll soon see more mud developers taking an interest in designing their own GUIs.  Perhaps we could even create a shared repository of free base images - they're simple enough to flip, rotate and resize, and with custom backgrounds as well you can easily use the same base graphics for multiple GUIs without them looking like clones of each other.

While I'm posting anyway, here are a couple more screenshots - as you can see, I'm now using unicode (via UTF-8) for gender symbols and linedraw characters:

(click image to enlarge)

(click image to enlarge)

Atlantis and BlowTorch also support UTF-8, although the CHARSET negotiation doesn't seem to have been added to BlowTorch yet.  I'm still trying to decide how best to use unicode - I've even toyed with the idea of creating a custom mud font (other muds have created their own fonts before, but I don't think anyone has created a unicode mud font before).

In other news, the latest version of Mudlet now has an autoinstaller which automatically downloads and installs my GUI when the player first connects (through ATCP, so everyone using my snippet can now use the autoinstaller for their own muds as well).  This is obviously much more convenient than doing everything manually - even with clear installation instructions, I frequently have to spend time helping players get the MUSHclient plugin working, and sometimes they just give up.

Friday, 1 April 2011

GUI snippet released

After some more testing and refinement, I've decided my snippet is ready to be released into the wild.  I really need to get back to working on God Wars II anyway.

Tijer's mud, the Realm of War, is already using the snippet - so I decided to create a quick and simple demo GUI for it, by adapting the plugin I'd created for Realms of Despair:

(click image to enlarge)

I also spent a few minutes creating another version to release with the snippet:

(click image to enlarge)

You can download the snippet from here:

And the plugin from here:

Sunday, 20 March 2011

Realms of Despair themed GUI

After another three weeks of working on my snippet, it's finally complete - and it includes a lot more than just MSDP.  Tijer and Squiggle have been testing it on Realm of War (a GodWars mud), and have already helped me resolve a few issues, but it should really undergo further testing before being publically released.

I decided to create a demo GUI for Realms of Despair to show off the features, as I'm hoping they'll join the MSDP bandwagon.  It would be a huge boon for the protocol to get the backing of such a major mud, and might encourage more client developers to add support.

(click image to enlarge)

4Dimensions have also expressed an interest, as have a handful of other muds, so perhaps we'll see more GUIs in the near future!

Monday, 28 February 2011

Mudlet GUI: 28-Feb-2011

After several more hours playing with the links, and no progress to show for it, I decided to cut my losses and give up.  They work well enough for creatures and equipment, so I'll just disable the other links and wait until Mudlet adds proper MXP support.  I've too many other things that need doing, and progress on the mud is starting to lag behind, so I really can't justify any more time tinkering just add links to the help files.

On the GUI front, I've enlarged the font on the blur, adrenaline and movement icons, to bring them more in line with the MUSHclient plugin.  I've also got the movement icon correctly changing the colour of the text label based on the the movement type (walk, jog, run, etc).

I also discovered a minor bug, with the map using the yellow dot instead of the blue dot for other players - that's been fixed.

Finally, you can now target things by clicking on their miniavatar.

(click image to enlarge)

I've also been working on my MSDP snippet - I've got it communicating with the client, now I'm working on the variable table.  It should only send variables when they change, so each player needs a table that can hold multiple variable types.  This was much easier in C++, but most muds are written in C, and I want something that can be widely used.

Friday, 25 February 2011

Mudlet GUI: 25-Feb-2011

Following suggestions from Vadi and Heiko, I was able to get the moon icon to correctly rise and set behind the map.  After doing that I decided to shift most of the label creation into the onConnect() function, to tidy it up a bit.

The links still aren't quite working if there are two on the same line - but at least now the first is correctly displayed:

(click image to enlarge)

Wednesday, 23 February 2011

Mudlet GUI: 23-Feb-2011

The map borders are now separate images that are drawn onto the background, as is the sunrise image (the trail that the sun/moon follows).

I've added the sun/moon icon above the maps, along with the current time.  There's still a slight problem with the sun/moon being drawn over the map when it rises and sets, I need to find some way to draw it behind instead (so that it appears to rise up from under the map, and set back down below the map).

(click image to enlarge)

Saturday, 19 February 2011

Mudlet GUI: 20-Feb-2011

I've now added the proper colours for the health, mana and primal energy bars:

(click image to enlarge)

I also moved the initial GUI setup into an onConnect() function, and done some more work on avatars.

Friday, 18 February 2011

Mudlet GUI: 19-Feb-2011

After a lot of messing around I managed to create a new SEND format that includes RGB colours - although it doesn't yet work properly for XTerm 256 colours, it does at least work with regular ANSI:

(click image to enlarge)

Note that the foreground colours are used for rare, uncommon, common, epic and mundane, while the background colours are used for artifact, relic, mythical, legendary and magical.  The default background colours are all "none", as I don't personally like having text with background colours, but from a functional perspective it could be very useful for players who (for example) are only interested in collecting rare artifacts, etc.

You can see a little white label at the bottom of the text window containing the text "look collar".  That's actually the mouseover message - my mouse pointer doesn't show up in the screenshot, but that's what you get when you hover over a link.

Mudlet GUI: 18-Feb-2011

Mudlet doesn't support MXP, but it does allow you to turn text into clickable links.  With a lot from help from Vadi, last night I managed to simulate MXP links.  I actually send the data in a slightly different format for Mudlet, to make it easier to parse, but the results are much the same:

(click image to enlarge)

The underlined text is all clickable, and you can hover over it with the mouse to see what happens when you click.

I'm still having a couple of problems though - the first is the colouring (which is stripped), and the second is the link extending beyond the highlighted text.  If these can be resolved, Mudlet will be able to take full advantage of my mud's MXP features.

On another note, I managed to get the function keys working.

Wednesday, 16 February 2011

Mudlet GUI: 17-Feb-2011

I've been busy working on the mud recently, but as the Mudlet GUI is so close to completion I thought I'd put some more effort into it.  I've now got the hotkey buttons along the top working - at least as clickable buttons.  I'm still trying to work out how to use keybindings for the function keys.

(click image to enlarge)

Monday, 7 February 2011

Mudlet GUI: 07-Feb-2011

Thanks to both Vadi and Oneymus, I was able to resolve the issue with the miniavatar gauges.

I've now added the four icons below the target avatar (in the bottom left), which were previously just part of the background image, and have adjusted the labels on the spell icons.  Rather than repeating the same code over and over for drawing black outlines around the text labels on the icons and bars, I created a generic outline_text() function.

I also took the opportunity to clear the avatars, icons and energy bars from the static background image, now that they're all drawn properly.  I had forgotten the frames for the avatars, so I added those while I was at it.  Thus when you start up Mudlet you get this:

(click image to enlarge)

And when you're connected you get this:

(click image to enlarge)

I still need to add the hotkeys at the top and the sun/moon icon (and time) above the maps, as well as the mouseover and clickable stuff, but it's nearly there.

Sunday, 6 February 2011

Mudlet GUI: 06-Feb-2011

As Mudlet doesn't support MSP, I've added sound triggers to the MSDP package for my psuedo-ATCP.  It generally works, although as far as I can tell Mudlet doesn't support playing multiple sounds simultaneously.  This means that combat sounds tend to cut off the (longer) weather and terrain sounds.

I've also added the target avatar and associated health bar in the bottom left, although the icons below it still need their text labels.

Finally, I've added energy bars below the miniavatars on the right (below the two maps), and here I've run into a problem - it seems that while hideWindow() hides labels, when used on a gauge it instead displays it as if it were empty:

(click image to enlarge)

Hopefully I'll be able to find a workaround for this - perhaps by shrinking them, or moving them behind something else.

Wednesday, 2 February 2011

Mudlet GUI: 2-Feb-2011

I've not worked on the GUI for a while, but decided to do a bit more on it tonight.  I resized the regular avatars so that they're all 64x64, and now display the PC's avatar in the top left corner.  I then added the spell icons underneath, although they don't have the pie-shaped timer like they do in the MUSHclient version:

(click image to enlarge)

I also went through the script and made sure all the files were loaded from relative paths.

The primal energy bar at the bottom is something I started working on previously (after posting the last report) but didn't finish - it doesn't yet differentiate between safe and regular primal.

Monday, 24 January 2011

Mudlet GUI: 24-Jan-2011

Redid the health, mana and actions energy bars (below the text window) to use the same style as the MUSHclient plugin, using a stylesheet to create the gradients - very different to the way I did it before.  The text labels had to be drawn on top manually, as they were too small for the built-in gauge labels, and the black outlines (to make the text clearer to read) also had to be done manually.  I had to specify each colour for the gradients, so after doing green I just shuffled the RGB values around to speed it up - at some point I'll go over it properly and get the slightly brighter red for health and the blue-purple for mana.

(click image to enlarge)

The primal bar (the long one at the very bottom) is going to be a bit more tricky, as it's a two-step energy bar - it uses gold and silver to distinguish between safe and regular primal.

Mudlet GUI: 23-Jan-2011

I discovered the problem with transparency - I was so busy checking all the properties that I didn't actually check whether the image itself actually had a transparent background.  In MUSHclient it's handled automatically with a flag, and it's been that way so long I didn't really think about it.

Anyway, I grabbed a tool called TransparentPNG and converted the images, and it worked like a charm.

I also created another set of smaller avatars. It'll mean a larger download, but not excessively so, and there's no other alternative if I want to offer a similar interface to the MUSHclient plugin.

For the circle on the top map, and the dots on the bottom map, I created a new "shapes" folder and just added some pngs with transparent backgrounds.

So now the map looks like this:

(click image to enlarge)

Or if you're in a dungeon, like this:

(click image to enlarge)

You can't click on the map or miniavatars yet, but at least they update in real-time as you move around.  There's still quite a lot to add, but it's coming together.

I've also managed to get sound working, so I'll integrate that into the script as well to take advantage of the soundpack.

Friday, 21 January 2011

Mudlet GUI: 21-Jan-2011

In MUSHclient I draw a textured background image, then set the size of the text window and draw a black background behind it.  I couldn't get this approach to work for Mudlet, as it would always cover the text, so instead I tried something else...something really fast and dirty.

I took a screenshot of the MUSHclient plugin and chopped it up into four sections - top, bottom, left and right.  I then got Mudlet to draw the four images, and set the borders for the text so that the text window is in the middle of the display - like this:

(click image to enlarge)

It now looks quite a bit like my MUSHclient plugin, but it's just a static image.  I rather like having the scrollbar on the right side of the text window, too - it happened automatically, while doing the same thing in MUSHclient would require quite a bit of work.

Anyway, I decided to try just drawing the maps over the top of the interface, as I figured it would at least save me the hassle of trying to align up all those borders again.  Here we go:

(click image to enlarge)

There are some problems though:

1. The buildings on the zoomed (lower) map are supposed to have a transparent background.  That's how my MUSHclient plugin does it, but I've not yet worked out how to do that in Mudlet, so for now it's displaying a white background behind each building.  I've been assured it can be done though, so it's just a matter of fiddling around a bit.

2. The avatars are supposed to be resized as needed - they're 28x28 when displayed under the zoomed map, but 64x64 when displayed on the left as your target.  Some of the avatar images have also been saved as different sizes.  In MUSHclient this doesn't matter, as it resizes it on the fly, but this isn't yet possible in Mudlet.  If you look at the avatars under the zoomed map, you'll see that they're actually just showing the top-left corner of the avatar.  It looks like I'll have to provide a second set of avatars.

3. Mudlet doesn't yet allow you to draw shapes, so there's no circle on the top map and no creature dots on the zoomed map.  I suspect this'll have to be done with labels.

Mudlet GUI: 20-Jan-2011

Last night I decided to have another play with Mudlet, and it was a lot easier than I remembered.  I was mostly doing it because I wanted to try out the latest version of Mudlet, and figured it would be a good time to check if ATCP was still working - lucky I did, as it seems I missed a couple of things when I rewrote my negotiation code.  So I fixed my ATCP implementation and created an energy bar script to test it, using Vadi's fancy gauge stylesheet to make the bars look prettier.

(click image to enlarge)

I'm not sure I want to spend the time creating a full GUI like my MUSHclient one, but I may see if I can polish this a little - enough to hopefully get some GW2 players interested in creating their own.  At the very least I'd like to add an avatar and maps.

Disclaimer: My ATCP implementation only supports a single package - a custom MSDP package, which transmits the MSDP data using the ATCP format and telnet option.  I only added this for clients that support ATCP and not MSDP (primarily Mudlet, although the PHudBase client has the same issue).