TeensyMUD is a very simple mud server written in Ruby. It uses a multiplexed single-threaded network driver using Acceptor/Reactor and Observer patterns and YAML formatted text files as a database. It is also a pure event driven system where all game objects communicate with each other via events.
This server was initially created in response to an Aprils Fool’s joke posted by Erwin Andreasen on TheMudConnector forum announcing a 1K mud contest. Those obfuscated versions can be found in the repository.
The latest release can be found at teensymud.kicks-ass.org
Can be obtained at the home of Ruby, www.ruby-lang.org. It runs on most platforms.
All logging done through this now. Install from Ruby Gems, or log4r.sourceforge.net/
To install rake and various things. See - rubyforge.org/projects/rubygems
To build documentation, run tests, etc. See - rake.rubyforge.org
To rebuild FARTS or BoolExp parser. Ruby comes with Racc runtime so this is not needed for execution. See - i.loveruby.net/en/prog/racc.html
To run regression tests. See - onestepback.org/software/flexmock/
To run tclient in curses mode under windows. The Windows one-click installer may be missing the pdcurses.dll, or if you built it yourself from source the curses.so extension probably wasn’t built. You can get binaries for it at www.dave.burt.id.au/ruby/curses.zip. The pdcurses.dll should be placed in your rubybin directory and not your windows directories. See jarp.does.notwork.org/win32/ for the sources.
Multiplexed single-threaded network driver using Acceptor/Reactor and Observer patterns
Correct standard TELNET protocol implementation
Supports TELNET NAWS, TTYPE, ECHO, SGA, and BINARY options
Partial Xterm support
ZMP protocol support
Client detection (18+ clients tested so far)
Includes TeensyClient an vt-xxx/xterm capable client for testing.
Fully persistent virtual world
DBM, GDBM, SDBM, SQLite2, SQLite3 and YAML supported database back ends
Includes database load and dump utilities
Configurable object caching support for disk-based databases
Automatic persistent properties for objects.
Event-driven system with first class game objects communicating via events
Supports room-based system currently with unlimited exits
Command based online creation
Offline creation in YAML
Color and VT-100 highlighting support for builders using TML
Dynamic layered command interface
Currently supports chat, say and emote communication commands
Currently supports player movement, inventory, get and drop commands
Autolook and autoexits
Turn based combat featuring link death and link suicide ;-)
Runtime extensible commands. Add new commands without rebooting.
Trigger script programming using Boolean expressions (ala Tiny*) and FARTS language
AOP-like cuts for PRE and POST event trigger processing
Supports multiple persistent and variable timers
Regression test suite included
Customizable class level logging support
Global configuration file support
API documentation included (see ‘doc/index.html’)
Support forum and wiki
Portable - runs on Unix, OS/X, Windows
$ tar xzvf tmud*
$ cd tmud*
$ ruby tmud.rb
That’s it. It will boot on port 4000 and build an initial database in the db directory.
See config.yaml file for more configuration information. Documentation inside.
Usage: ruby ./tmud.rb [options]
-p, --port PORT Select the port the mud will run on (default is 4000) -d, --dbfile DBFILE Select the name of the database file (default is 'db/testworld.yaml') -c, --config CONFIGFILE Select the name of the configuration file (default is 'config.yaml') -l, --logfile LOGFILE Select the name of the log file (default is 'logs/server.log') -h, --home LOCATIONID Select the object id where new characters will start (default is 1) -t, --[no-]trace Trace execution -v, --[no-]verbose Run verbosely --help Show this message --version Show version
Options specified on the command line will override those in the config.yaml file.
There is a sample database, db/testworld.yaml that illustrates the use of triggers. The admin account is ‘Wizard’ and the password is ‘potrzebie’.
To start using the sample database either specify it in the config file or on the command line:
$ ruby tmud.rb –dbfile db/testworld
There are two converted databases from the original tinymud and dikumud. The admin account on both is ‘Wizard’ and the password is ‘potrzebie’. To run with those use:
$ ruby tmud.rb –dbfile db/tinyworld –home 17
$ ruby tmud.rb –dbfile db/dikuworld –home 13
The TinyMud scripts are only partially operable, which may severely restrict your movement.
See db/license.tiny and db/license.diku for more informtion.
CTL-C - Will shut down the server
quit - Will disconnect your session
help - Prints a brief description of the commands
look - displays the contents of a room
chat - sends <message> to all characters in the game
emote | ! - displays <message> to all characters in the room
quit - quits the game (saves character)
help | ? - displays help
get - gets all objects in the room into your inventory
examine - displays the contents of a room
say | “ - sends <message> to all characters in the room
go | <ex> - go through the exit specified (ex. go west)
inventory - displays chracter inventory
drop - drops all objects in your inventory into the room
kill - attempts to kill character (e.g. kill Bubba)
hello - the hello social
who - shows a list of all connected characters
@echoat - echos input to location
@object - creates a new object (ex. @object rose)
@reload - reloads the command table
@room - creates a new room and autolinks the exits using the exit names provided.
(ex. @room My Room north south)
@set - sets the description or timer for an object
Syntax: @set desc #<oid><description> @set timer #<oid> <on|off> (ex. @set desc #1 A beautiful rose.)
@stats - displays a statistical report of the database and cache if present
@color - toggles colors on or off
@status - displays session information
@memstats - displays the memory statistics by scanning ruby’s object space
@dumpcache - inspects the cache (for debugging).
@shutdown - shuts down the server
@trigger - adds, deletes or shows triggers on an object
Syntax: @trigger add #<oid> #<scriptid> <eventtype> @trigger del #<oid> <eventtype> @trigger show #<oid> (ex. @trigger add #1 #5 arrive)
@script - adds, deletes or shows a script
Syntax: @script add <lang> <progname>|<code> @script del #<scriptid> @script show #<scriptid> (ex. @script add fart myprog @script add boolexp (#234|#42)" )
@edit - Edits a string field on an object or system message.
Syntax: @edit sysmsg <name> @edit #<oid> <field> (ex. @edit #7 desc)
@gc - runs garbage collection
@show - Displays object
Syntax: @show #<oid>|me (ex. @show me)
Copyright© 2005 the contributors. All rights reserved.
See LICENSE file for terms and conditions.
Jon A. Lambert / Tyche firstname.lastname@example.org
Matthew B. Gardner / Stormy
Copyright© 2005 the contributors. All rights reserved.
See CONTRIBUTORS file for list of the contributors.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files, the rights to use, copy, modify, create derivative works, merge, publish, distribute, sublicense, and/or sell copies of this software, and to permit persons to whom the software is furnished to do so, subject to the following conditions:
1) Redistribution in source code must retain the copyright information and attributions in the original source code, the above copyright notice, this list of conditions, the CONTRIBUTORS file and the following disclaimer.
2) Redistribution in binary form must reproduce the above copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution.
3) The rights granted to you under this license automatically terminate should you attempt to assert any patent claims against the licensor or contributors, which in any way restrict the ability of any party to use this software or portions thereof in any form under the terms of this license.
Disclaimer: THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.