R
Ruby Quiz
The three rules of Ruby Quiz:
1. Please do not post any solutions or spoiler discussion for this quiz until
48 hours have passed from the time on this message.
2. Support Ruby Quiz by submitting ideas as often as you can:
http://www.rubyquiz.com/
3. Enjoy!
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Sy has been searching for a Ruby scriptable MUD client via Ruby Talk and so far,
there hasn't been many helpful answers posted. Let's generate some.
This week's Ruby Quiz is to create a basic MUD client that must be scriptable in
the Ruby programming language. That's pretty vague, so let me see if I can
answer the questions I'm sure at least some of you still have.
What is a MUD?
MUD stands for Multi-User Dungeon/Dimension, depending on who you ask. They are
old text-based game servers with many role playing game elements to them.
Here's a fictional example of MUD playing:
You are standing in the legendary resting place of The Dagger in The Stone.
Many have tried to free the mystical blade before, but none were worthy.
You can see the Castle of Evil to the west.
What's here:
The Dagger in The Stone
A very big, very black, very evil castle.
You can enter the castle to the north, or return to the Sacred Grove in
the east.
What's here:
Grog, Castle Guardian
Grog chews off your left ear for 15 points of damage.
You swing at Grog and miss.
Grog breaks the little finger on your right hand for 10 points of damage.
...
If you would like to find some MUDs to play on, try a listing service like:
http://www.mudconnect.com/
That siteh also has a MUD FAQ that probably answers a lot more questions than
this short introduction:
http://www.mudconnect.com/mudfaq/index.html
What is a MUD client?
While there are some advanced MUD protocols, the truth is that most of them talk
to any Telnet client just fine. We will focus on that for this quiz, to keep
things simple. Our goal is to create a Ruby scriptable Telnet client, more or
less.
What would we want to script?
Different people would have different requests I'm sure, but I'll give a few
examples. One idea is that you may want your client to recognize certain
commands commands and expand them into many MUD actions:
...
Another interesting possibility is to have functionality where you can execute
code when certain output is seen from the server. Here's an example:
Grog disarms you!
You punch Grog in the mouth for 2 points of damage.
Grog sings. You take 25 points of damage to the ear drums.
You slash Grog with the dagger for 5 points of damage.
Grog slugs you for 12 points of damage.
...
Here the idea is that the client noticed you were disarmed and automatically
retrieved and equipped your weapon. This saved you from having to quickly type
these commands in the middle of combat.
There are many other possibilities for scripting, but that gives us a starting
point.
1. Please do not post any solutions or spoiler discussion for this quiz until
48 hours have passed from the time on this message.
2. Support Ruby Quiz by submitting ideas as often as you can:
http://www.rubyquiz.com/
3. Enjoy!
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Sy has been searching for a Ruby scriptable MUD client via Ruby Talk and so far,
there hasn't been many helpful answers posted. Let's generate some.
This week's Ruby Quiz is to create a basic MUD client that must be scriptable in
the Ruby programming language. That's pretty vague, so let me see if I can
answer the questions I'm sure at least some of you still have.
What is a MUD?
MUD stands for Multi-User Dungeon/Dimension, depending on who you ask. They are
old text-based game servers with many role playing game elements to them.
Here's a fictional example of MUD playing:
Sacred Grovelook
You are standing in the legendary resting place of The Dagger in The Stone.
Many have tried to free the mystical blade before, but none were worthy.
You can see the Castle of Evil to the west.
What's here:
The Dagger in The Stone
The all-powerful blade begs to be stolen!look dagger
You take the dagger. (Well, that was easy, wasn't it?)get dagger
You are now the most dangerous warrior in the kingdom!equip dagger
The Gates of Castle of Evilwest
A very big, very black, very evil castle.
You can enter the castle to the north, or return to the Sacred Grove in
the east.
What's here:
Grog, Castle Guardian
Grog move's in front of the gate and laughs mercilessly at you.north
You slice Grog with the mighty dagger for 5 points of damage.kill grog
Grog chews off your left ear for 15 points of damage.
You swing at Grog and miss.
Grog breaks the little finger on your right hand for 10 points of damage.
...
If you would like to find some MUDs to play on, try a listing service like:
http://www.mudconnect.com/
That siteh also has a MUD FAQ that probably answers a lot more questions than
this short introduction:
http://www.mudconnect.com/mudfaq/index.html
What is a MUD client?
While there are some advanced MUD protocols, the truth is that most of them talk
to any Telnet client just fine. We will focus on that for this quiz, to keep
things simple. Our goal is to create a Ruby scriptable Telnet client, more or
less.
What would we want to script?
Different people would have different requests I'm sure, but I'll give a few
examples. One idea is that you may want your client to recognize certain
commands commands and expand them into many MUD actions:
prep for battle
You ready your weapon of choice.equip Vorpal Sword
You protect yourself and still manage to look good.equip Diamond Armor
Where did you go?wear Ring of Invisibility
...
Another interesting possibility is to have functionality where you can execute
code when certain output is seen from the server. Here's an example:
You slash Grog with the dagger for 2 points of damage.kill grog
Grog disarms you!
You take up the dagger.get dagger
You punch Grog in the mouth for 2 points of damage.
Grog sings. You take 25 points of damage to the ear drums.
You're now armed and dangerous.equip dagger
You slash Grog with the dagger for 5 points of damage.
Grog slugs you for 12 points of damage.
...
Here the idea is that the client noticed you were disarmed and automatically
retrieved and equipped your weapon. This saved you from having to quickly type
these commands in the middle of combat.
There are many other possibilities for scripting, but that gives us a starting
point.