# Still looking for a Ruby MUD client?

**URL:** <https://www.ruby-forum.com/t/still-looking-for-a-ruby-mud-client/99707>\
**Category:** Ruby\
**Created:** [July 25, 2006, 1:35am UTC](https://www.ruby-forum.com/t/still-looking-for-a-ruby-mud-client/99707 "2006-07-25T01:35:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sy\_Ali](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/54ee81/32.png) [@Sy\_Ali](https://www.ruby-forum.com/u/Sy_Ali)\
**Post date:** [July 25, 2006, 1:35am UTC](https://www.ruby-forum.com/t/still-looking-for-a-ruby-mud-client/99707/1 "2006-07-25T01:35:08Z")

</div>

Look no further!

> **[Register4Less.com Parking Page for jrandomhacker.info](http://www.jrandomhacker.info/Muby)**
>
> Parking page for domain jrandomhacker.info registered with Register4Less.com.

For the longest time, I was searching for a pure-Ruby mud client. I  
even found a few which threatened to let me do Ruby scripting, but  
nothing paid off.

Until last weekend, when Martin K. emailed me in reference to my  
age-old search. Actually, a few interesting projects came at me  
through that thread. Apparently he had a mostly-working client that  
had been on the back burner since before I started looking!

Over the weekend I worked with it, and have resolved nearly all of my  
issues and wrote decent documentation. It’s been put forth as a  
RubyForge project and has since had the old files and my revisions  
released:  
[http://rubyforge.org/projects/muby](http://rubyforge.org/projects/muby)

Here’s the selling-point:  
\*\*\* IT ACTUALLY WORKS \*\*\*

Yes kids, it works… has one dependancy (ncurses), is tiny (60k!), and  
has complete scripting features.

The only outstanding annoyance is that I’m having inconsistant issues  
with colour output. I only get brights. =/

I’m making all kinds of fun newbie mistakes hacking around… but it  
works and it’ll only get better from here.

Is it too late to enter into RubyQuiz #45? 😉  
[http://rubyquiz.com/quiz45.html](http://rubyquiz.com/quiz45.html)

---

<div class="post-metadata">

**Author:** ![Sy\_Ali](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/54ee81/32.png) [@Sy\_Ali](https://www.ruby-forum.com/u/Sy_Ali)\
**Post date:** [July 25, 2006, 12:46pm UTC](https://www.ruby-forum.com/t/still-looking-for-a-ruby-mud-client/99707/2 "2006-07-25T12:46:11Z")

</div>

On 7/25/06, Ondrej B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> and curses for input.(bad idea but colors worked).  
> Another problem was infamous Thread#sleep -each inputed line runs in  
> separate thread(solved by set\_trace\_func)  
> And worst thing debugging with curses is almost impossible.

In muby, the keypad seems to be working correctly, because there are  
some specific local input triggers which catch the keypad home/end for  
use. They ought to work just fine. Any keycode can be reacted to,  
although programming hotkeys is currently done in the source code and  
not a user-file.

I also have an issue with the main users having different keyboards  
and so there needs to be some sort of proper keyboard setting so that  
the right codes are used in the right cases. Heck, my keyboard works  
differently in an xterm vs a terminal. =/

I am not perfectly familiar with the muby code yet, but there is a  
main keyboard loop which reacts to keyboard input. However it’s  
implemented (and I can’t quite figure it out) it’s working perfectly.

So far the ncurses stuff is black magic to me. I don’t know why it’s  
being relied on for colour – I wouldn’t use it for colour – but it  
seems to work. It’s doing all the magical screen area definitions,  
height/width detection, scrollback buffer and probably other things.  
Maybe it’s doing the keyboard input too… that would explain why I  
haven’t found that code. =)

---

<div class="post-metadata">

**Author:** ![Sy\_Ali](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/54ee81/32.png) [@Sy\_Ali](https://www.ruby-forum.com/u/Sy_Ali)\
**Post date:** [July 25, 2006, 9:21am UTC](https://www.ruby-forum.com/t/still-looking-for-a-ruby-mud-client/99707/3 "2006-07-25T09:21:34Z")

</div>

Sy Ali wrote:

> had been on the back burner since before I started looking!  
> Yes kids, it works… has one dependancy (ncurses), is tiny (60k!), and  
> Is it too late to enter into RubyQuiz #45? 😉  
> [Ruby Quiz - MUD Client (#45)](http://rubyquiz.com/quiz45.html)

I tried too write my mud client but I gave up because  
I cannot find way how recogtnize keystrokes at console  
with curses/ncurses I cannot use numpad for quickwalk(could but then  
would walk istead write numbers or without numlock recognize PgUp from  
9) and got control chars istead colors.  
With SDL I could do it but I cant run it at 80\*25 and I too got control  
chars istead colors  
Then I looked how it was done in tinyfugue -magic code which used  
termio  
So I used def mvprint(i,j,str) print “\33[#{i};#{j]”+str end for output  
and curses for input.(bad idea but colors worked).  
Another problem was infamous Thread#sleep -each inputed line runs in  
separate thread(solved by set\_trace\_func)  
And worst thing debugging with curses is almost impossible.

---

<div class="post-metadata">

**Author:** ![Sy\_Ali](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/54ee81/32.png) [@Sy\_Ali](https://www.ruby-forum.com/u/Sy_Ali)\
**Post date:** [August 1, 2006, 3:17am UTC](https://www.ruby-forum.com/t/still-looking-for-a-ruby-mud-client/99707/4 "2006-08-01T03:17:07Z")

</div>

muby has been completely overhauled and is working amazingly well now.

With a 21k download, it’s surprizingly capable! I’ve been able to do  
some fairly complex scripting, and haven’t run into any significant  
limitations.

> **[Register4Less.com Parking Page for jrandomhacker.info](http://www.jrandomhacker.info/Muby)**
>
> Parking page for domain jrandomhacker.info registered with Register4Less.com.

[http://rubyforge.org/projects/muby/](http://rubyforge.org/projects/muby/)
