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


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUDs
. -> [Folder]  General
. . -> [Subject]  The true cost of ANSI color?

The true cost of ANSI color?

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


Posted by Zsuzsu   USA  (4 posts)  [Biography] bio
Date Sun 08 May 2005 02:40 AM (UTC)
Message
There's a small debate I have going with a few people on the true cost of ANSI color for my mud.

One side claims that ANSI coloring lags players connected over dial-up due to the more data in the output stream.

The other side reasons that in the days when downloading several 30k pictures per website is the norm, that a screen of text, even multiplied by 5, is still too small cause a player bandwidth problems.

If you take 80col x 24lines (the traditional terminal size) you get 1920bytes of data. I believe ANSI coloring is something like 4escape color characters, plus the normal ASCII character. So that's 9,600byte or around 9k per full screen of text where every character is a different ANSI color.

Is a player really going to notice that over a 56k modem line?

Or is this possibly a case where their client renders ANSI coloring poorly.

Anyone have an hard data or good guesses about this?

Zz

Adorable head coder @ DnD: Legends & Lore
legendsandlore.org 9999
[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Reply #1 on Sun 08 May 2005 08:17 AM (UTC)

Amended on Sun 08 May 2005 08:18 AM (UTC) by Flannel

Message
ANSI colors are actually escape, followed by control characters (which range from 3 to 4 bytes). So, its 5 bytes. And actually, depending on the color combinations, you may end up doubling up (since you have to use another 4 or 5 bytes turning bold off/on).
In addition, most (all?) servers send a clear message at the beginning of the line (and then begin their colors) as well as at the end of the line.

So, a particular line is at maximum 4+(80*(4.5+5+1))+4+2
4 for clear at beginning, then 80 characters (each with a color plus alternating bold on/off which is 4 for on, 5 for off, and then the printed character) then 4 to clear the colors, and 2 for CR and LF.
And that also assumes no background color.
Thats actually 20400 bytes (20K), which will take a little over three seconds to download on a 56K modem (provided one is doing nothing else at the same time).

Of course, a typical ANSI colored page WONT be a color each character, and it won't be a full screen of characters either.

So yes, if you're trying to display a full screen movie over telnet with color, you're probably not going to enjoy it much, especially because each frame will scroll.

One thing to remember is that almost all servers give you the option of turning ANSI off, and even with ANSI on, unless the server is unreasonable with color (in which case the readers eyes will start to bleed in a couple minutes anyway) the overhead for an ANSI sequence here and there won't be that signifigant.

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
[Go to top] top

Posted by Txzeenath   USA  (54 posts)  [Biography] bio
Date Reply #2 on Mon 09 May 2005 10:51 AM (UTC)
Message
Personally I think yes... they will notice... if they are like me :-p I like for my text to "appear" onto the screen, not scroll on. My muds greeting uses well over 50 color codes, and it does/did lag, even on my 100 mbps cable connection. To fix this I changed the speed it would send the text. this is still a problem though because my 56k users are stuck waiting for a bunch of colors to show.



Make it short: Yes, ANSI can lag 56k users severely, but.. ANSI also is part of the experience, completely take out color and alot of people won't play. I myself find it rather irritating to have to try and sort out useful text from weather messages because there isn't any color.



----Test----

I set the speed at which the mud sends text to me, at the same as the default SMAUG(Which may be the default for many others) and my greeting took about 2-3 seconds to display.
I removed the color codes, did it again.. instantly came up

^Shows that color codes indeed to cause lag when used in excess

Darkness comes along thy path, searching, wanting, calling wrath,
shadows awaken, release the light, one and only.. here to fight,
challenge the darkness, the shadows they call, hunting the living,
more and all. Roaring thunder, full of hate, a single bound, seals
your fate.

-Txzeenath

telnet://divineright.org:8088
Alumuble Arda -
*Player owned shops, clans, and housing
*Multiclass & Stat training
*Random mob name generation implemented and Overland mapping.
*Realistic equipment statistics
*Interactive enviroment(weather/sectors)
*Weapon sheaths(scabbards), Throwing weapons
*Automatic crash recovery, saving, and reporting without disconnecting
*Fully customizeable color, Automapper, "Smart" mobiles, Hiscore tables, and more!

Currently running AGE v1.9.6(Originated and modified from Smaug 1.4a)
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Tue 10 May 2005 07:01 AM (UTC)
Message
I presume this test wasn't using MUSHclient? A greeting screen could hardly take 3 seconds to display unless you have an incredibly slow connection, or are using one of the slower clients. See this page:

http://www.gammon.com.au/mushclient/benchmarks.htm

My test there uese a test file which has a lot of ANSI colour in it - 5378 lines, 33087 words, 437728 characters (bytes).

MUSHclient displayed that in 3.2 seconds. Now this is 5378 lines, not the 24 or so lines you would have in a greeting screen.

Most MUDs would have occasional colour changes per line, the extra 5 bytes or so to change would not introduce a significant overhead. If you are worried, use MCCP (MUD Client Compression Protocol). Sequences that occur often (eg. a colour sequence) will compress up nicely.

- Nick Gammon

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

Posted by Txzeenath   USA  (54 posts)  [Biography] bio
Date Reply #4 on Tue 10 May 2005 10:39 AM (UTC)
Message
Was using Telnet to get a good measure, and 100 mbps cable connection is barely slow.. not the superman of internet, but it's sufficient. My greeting is also a huge array of ansi codes and assorted keyboard characters making a nearly solid block of text. Which also has an ANSI character on just about every line.


but... I haven't taken into consideration yet that the mud has to resolve the DNS of the person, check if they are banned, denied, etc. Once I re-add the external DNS Resolver it will probably speed up a little bit as the mud won't have to be doing the work.



Darkness comes along thy path, searching, wanting, calling wrath,
shadows awaken, release the light, one and only.. here to fight,
challenge the darkness, the shadows they call, hunting the living,
more and all. Roaring thunder, full of hate, a single bound, seals
your fate.

-Txzeenath

telnet://divineright.org:8088
Alumuble Arda -
*Player owned shops, clans, and housing
*Multiclass & Stat training
*Random mob name generation implemented and Overland mapping.
*Realistic equipment statistics
*Interactive enviroment(weather/sectors)
*Weapon sheaths(scabbards), Throwing weapons
*Automatic crash recovery, saving, and reporting without disconnecting
*Fully customizeable color, Automapper, "Smart" mobiles, Hiscore tables, and more!

Currently running AGE v1.9.6(Originated and modified from Smaug 1.4a)
[Go to top] top

Posted by Scypio   Poland  (50 posts)  [Biography] bio
Date Reply #5 on Tue 10 May 2005 02:34 PM (UTC)
Message
If by your greeting you mean the one from divineright.org that you have in your signature, it appeared almost instantly when I logged on to it using MC.
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #6 on Tue 10 May 2005 04:43 PM (UTC)
Message
I was on a 56k for years with AOL, and I played MUDs for many of those years. I never ever noticed a difference in "lag" between color and non-color.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by Meerclar   USA  (733 posts)  [Biography] bio
Date Reply #7 on Tue 10 May 2005 11:22 PM (UTC)
Message
Until less than 6 months ago I was on dialup. Even way back in the day before 14.4 ansi color wasnt noticably slower than noncolor muds. Text just isn't real bandwidth intensive even with silly color changes every letter to make the readers eyes bleed if they try to actually read every word.

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
[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.


27,676 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]