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).