home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 3 / goldfish_volume_3.bin / files / game / role / amigamud / client / doc / intro.txt < prev    next >
Text File  |  1994-06-04  |  22KB  |  441 lines

  1. AmigaMUD, Copyright 1994 by Chris Gray
  2.  
  3.  
  4.         Introduction to the AmigaMUD System
  5.  
  6. The AmigaMUD system is a software system for the Commodore Amiga line
  7. of computers which implements a MUD (Multi-User-Dungeon). MUDs have
  8. existed on various computers for about 20 years, usually run at
  9. universities on networked computers. In a typical MUD, several people
  10. connect to the system at the same time and interact by typing in
  11. messages and commands to the MUD. MUDs are usually set up somewhat
  12. like text adventures, in that they contain a small world in which the
  13. players can explore, solve puzzles, etc. MUDs add to the adventure the
  14. possibility of interaction, within the world, of the various players.
  15. Players can talk to others in the same location; they can cooperate in
  16. solving puzzles; they can compete in improving their characters or
  17. personnas; they can engage in combat, etc.
  18.  
  19. The world in which the MUD is set is chosen and built by one or more
  20. people who are the implementors or "wizards" or "gods" of the MUD. MUD
  21. worlds have been set in various fictional as well as real situations,
  22. such as Star Trek, Xanth, the Discworld, etc. Other MUDs specialize in
  23. role playing, where the players pick a persona and do their best to
  24. stay within it. For example, "furries" on FurryMUD all pick a furred
  25. animal as their character.
  26.  
  27. Many MUDs exist on the 'internet', the international network of
  28. computer systems, mostly supported by various governments. Amiga
  29. computers are not often on this network, so they will usually get
  30. their multiple players through serial ports and modems. Amiga-based
  31. BBS systems often have multiple lines, and these can be used for
  32. connections to AmigaMUD.
  33.  
  34. Today, most MUDs are strictly text based. That is, users do all
  35. operations in the MUD by typing commands, and all output is via text
  36. messages. In the last couple of years, colour graphics have become
  37. quite common on home computers and workstations. MUDs are beginning to
  38. take advantage of that capability by introducing simple graphics
  39. output. Sound output is also possible.
  40.  
  41. AmigaMUD provides graphics and sound output as a standard element. It
  42. also allows the use of the mouse and numeric keypad as input. The
  43. system still provides the full text input and output interfaces,
  44. however, and can be used in a text-only mode. The standard
  45. availability of graphics output and mouse input can change the nature
  46. of a MUD, and make it available to those who aren't terribly good at
  47. typing, or who are uncomfortable with computers.
  48.  
  49.  
  50. Basic Capabilities
  51.  
  52. The main function of the AmigaMUD system is to allow the playing of a
  53. MUD, which is a multi-player text adventure game. As such, several
  54. people can be playing the same game at the same time. There is no
  55. inherent limit on the number of simultaneous players, but the CPU time
  56. needed to handle the server and the serial port activity will likely
  57. limit a top-end Amiga to under 50 active players.
  58.  
  59. The AmigaMUD system does word wrapping on output. This means that long
  60. lines are automatically broken up on word boundaries. The designers of
  61. the scenarios and the builders of new rooms and objects, etc. do not
  62. have to worry about properly formatting things. The formatting is done
  63. with respect to the actual output width of the MUD text window, which
  64. varies depending on the amount of overscan the user has setup.
  65.  
  66. Graphics output is to a 320 pixel wide by 100 pixel high by 32 colour
  67. graphics window at the top of the visible display (unless the user has
  68. chosen to hide it). Primitives exist in the system to draw and fill
  69. lines, circles, polygons, etc. A scenario can also scroll regions of
  70. the graphics window, and can dump IFF ILBM graphics images (from the
  71. machine on which the MUD client program is running) to the window.
  72.  
  73. The scenario can add "mouse buttons" to the graphics window. These are
  74. small rectangular areas containing text that the user can click on
  75. with the mouse. Doing so triggers an action in the scenario, such as
  76. moving in a specific direction. The scenario can also set up regions
  77. of the display which are sensitive to mouse clicks. Clicking within
  78. such a region sends to the server a message indicating the position
  79. within the region which was selected. This capability is used by the
  80. icon editor in the standard scenario.
  81.  
  82. The MUD client program can use the Amiga's speech synthesizer software
  83. (libs:translator.library and devs:narrator.device) to generate speech
  84. output. This capability requires that libs:translator.library exist on
  85. the server machine, and that devs:narrator.device exist on the client
  86. machine. Note that these items are not currently shipped with version
  87. 3.0 of the Amiga OS software package.
  88.  
  89. Scenarios can request that sound samples (IFF 8SVX files) be played on
  90. client systems. Since the Amiga has four hardware sound channels, up
  91. to four samples can be played simultaneously. These samples are loaded
  92. from the AmigaMUD:Sounds directory on the client Amiga.
  93.  
  94. The MUD program supports the concept of icons. These are small (up to
  95. 16 x 16 pixels) one-bit-per-pixel images that are overlayed on top of
  96. the main graphics imagery. They are used to indicate the presence, in
  97. the same "room" as the player, of other players and NPCs.
  98.  
  99. The MUD program can "cache" local copies of descriptions of graphics
  100. imagery, commands to play sounds, icons, etc. This caching can greatly
  101. reduce the amount of data that must be continually retransmitted over
  102. the serial connection, thus speeding up gameplay.
  103.  
  104. The MUD program includes a builtin full-screen text editor, which can
  105. be used to edit room descriptions, object descriptions, etc. It can
  106. also be used, when in wizard mode, to edit AmigaMUD functions, and is
  107. integrated with the AmigaMUD programming language parser to show the
  108. location of errors. MUD can also call out to an external editor for
  109. these purposes.
  110.  
  111. The text adventure aspect of AmigaMUD includes a set of fairly
  112. powerful routines to assist in writing code that "understands" pseudo-
  113. English commands. For example, when the scenario is parsing a user
  114. input line like:
  115.  
  116.   Put the apple, the pear and the black sword into the brown paper bag.
  117.  
  118. the code that understands how to put things into other things will be
  119. automatically called three times, one for each object to be put into
  120. the bag. Also provided are routines to aid in identifying the objects
  121. being referenced.
  122.  
  123. The AmigaMUD system includes a fairly efficient interpreted
  124. programming language which is used to build the scenarios or worlds
  125. that run under the system. Note, however, that with the current
  126. scenario, building of rooms, objects, etc. can be done entirely
  127. without using any of this programming language. The language is a
  128. strongly typed, structured language that should be usable by anyone
  129. with a bit of programming experience. The entire scenario is built
  130. using this language - rooms and objects are created dynamically by
  131. executing code in the language. The standard scenario includes a large
  132. set of utility routines designed to simplify the building of rooms,
  133. etc. Here is an example AmigaMUD programming language routine, which
  134. is a part of the standard scenario. It is used to draw the random
  135. coloured rectangles which are the graphics imagery for the "SysAdmin's
  136. Study" room:
  137.  
  138.     define tp_mall proc drawStudy()void:
  139.     int i, x, y;
  140.  
  141.     for i from 1 upto Random(20) + 10 do
  142.         GSetPen(nil, Random(32));
  143.         x := Random(159);
  144.         y := Random(99);
  145.         GAMove(nil, x, y);
  146.         GRectangle(nil, Random(160 - x), Random(100 - x), true);
  147.     od;
  148.     /* force a re-draw on look */
  149.     Me()@p_MapGroup := UNKNOWN_MAP_GROUP;
  150.     corp;
  151.  
  152. The standard scenario provided with AmigaMUD includes "builder
  153. commands", which allow non-wizards to build new rooms and objects into
  154. the scenario, while it is running. If the player is using the full MUD
  155. client program, this building can be done using mouse-buttons and a
  156. full-screen editor.
  157.  
  158. The standard scenario also provides some functions which can draw a
  159. simple overhead view of a room based on the obvious exits from that
  160. room. Several styles are available, including pathways, tunnels, and
  161. interior rooms. These simple graphics can be attached to rooms using
  162. mouse-buttons. The colours used can be changed for variety.
  163.  
  164. If the Amiga running the server is also running UUCP software, the
  165. standard scenario can provide MUD characters with access to usenet
  166. news and email services. The ability to send news and email must be
  167. explicitly enabled, however.
  168.  
  169. A fairly large combat area, similar in many ways to the areas used in
  170. combat-oriented fantasy role-playing games, is present in the standard
  171. scenario. This area includes most of the traditional elements in a
  172. simplified form, and contains three of the six quests. This is the
  173. largest region of the scenario.
  174.  
  175.  
  176. The Components of the System
  177.  
  178. There are several pieces of the AmigaMUD system. Most of the pieces
  179. are only needed on the central host or server system, however. A
  180. remote system, if the user is satisfied with a text-only interface,
  181. needs none of the AmigaMUD components. A terminal program to call up
  182. the host system is sufficient. To get the full interface, however, the
  183. following two components are needed:
  184.  
  185.     MUD - this is the main interface program. It provides the graphics
  186.     and text output, the sound output, and the mouse and keypad
  187.     input. It's use is described in detail in the 'MUD.txt'
  188.     document.
  189.  
  190.     mud.library - this is an Amiga OS shared library. It provides some
  191.     of the functionality of the user interface that is also needed
  192.     by the host/server system. To avoid needless duplication, that
  193.     portion of the code is placed into the shared library, so that
  194.     multiple users of it can use the same copy. This file must be
  195.     copied into the system's 'libs:' directory.
  196.  
  197. The Amiga that is hosting the AmigaMUD system needs a couple more
  198. programs, and can also use some minor utilities:
  199.  
  200.     MUDServ - this is the AmigaMUD server program. This is the main
  201.     component of the system; it provides the world, or scenario,
  202.     that the game takes place in, and provides the communication
  203.     between the separate players. See the file 'MUDServ.txt' for
  204.     more details.
  205.  
  206.     MUDAgent - this program is the connection point between the server
  207.     program and an external user. It communicates with a serial
  208.     port on one end, and with Amiga OS messages to/from MUDServ on
  209.     the other. There must be a copy of this program running for
  210.     each currently active remote player. Local players can use
  211.     'MUD' to connect directly to MUDServ. This program is
  212.     documented fully in file 'MUDAgent.txt'.
  213.  
  214.     AgentKill - this program is used to shut down copies of MUDAgent
  215.     that were started from the Workbench. If MUDAgents are
  216.     started from a shell, then use the shell 'status' command to
  217.     find their CLI numbers, and the shell 'break' command to shut
  218.     them down.
  219.  
  220.     SMUD - this is a simple text-only client program that normally
  221.     runs on the same system as the server, and can be run only
  222.     from a shell command line. It is useful for doing quick
  223.     connections to the server since it uses much less memory than
  224.     the full MUD client. It can also accept commands from
  225.     redirected standard input. SMUD is described in file 'SMUD.
  226.     txt'. SMUD does packet-based DOS I/O, so it can also be used
  227.     for remote text-only connections when called up by a BBS that
  228.     is not capable of calling up the full MUDAgent interface.
  229.  
  230.     MUDCre - this program is used to create an initial database in the
  231.     directory from which it is run. If a database is present, then
  232.     MUDCre will ask if it is to delete it first. An initial
  233.     database cannot be used for a multiplayer MUD as it does not
  234.     have any handlers for user input. Only wizards can use the
  235.     system until the appropriate handlers are setup. The standard
  236.     scenario is created by having SMUD read the various source
  237.     files of the scenario, which create and initialize the world
  238.     and the handlers for it. This is done via:
  239.  
  240.         MUDCre
  241.         run MUDServ
  242.         SMUD < Standard.go
  243.  
  244.     The 'Standard.go' file logs in SysAdmin, creates the world,
  245.     sets up all the handlers, etc. It does this mostly by using
  246.     the 'source' wizard command to read in all of the standard
  247.     scenario source files.
  248.  
  249.     Only those wishing to create a scenario from scratch need be
  250.     concerned with using MUDCre. Most systems will use the
  251.     standard scenario database, perhaps with some modifications
  252.     done online.
  253.  
  254.     The following items exist in the initial database:
  255.  
  256.         p_pName - a string property used to hold the name of the
  257.         character. Also used on machines.
  258.  
  259.         p_pIcon - an int array property used to hold a player's
  260.         (or machine's) icon (16 pixel by 16 pixel image which
  261.         shows up on other players' graphics windows).
  262.  
  263.         Characters - the table of character names. This table maps
  264.         from character names to the character data structures.
  265.         It initially contains only "SysAdmin".
  266.  
  267.         Builtin - the table of builtin functions. These are not
  268.         actually stored in the database - they are a part of
  269.         MUDServ itself.
  270.  
  271.         an empty main grammar
  272.  
  273.         a character creation password of 'CreationPassword'
  274.  
  275.         no machines
  276.  
  277.         no new character action
  278.  
  279.         player SysAdmin, with password 'SysAdminPassword', and
  280.         prompt 'input> '. SysAdmin is always a wizard. The
  281.         initial icon for SysAdmin looks a bit like a
  282.         "Superman" crest. (CHANGE THIS PASSWORD BEFORE
  283.         PUTTING YOUR MUD ON LINE!)
  284.  
  285.         flags indicating that machines are active and are to be
  286.         started as needed
  287.  
  288.         execution timeout of 10 seconds
  289.  
  290.     MUDFlush - this simple program sends a message to MUDServ asking
  291.     that it flush out the database. The image of the database
  292.     produced is complete and consistent, but only as of the
  293.     instant it is produced. If machines are running, they can
  294.     start changing the database as soon as the server is finished
  295.     with the flush. Thus, it is always best to shut down the
  296.     server before making a backup copy of the data files. MUDFlush
  297.     can be used from the Workbench or from a shell.
  298.  
  299.     MUDShut - this simple program sends a request to MUDServ asking
  300.     that MUDServ shut down. MUDServ will do so as soon as there
  301.     are no clients connected. MUDFlush can be used from the
  302.     Workbench or from a shell.
  303.  
  304.  
  305. How to Get AmigaMUD Up and Running Quickly
  306.  
  307. If you only want to get the system up and running to play with
  308. locally, then it is quite easy:
  309.  
  310.     - copy mud.library to your libs: directory
  311.  
  312.     - pick a directory with enough space. Copy MUD.data and MUD.index
  313.     to that directory. (These are the pre-built database files.)
  314.  
  315.     - start MUDServ in that directory. Use the 'run' command to put
  316.     it in the background if you are using a shell.
  317.  
  318.     - start MUD with the -L flag or the LOCAL tooltype
  319.  
  320.     - login as SysAdmin, with password SysAdminPassword
  321.  
  322.     - explore away!
  323.  
  324.  
  325. Some AmigaMUD Concepts
  326.  
  327. server, client - AmigaMUD uses the client-server mode of operation.
  328.     MUDServ is a server; it responds to, or serves, requests for
  329.     action coming from the various clients, which ultimately are the
  330.     people playing the MUD. For example, when a player enters an input
  331.     line in the MUD program, that line is packaged up as a message and
  332.     sent to the server, MUDServ. MUDServ eventually gets around to
  333.     looking at it (it may be busy doing other things), and will then
  334.     process it according to the scenario, or world, that is being run.
  335.     There may be many messages sent back to the client in response to
  336.     the input line, such as several output lines of text, changes in
  337.     the graphics display, sound output, etc. The reverse situation
  338.     never happens - the server never waits for responses from clients,
  339.     since doing so might get it stuck forever. (Actually, the client
  340.     does not wait for a response on an input line message, but it does
  341.     for a variety of other types of messages.)
  342.  
  343. scenario - the scenario that AmigaMUD is running is governed by the
  344.     contents of the database files. They contain all of the text
  345.     strings and AmigaMUD functions that define the world. In the
  346.     standard scenario, the world contains the minimall area, the
  347.     streets of the town, the builder's guild, the proving grounds,
  348.     etc. Other scenarios are possible, which could have completely
  349.     different layout, different rules, different commands, etc. Other
  350.     MUD systems use names like 'mudlib' for the scenario.
  351.  
  352. wizard - when most players connect to AmigaMUD, they will see an
  353.     'input> ' prompt and will type scenario commands like "north",
  354.     "take the apple", etc. In this mode of operation, the input
  355.     commands are being interpreted by the scenario. If a player is
  356.     designated as a wizard, however (which can only be done by another
  357.     wizard), then it is possible for the player to go into "wizard
  358.     mode". In this mode of operation, input lines are interpreted
  359.     directly by the AmigaMUD programming language. Normally, the
  360.     prompt changes to '> ' in this mode. For example, a wizard could
  361.     enter a line reading '2 + 2.', and the system would respond with
  362.     '==> 4' - it has parsed the input line into a small function,
  363.     executed the function, and printed the result. Consult the file
  364.     "Programming.txt" for more information on wizard mode.
  365.  
  366. apprentice - an apprentice is something like a partial wizard. They
  367.     can use the programming language like wizards, but must operate
  368.     under certain restrictions.
  369.  
  370. builtin - much of the standard scenario is functions written in the
  371.     AmigaMUD programming language. These functions are interpreted by
  372.     MUDServ as needed. MUDServ itself provides a number of predefined
  373.     functions, which are executed directly, rather than being
  374.     interpreted. These are called 'builtin' functions. An example is
  375.     the 'Print' builtin, which takes a string expression as its
  376.     argument and prints that string to the text window of the
  377.     currently active client. (It is actually quite a bit more
  378.     complicated than that, but the result is the same.)
  379.  
  380. bi-directional asynchronous reliable protocol - this mouthfull
  381.     describes the way in which the MUD remote client program and the
  382.     MUDAgent host program communicate. A protocol is just a set of
  383.     rules which govern communication. The protocol, which runs over
  384.     a serial (and usually modem) connection, allows messages to go in
  385.     both directions (client to server and server to client). The
  386.     protocol is asynchronous in that either end can send a message
  387.     whenever it wants, without getting agreement from the other end.
  388.     The protocol is reliable in that each message has a CRC (Cyclic
  389.     Redundancy Check) which allows a receiver to check that the
  390.     message hasn't been mangled during transmission. If it has, the
  391.     receiver tells this to the sender, and the sender will resend the
  392.     message. This continues until it is received correctly, or until
  393.     one of the ends gives up entirely, and terminates the connection.
  394.  
  395. machine - many modern adventure games have characters other than the
  396.     player who are wandering around in the world. Often, the player
  397.     can interact with these characters. In the role-playing world,
  398.     these other characters are called NPC's (Non-Player Characters).
  399.     Many MUDs have a similar capability. In AmigaMUD, "machines" are
  400.     used to implement NPC's. Machines are much like player characters
  401.     except that they are governed by AmigaMUD programs, instead of by
  402.     a person. Other MUDs call them robots, or bots.
  403.  
  404. quest - usually, adventure games have a definite final goal or
  405.     solution. Having a single solvable puzzle in a MUD usually doesn't
  406.     work very well, since the first character to solve the puzzle can
  407.     render it pointless for the rest of the characters. This is
  408.     realistic, but can make for a dull game. Instead, many MUDs have
  409.     quests, which are smaller puzzles which can be solved over and
  410.     over again, although usually only once per character. A similar
  411.     situation occurs with special objects, such as powerful weapons.
  412.     There will usually be a supply of them, although larger scenarios
  413.     can have a small selection of special objects which are unique.
  414.  
  415. security - security can mean a variety of things in a MUD. The
  416.     simplest meaning is that there be no ways, within the game, for
  417.     cheating on the quests or for gaining power or influence without
  418.     doing so in the "proper" fashion. Problems of these kinds are
  419.     normally just bugs or oversights in the scenario. At the other end
  420.     of the scale are ways by which wizards, remotely connected to the
  421.     MUD, can access or damage the host computer running the MUD. This
  422.     kind of problem is much more severe, and usually arises from bugs
  423.     or oversights in the MUD system itself. In between these two
  424.     extremes are issues such as wizards using their wizard abilities
  425.     to mess up quests and areas built by other wizards.
  426.  
  427. SysAdmin - all AmigaMUD databases contain a SysAdmin character. This
  428.     character is the "god" of AmigaMUD. It can do anything in the MUD
  429.     and can see anything. SysAdmin can even look into the private
  430.     symbol tables of other wizards. Certain of the builtin functions,
  431.     such as the ones which write to disk, can be executed only by
  432.     functions owned by SysAdmin. Because of this power, the standard
  433.     password for SysAdmin should be changed for any MUD which is made
  434.     available to other players, and the new password should be guarded
  435.     carefully. As shipped, AmigaMUD will not allow SysAdmin to log in
  436.     remotely unless special action is taken to enable it. SysAdmin is
  437.     intended to be used only by the system administrator of the server
  438.     system. If any routines which use some of the dangerous functions
  439.     are written or changed, SysAdmin should be very careful that he
  440.     has not created a way for others to mess up his computer.
  441.