Inspired by LDMUD, this is a telnet, websocket and ssh server that hosts a text-based game. The codebase allows for on-the-fly load/reload code.
Justin Gilman 7fc3e529a9 removing custom rooms, setting up barebones | 6 年之前 | |
---|---|---|
players | 6 年之前 | |
system | 6 年之前 | |
website | 6 年之前 | |
world | 6 年之前 | |
.gitignore | 6 年之前 | |
README.md | 6 年之前 | |
banner.txt | 6 年之前 | |
config.json | 6 年之前 | |
index.js | 6 年之前 | |
package.json | 6 年之前 |
Inspired by LDMUD, this is a telnet, websocket and ssh server that hosts a mud game world. The codebase allows for active load/reload code. Rooms, items, mobiles are all classes, and they have the full capabilties of any javascript code. There are no restrictions on how this can work, so the only thing limiting your world is your own imagination. (And coding skills)
npm install glob websocket ssh2 mime-types
You will also need to generate an ssh key if you plan to use the ssh server.
ssh-keygen -t rsa -b 4096 -C "nodemud server" -f ./id_rsa
For ease of setup, you should be able to just run
npm install
and all of this will be taken care of. Be careful; it will regenerate your SSH key which will cause your users to see a warning.
The server is set up to automatically run using node. Just execute
./system/server.js
or
npm start
The config.json file has some basic configuration settings. Otherwise, just dive in!
Once the server is running, you can log in using the default admin account (admin:admin) and input commands. You can type 'help' to see a list of all the commands available to you. If you need more details, you can type 'help [topic]'
Error handling is done internally; if the class doesn't run or hits an error, the server will continue happily after outputting the stack trace. Obviously if you screw up some of the classes you can break the server, but the intention is to allow the server to continue running while coders make active changes to it.