|
Jimorie Newbie
Joined: 06 Apr 2006 Posts: 3 Location: Gothenburg, Sweden
|
Posted: Thu Apr 06, 2006 5:53 pm
256 Color Escape Sequences |
Hello!
I would like to bring up to discussion the sort of escape sequences that are used by modern versions of XTerm for displaying text and text background in 256 colors. These things have been around for a little while now, and there are a few other applications that have picked them up too. For terminal-like programs I know of PuTTY and KildClient, besides XTerm itself. I bring the topic up here because I am curious as to whether this is a feature that is likely to be picked up by ZMud.
My reason for pushing for this feature is not that I am a ZMud user myself. I am a MUD developer and my interest is in using these escape sequences to present a richer color scheme to my users. But I have to face the fact that this little extension to the ANSI color escapes is right now a very narrow standard. If a major MUD client like ZMud were to pick it up however, then things would come in a completely different light.
As far as I can see, the addition is very simplistic and shouldn't pose technical problems. These things are just simple escape sequences on the form ESC[38;5;Xm and ESC[48;5;Xm, where X is a color code from 0 to 255. A little more info here: http://frexx.de/xterm-256-notes/.
I am surprised this hasn't become more popular among MUDs already. Is 16 colors enough for you? |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Thu Apr 06, 2006 6:30 pm |
Well, with MXP you can use HTML to specify *any* 24-bit color, so my guess is that MUDs who want to be more colorful would rather go with the HTML standard than with this x-term stuff. Especially with more and more clients supporting MXP/HTML.
Adding the xTerm color support to CMUD would be pretty easy though, so I'll add it to the list. |
|
|
|
Jimorie Newbie
Joined: 06 Apr 2006 Posts: 3 Location: Gothenburg, Sweden
|
Posted: Thu Apr 06, 2006 6:57 pm |
Aha, thanks for the reply!
I wasn't sure if MXP supported more colors or not. I tried to look it up just earlier, but could only find examples where it used the color 'red'. But you can specify color on normal hexadecimal form, e.g. #ac570d? That is good news. I have no problem with supporting MXP aswell and let the user decide what color protocol he wants to enable. (I will probably only be interested in the richer color scheme of the MXP features.)
From my perspective however, the XTerm sequences still have good arguments on their side. The foremost one being that there is a wider range of clients that could potentially implement them. MXP is fine, but geared towards MUD clients and servers specifically. (As I understand it?) More general purpose terminals like PuTTY or XTerm will not implement MXP, but they already have ANSI escape sequences. And there are still people that use these programs to play MUD, really! So as a MUD developer, I want to accomodate these users - aswell as those using ZMud. And while there are developers like me, maybe ZMud has something to gain in picking this up too.
And like you said, if it's an easy add - why not make the feature list a bit longer?
:) |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Thu Apr 06, 2006 11:25 pm |
Actually, while MXP was designed for MUDs, it has general use for telnet as well. It's really just in-line HTML. We took HTML and some XML and made some changes that make sense in a streaming-based protocol like Telnet (as opposed to a page-based protocol like HTTP).
The advantage of this is that MXP is very much like the existing HTML standard. And there are Telnet Option queries you can use to determine if a client supports MXP.
The problem I see with using the Xterm sequences is that there isn't any good way to determine if the player is using a client that supports them. That's probably why you haven't seen any MUD implement this before.
Also, a 256-color system can have palette problems. For example does the 256 palette include the normal Windows colors? I'll check the link to see if there is more information there on what palette should be used for these colors. In zMUD I allow players to "remap" the normal ANSI colors, but I doubt I'd do this for the 256 color situation. |
|
|
|
Jimorie Newbie
Joined: 06 Apr 2006 Posts: 3 Location: Gothenburg, Sweden
|
Posted: Fri Apr 07, 2006 8:33 am |
Zugg wrote: |
The problem I see with using the Xterm sequences is that there isn't any good way to determine if the player is using a client that supports them. That's probably why you haven't seen any MUD implement this before. |
Yes if you see this as a problem, then you could very well be right. I can't say I do though, not really. I would just let my players toggle between the featured protocols themselves anyway. If they want MXP, they switch it on. If they want ANSI, they switch it on. If they want extended ANSI, etc.. Maybe this is considered bad interaction design, I don't know. But I think you should be able to control these things as a player anyway, and not only by your choice of client.
Zugg wrote: |
Also, a 256-color system can have palette problems. For example does the 256 palette include the normal Windows colors? |
This could perhaps be a problem. I don't know about these things. The test program found on the linked web page prints the 240 extra colors with supposedly corresponding hexadecimal RGB values. I dumped the log of it here: http://82.182.100.131/~jimorie/log/256color.html. I hope it helps. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Fri Apr 07, 2006 6:09 pm |
Thanks for the link, I'll take a look at it.
Regarding how to switch on features: using a MUD command is a common method. Many newer MUDs have started doing a telnet option query to see what options are supported, or are using the telnet TERMTYPE option to see if the player is using zMUD and then turning on various options.
Using automatic detection is most useful for brand new players and it helps MUDs become a bit more newbie friendly. I've witnessed several occasions where a MUD newbie tries to connect to a MUD and the first question is:
Ansi (Y/N) ?
and they have no idea what to select! Or, if you disable colors until they enter a MUD command, then new players don't know what command to type and just think your MUD doesn't have colors. They get bored and leave. Doing telnet option negotiation and setting defaults for new players is one of the small details that separates the top MUDs from a lot of the others. |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|