| Custom MUD client demo

Posted October 19, 2025 ( monk tarmalen mudclient )

Level: 97

Exp: 493.0M

Reinc: catfolk monk(30)+tarmalen(30)+inner_circle(10) +navigator(4)+treenav(3)+slf+(5)

In 2024, I mentioned shortly that I have been coding my custom MUD proxy.

Instead of doing exp, I have now spent this week mostly on converting the proxy into a terminal based small MUD client.

In terms of code, the client is now about 3.5k lines of C++ code:

[src] 11:56 $ wc *.cc *.hh
  108   243  3260 ansi_parser.cc
  129   242  2037 byte_buffer.cc
   74   159  1508 cdebug.cc
   91   190  2407 iac_parser.cc
   87   145  1621 main.cc
   73   104  1012 msg_buffer.cc
  106   340  2968 net_conn_plain.cc
  102   159  1576 net_message_buffer.cc
  172   355  3796 task_log.cc
  195   419  4517 task_net.cc
  233   470  6416 task_net_state.cc
  187   416  4518 telnet_parser.cc
  223   724  6811 term_utils.cc
   55   122  1570 text_utils.cc
  118   311  2515 ui_colors.cc
  105   164  1626 ui_message_buffer.cc
  695  1434 17155 ui_nc.cc
   65   113  1110 ui_nc_scroll_view.cc
   49   104  1092 ansi_parser.hh
   34    59   631 byte_buffer.hh
   21    67   647 cdebug.hh
   54    88  1031 iac_parser.hh
   32    52   570 msg_buffer.hh
   11    29   295 net_conn_plain.hh
   38    64   749 net_message_buffer.hh
   47    70   726 net_messages.hh
   56   117  1304 task_log.hh
   25    42   485 task_net.hh
   42    66   756 task_net_state.hh
   44    56   706 telnet_parser.hh
   40    55   694 telnet_tokens.hh
   15    31   335 term_utils.hh
   12    26   269 text_utils.hh
   16    42   348 ui_colors.hh
   42    76   746 ui_line.hh
   37    63   708 ui_message_buffer.hh
   63    83  1035 ui_messages.hh
   24    82   619 ui_nc.hh
   94   133  1582 ui_nc_private.hh
   37    70   802 ui_nc_scroll_view.hh
 3651  7585 82553 yhteensä
[src] 11:56 $ 

It doesn’t do much yet. It has no triggers, no content scrollback or, no logging for example. But it can connect to BatMUD, parse the ANSI codes and show the text from the MUD in more or less correct colors. It also accepts Unicode/UTF-8 characters from the user and converts the input into latin-1 encoding (dropping the exotic characters not supported by latin-1).

The client also converts latin-1 encoding from the MUD into Unicode before showing the text to the user. This allows smooth usage of scandic letters (ÅÄÖ, etc.), which was one of the primary reasons why I have started coding my own client.

Short demo video below. On the video, Tinyfugue runs at the upper parts of the display and my custom client is at the bottom. Both are using a shared proxy to connect to BatMUD, so they get same content at the same time.

Video (1.3M megabytes).