Still looking for a Ruby MUD client?

Look no further!

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

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? :wink:
http://rubyquiz.com/quiz45.html

On 7/25/06, Ondrej B. [email protected] 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. =)

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? :wink:
Ruby Quiz - MUD Client (#45)

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.

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.

http://rubyforge.org/projects/muby/