23 Aug, 2009, Barm wrote in the 1st comment:
Votes: 0


I'm plugging away at my Python MUD server and tonight, it's ANSI, or Tinyfugue, or me that's confused. In the picture above I have Gnome Mud, Kildclient, Telnet in Gnome Terminal, Tintin++ and Tinyfugue in the center. You can see that TF is not painting the background black except where text is directly written. The yellow on black is from my gnome terminal settings (Linux Telnet also starts with these colors but obeys the ANSI clear screen command).

I am sending the following ANSI codes:

Black background: '\x1b

I'm plugging away at my Python MUD server and tonight, it's ANSI, or Tinyfugue, or me that's confused. In the picture above I have Gnome Mud, Kildclient, Telnet in Gnome Terminal, Tintin++ and Tinyfugue in the center. You can see that TF is not painting the background black except where text is directly written. The yellow on black is from my gnome terminal settings (Linux Telnet also starts with these colors but obeys the ANSI clear screen command).

I am sending the following ANSI codes:

Black background: '\x1b[40m'
A random text color, like bright blue: '\x1b[1;34m'
Clear screen: '\x1b[2J'
Then I send the ASCII art banner, then non-bright white text: '\x1b[22;37m'

Am I doing something wrong or it just a problem with some clients and I should move on?

Thanks.
23 Aug, 2009, quixadhal wrote in the 2nd comment:
Votes: 0
All the text characters you printed do indeed have a black background, however Tinyfigue has preferences that decide what colours the window itself is rendered in. Clearing the screen is NOT guaranteed to set the background to the current colour, it removes all characters from the display. I seem to remember some versions of xterm doing it "the wrong way" too. :)

I would just write it off as some clients being stupid. The only way you can really control this is to either print FULL screens all the time (get the terminal height/width and pad everything), or require a custom client that behaves the way you expect.
23 Aug, 2009, Barm wrote in the 3rd comment:
Votes: 0
Thanks Quix, you're confirming what I suspected.

I wasn't even keen on changing the client's background color until TinyFugue started giving me black text on a black background when I tried sending a reset/normal sequence. I guess I could try sending a Clear to End of Line each time too.
0.0/3