[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Suggestions
. . -> [Subject]  UTF-8 detection (by the mud)

UTF-8 detection (by the mud)

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by KaVir   Germany  (117 posts)  [Biography] bio
Date Wed 23 Feb 2011 12:28 PM (UTC)
Message
I've been having a bit of a play with UTF-8, and it looks like it has some interesting potential - it could create much nicer maps than ASCII, and it would be pretty cool to utilise some of the characters for weather, alchemy, runes, etc.

In an ideal world, what I would really love is for the default MUSHclient font to be fixed-width Unicode, and to have a second checkbox with "UTF-8 autodetection", switched on by default, with a NAWS-like protocol that informs the mud whenever the checkbox changes state. Then I could negotiate with client when the player connects, and automatically start using Unicode in the maps and tables. But I realise that's a huge request.

However even if I could just query the client somehow, to ask if whether the user has selected the UTF-8 checkbox, it would be a big help.

Finally, would there be any possibility of including a fixed-width Unicode font with the MUSHclient distribution? This may be a pretty tall order, I've hunted around without much success trying to find such a font - but I think it's pretty much essential if you want to display maps, score tables, etc.
[Go to top] top

Posted by Nick Gammon   Australia  (23,042 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Thu 24 Feb 2011 01:08 AM (UTC)
Message
This came up a while back. For a start, check out this:

http://www.gammon.com.au/forum/bbshowpost.php?id=7696&page=2

You can do a CHARSET negotiation to find if UTF-8 is active.

However what this does not do is tell you if they have selected a Unicode font, and indeed if the font supports certain characters. For example, a Unicode font might have Chinese by not Cyrillic characters.

As for including a Unicode font, well if you can find one that I can use without licence restrictions I'll take a look at it.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by KaVir   Germany  (117 posts)  [Biography] bio
Date Reply #2 on Thu 24 Feb 2011 10:08 AM (UTC)
Message
Excellent, thanks! I don't think the font is going to be a big issue - the player has to explicitly check the UTF-8 checkbox, so if they see the mud displaying junk it should be fairly obvious what's causing it. I could perhaps also send them a warning the first time they use it, reminding them to use a Unicode font.

I'll have another hunt around and see if I can find a fixed-width Unicode font. Another option someone suggested to me yesterday would be to create a true type drawing font - as a community effort, to produce a "mud font" supported by multiple clients that can be used by multiple muds. Would you consider including such a font with the standard MUSHclient distribution, if it were available without licence restrictions?
[Go to top] top

Posted by Nick Gammon   Australia  (23,042 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Thu 24 Feb 2011 08:17 PM (UTC)
Message
Well it won't all be junk. Just the non-supported characters. So A-Z should appear OK, for example.

I'd consider the font, but I need to be aware of space considerations. For example, Dina (which is already included) is only 60Kb. Lucida Sans Unicode is 317 Kb.

I would need to be convinced that increasing the download size would be of general use, not just as an extra "goodie" for one MUD. For that situation, supplying your own download link would be more appropriate.

The thing is, why do you really want it? For reading text (say, in German) then most people would have a German font (or a Unicode font which had the extra characters), if German was what they wanted to read.

But for maps? Isn't using miniwindows and drawing them with lines, shades of gray, multiple colours, etc. better than trying to shoe-horn a Unicode font into that service?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Twisol   USA  (2,257 posts)  [Biography] bio
Date Reply #4 on Thu 24 Feb 2011 11:05 PM (UTC)
Message
You can also draw your own bitmap font into a miniwindow, then blit parts of it onto another one.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by KaVir   Germany  (117 posts)  [Biography] bio
Date Reply #5 on Fri 25 Feb 2011 10:48 AM (UTC)

Amended on Fri 25 Feb 2011 10:49 AM (UTC) by KaVir

Message
I've already invested some effort into creating a GUI, but as it's a plugin it requires the user to manually download and install it. In theory I could release a preconfigured version, but it would still need to be downloaded, and not everyone is willing to do that. This is particularly the case when they've only just connected - and the impression given in those crucial first minutes has a big impact on the likelyhood of the newbie hanging around.

I find that those who are new to muds are much more likely to download MUSHclient and install the plugin, it's mostly the experienced mudders who are fickle. Most of them are already familiar with ASCII maps using ANSI colour, so I believe it would be quite an effective attention-grabber if they were instead presented with a Unicode map using 24-bit (or even 256) colours.

But even for those who use a "proper" GUI, the text-window will still be their primary focus, and as such I believe it's important to put extra effort into the way the text is presented. Colour is an obvious example - when used carefully, it can make the text easier to read by drawing the user's attention to important details. Clickable MXP links are another example, and I find they actually complement the GUI very well (perhaps because the user is more likely to already have one hand on the mouse).

Try connecting to a mud that makes good use of colour and MXP, play it for a while, then switch off both colour and MXP - you can really feel the difference in terms of presentation. Do the same with a custom GUI framing the text window, and the juxtaposition is even more jarring. I'm strongly in favour of using graphics to improve the interface for the user, but I also think it's important not to overlook the presentation of the text window itself.

With a Unicode font you could take it a step further. You're using "M" or "F" to indicate gender in the who list, because there's not enough space to write it out in full? No problem, you can use the appropriate gender symbol. That ancient tomb includes descriptions of strange runic writing above the entrance? Use the rune characters and you can actually display what it looks like. Each area of the world maintains its own weather conditions, and you want a way for players to view them? Easy, just add the appropriate weather symbol to the area list. You've got an alchemy chart for a minigame? Use the linedraw characters and the alchemy symbols and it'll look pretty nice.

If the concept were extended to a custom made font, it could also incorporate characters designed specifically for muds. No need for using abbreviations to squeeze class names into the who list - instead of "War" for warrior you could use a sword and shield character, instead of "Mag" for mage you could use a spellbook character, etc. You could do the same for races, specific states (AFK, link-dead, etc), status (staff, clan leader, killer, thief, etc).

The font could also include multiple sets of characters, effectively allowing you to mimic multiple fonts in the text window at the same time (as far as I'm aware you can't currently do this in MUSHclient). This would need to be handled with care in order to maintain a consistent look and feel, but for example you might use a different set of characters when looking at a hand-written journal your character found in a dungeon, or when reading the inscription on a magical weapon, etc.

It would be a simple matter of providing a snippet for any muds that wished to take advantage of such a font - but as always it's the chicken-and-egg scenario when it comes to clients and servers adding support for something new. I could perhaps persuade a handful of muds to add support, with their players needing to download and install the font manually, but to gain wider acceptance I think the font would need to be part of the default distribution.

Right now I'm still playing with the concept, testing it out to see how viable it is. Last night I found a font called Fixedsys Excelsior which is probably a bit large for your tastes, but it's enough for me to play around with and get a feel for what sort of results could be produced.

I agree it doesn't make sense to add it to the distribution if only one mud is using it, but that's not my intent. So let's see if I can (1) get a proof-of-concept working, and then (2) convince a few other muds to support it as well.
[Go to top] top

Posted by Twisol   USA  (2,257 posts)  [Biography] bio
Date Reply #6 on Fri 25 Feb 2011 11:04 PM (UTC)
Message
Well, in a web browser you can do this with CSS, telling it where to get a font if it doesn't have it.

@font-face {
  font-family: MyHelvetica;
  src: local("Helvetica Neue Bold"),
       local("HelveticaNeue-Bold"),
       url(MgOpenModernaBold.ttf);
  font-weight: bold;
}

Source: https://developer.mozilla.org/index.php?title=en/CSS/%40font-face

If there was a MUD client that took advantage of the rendering prowess of the browser, I think it would create a lot of room for innovation.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by KaVir   Germany  (117 posts)  [Biography] bio
Date Reply #7 on Fri 01 Apr 2011 04:03 PM (UTC)
Message
KaVir said:
I agree it doesn't make sense to add it to the distribution if only one mud is using it, but that's not my intent. So let's see if I can (1) get a proof-of-concept working, and then (2) convince a few other muds to support it as well.

Just as a brief follow-up to my above comment.

I publically released my snippet today, it's available from here: http://www.godwars2.org/download/protocol.tgz

It uses CHARSET for detecting UTF-8, and in the documentation I recommend using Fixedsys Excelsior, which can be downloaded from here: http://www.fixedsysexcelsior.com/

I also used UTF-8 in the simple proof-of-concept demo GUI I created for Realms of Despair, there's a screenshot of it here: http://www.godwars2.org/images/plugin_rod.png

Realms of Despair and a few other muds are already working on adding the snippet. I don't know exactly what they plan to do with it, or whether they'll even use unicode characters, but if the support is there I imagine it'll only be a matter of time until some builder decides to add runes or alchemy symbols to descriptions of certain objects/rooms/etc.
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


28,275 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]