• Advertisement
Sign in to follow this  

How to tell MUD client I'm using ANSI color?

This topic is 3228 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Pretty simple. I've tried reading and studying other source codes about telnet negotiation in MUDs, but I haven't found anything in C#, that's what I'm using. I don't need much else, though, no MCCP, no MXP, no Pueblo or anything. I want to tell the client I'll send them ANSI color escape codes so that it correctly shows the color instead of weird characters. How to do that? Is it simple as sending a single string through the stream writer upon socket connection? Thanks!

Share this post


Link to post
Share on other sites
Advertisement
Because MUDs should work with a telnet client(simply display raw output) unless you specify to your users to use special MUD clients the assumption should be that they do not have ansi color support. In such case the general solution is to ask during the registration/character creation if their client supports it (defaulting to yes). It is decently safe in this day and age to just use it and cross your fingers also :) My suggestion is to ask during registration.

Share this post


Link to post
Share on other sites
However, when I send ANSI color codes, they come out as weird characters in the MUD client. Why is it happening then?

Share this post


Link to post
Share on other sites
The format you're using is probably wrong. Only one of the characters should be 'weird' anyway, and that's the 'ESC' value. The others are typically human readable. Post an example of your code?

Share this post


Link to post
Share on other sites
You were right. :P My escape code was wrong that's why the MUD wasn't getting it as color code. Thanks! It's working now.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement