Top Mud Sites Forum

Top Mud Sites Forum (http://www.topmudsites.com/forums/index.php)
-   MUD Coding (http://www.topmudsites.com/forums/forumdisplay.php?f=9)
-   -   GUI snippet (http://www.topmudsites.com/forums/showthread.php?t=6418)

KaVir 04-01-2011 05:36 AM

GUI snippet
 
I've been working on improving the interface for God Wars II for nearly a year now, making it easier to navigate through a mixture of graphics, sound, and enhancements to the text. The following screenshots demonstrate my GUI using MUSHclient and Mudlet:
For the past few weeks I've been working on a snippet that adds the same feature support to other muds, and it's now pretty much complete. The snippet is relatively self-contained, and is designed to be easy to install and easy to use - I've added it to a few codebases already, and it generally takes me around 5-10 minutes (at least once I've worked out where the hooks need to go).

The underlying concept isn't new - muds like BatMUD, Maiden Desmodus, Primordiax, Archons of Avenshar, etc, have been offering graphical interfaces for a while. But those are handled through private clients and closed protocols. What makes this different is that it operates on existing open source clients, using an open protocol (MSDP) that allows owners and players alike to quickly and easily design custom GUIs for their favourite muds. You can see some of the interfaces my players have created for MUSHclient and TinTin++ , and .

A handful of other muds have also made progress in this direction - for example the Aardwolf MUSHclient plugin and the IRE Mudlet interface both work in a similar way. But implementing full server-side support is a non-trivial job, and many mud owners still view graphical interfaces as some sort of mysterious black magic that requires a huge investment of time and skill. While it's certainly possible to invest a lot of time into GUI work, even a simple interface can be a huge improvement, and it's something that can be achieved extremely quickly.

Here are a couple of simple proof-of-concept "themed" demo GUIs I created for other muds - they took me about 1-2 hours each:
Here's a slightly more fleshed-out GUI I created and then adapted - it took around 2-3 hours of tweaking to create the first one, the other two took only a few minutes each once I'd found suitable images:
In layman's terms, the snippet provides the following features:
In more technical terms, it adds support for TTYPE, NAWS, MSDP, ATCP, MSSP, MSP and MXP, as well as UTF-8 (using CHARSET) and XTerm 256 colors. The plugin is a Lua script bundled with some public domain images to get you started.

The Realm of War has already installed the snippet, while several other muds are currently in the process of adapting it to their needs, including Realms of Despair, SlothMUD and 4Dimensions.

If you're interested in using it as well, or just want to read more, you can . Even if you hate graphics, you may still find some of the other features useful.

melopene 04-01-2011 05:18 PM

Re: GUI snippet
 
KaVir, I could so kiss you right now. This is something I've been wanting to see available for the non-commercial muds for at least 10 years. I am definitely putting this as a major point on my to-do list.

lothoemas 04-01-2011 05:40 PM

Re: GUI snippet
 
KaViR, this snippet is amazing. I got it working on our development port within about 15 minutes and haven't been able to stop myself from messing around with it since. I've been following your thread over on MudBytes and had been hoping that you would eventually release something like this. If you are interested I can keep you up to date on how we end up using this on Ansalon.

KaVir 04-01-2011 06:36 PM

Re: GUI snippet
 
Glad to hear people are finding it useful. I'd definitely be interested to see what you do with it - perhaps you could even post some screenshots once you've got a GUI?

Threshold 04-02-2011 02:25 AM

Re: GUI snippet
 
Wow. This is really awesome stuff.

Just from the screenshots and the description it sounds great.

jcp80212 04-02-2011 02:40 AM

Re: GUI snippet
 
Just wondering is it still possible to extract data from the incoming stream ie my game has a hp ticker would it be possible to make that into a hp graphic bar.

KaVir 04-02-2011 06:21 AM

Re: GUI snippet
 
Yes, you could also extract the data from the in-band stream using a regular expression. For example you could use the hp from your prompt to draw the energy bar, but that means that (1) you'd need to have a specific prompt pattern which included your hp, and (2) the energy bar would only update when you received a new prompt.

However the snippet uses MSDP to transmit the data out-of-band. That means you don't need to capture anything from the in-band stream - you can literally sit there with a static text window and watch your energy bars slowly refill, or watch the landscape scrolling past as you walk across the map, etc.

jcp80212 04-02-2011 07:29 AM

Re: GUI snippet
 
That's awesome the way I have seen muds do graphics is using specific lines on text which the client reads and then never outputs that line to the output window which is what I've been attempting to do but have failed so far I'll definitely check out this and see if it will fit in with my plans I'll post up some screen shots if I get it implemented.

KaVir 04-02-2011 08:45 AM

Re: GUI snippet
 
Well you can gag the text, but you'll still get blank lines in most clients. In my mud you regenerate every second, so handling that in-band would be really spammy - it'd be like hitting enter once per second.

The only way you can really avoid that without going out-of-band is to send the data with something that should be displayed, like your prompt (this is also how MXP handles it). But then you've got the problem that the energy bars won't refresh unless the text window updates, and that feels pretty clunky - particularly when you're regenerating every second, and are waiting for your energy bars to refill before you carry on exploring an area.

This is an issue I struggled with for a while before settling on MSDP - if you're interested. The snippet (which took lothoemas 15 minutes to add to Ansalon) allows other muds to use the same features I've spent the last year working on.

plamzi 04-02-2011 10:31 AM

Re: GUI snippet
 
Great post, KaVir, and thanks for sharing. Enhancing the player experience is my #1 priority and I'll be looking to use your snippet as a building block--one thing my server is missing is support for advanced desktop clients.

Just wanted to add a few more resources to the mix. If you're someone who is comfortable with HTML + JavaScript + PHP and who wants to extend the reach of your MUD to Facebook, or the web in general, with a custom web client for your game, take a look at these links:






(no login required, use IE9 or non-IE browser)

The app has the embedded automapper + a minimap, and the page code contains reusable functions for handling controls, etc. Feel free to rip the JS / HTML code from the Facebook app page as needed. Just plug your own art.

My FB app targets the non-mudder who wants to discover a new and more challenging game. While it doesn't have too many power user features, it supports such "pretty" stuff as player avatars with changing states, transparent overlay map, etc.

In my case, the server drives the app and minimap without using standard protocols, but you can easily change that. If you decide to give it a shot and need code snippets showing how the server feeds the app in my implementation, let me know.

melopene 04-02-2011 04:00 PM

Re: GUI snippet
 
I actually had a thought last night - how well will this scale to screens of various size and resolution? There's a big difference between my 22" widescreen on my desktop and the 10.1" netbook (which I don't typically MUD on because of screen size - in a busy room, just 'look' can fill my full screen). Will text size and the background graphics scale well, or will it create even more of a problem on the tiny screens?

KaVir 04-02-2011 05:43 PM

Re: GUI snippet
 
That's entirely up to the client and/or plugin. A small degree of scaling is quite easy to handle - for example my MUSHclient GUI shrinks and stretches the text window and energy bars to fit the screen. But resizing bitmaps (particularly small icons) can degrade their quality.

scandum 04-03-2011 12:55 AM

Re: GUI snippet
 
I've linked your snippet from the and specification pages.

The snippet doesn't have a name (that I can find) so I named it Kavir's MUD Protocol Handler, is that alright?

KaVir 04-03-2011 06:54 AM

Re: GUI snippet
 
Excellent, thanks. You may want to link to the copy in the instead though, it's a more "neutral" download location.

Sure. I didn't really name it.

scandum 04-03-2011 11:21 AM

Re: GUI snippet
 
I'll link MudBytes instead. Another issue I noticed the other night is that Realm of War's current MSSP initialization is rather poor.

- Realm of War is at the bottom.

I'm not sure if some kind of sanity checking would be helpful / too much work. Adding some comments with suggested values might help. I've emailed the guy; I guess MSSP is going to be a mess until a mud listing (that people actually want to be on) forces people to fill it out properly.

KaVir 04-03-2011 12:00 PM

Re: GUI snippet
 
Well I do actually have the following comment directly above the table:
However I didn't want to clutter the table itself with too many comments. I considered including some default values, but figured some muds might leave them as-is rather than updating them, which would result in incorrect information - better to have less data than wrong data.

You could perhaps provide a script linked from the MSSP page that generates a report of any issues. It wouldn't deal with deliberately false information, like The Isles reporting a random number for "PLAYERS" every time you send it an mssp-request, but it would at least ensure that the fields used the correct format.

It'd also be nice if your crawler indicated MSDP support, particularly now that more muds are starting to add it.

scandum 04-03-2011 02:26 PM

Re: GUI snippet
 
Hadn't thought about creating a debugging script for server developers, that's a good idea.

I'll have a look at the variables you're using and synchronize the spec where needed.

Also, are there any links for your Mushclient / Mudlet plugins? As far as I can tell you've only linked screenshots, but no links to the actual plugins.

KaVir 04-03-2011 03:01 PM

Re: GUI snippet
 
I've included the full set from the specification (including the extended variables), although all but the essentials are commented out by default.

I did provide a link to the MUSHclient plugin for the - you can . The others are tailored to a specific mud, and I've given copies directly to the owners of those muds. Nothing generic for Mudlet yet, but I can throw something together I guess...it's really the snippet that I'm promoting here though, the plugins are just a demo of what you can use it for.

scandum 04-08-2011 11:35 PM

Re: GUI snippet
 
I was wondering the other day, does your snippet's MSSP support work for a MUD crawler that doesn't respond to TTYPE?

KaVir 04-09-2011 05:30 AM

Re: GUI snippet
 
If the crawler responds with either WILL or WONT, then the snippet will attempt to negotiate MSSP. If the crawler ignores the IAC DO TTYPE, then its telnet implementation is broken, and the snippet won't attempt to negotiate further.

Your includes the Realm of War, which uses my snippet, so clearly your crawler has no problem with it.


All times are GMT -4. The time now is 02:26 AM.

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright Top Mud Sites.com 2022