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 3490379bac updating node dependencies; fixing ssh2 server authentication flow 2 роки тому
players 2a4b5eb743 adding in stubs for phandalin; adding in ability for a player to change their password; refactoring hash command 6 роки тому
system 3490379bac updating node dependencies; fixing ssh2 server authentication flow 2 роки тому
website 3490379bac updating node dependencies; fixing ssh2 server authentication flow 2 роки тому
world 47602c2fcf adding better descriptions to the coal mine tunnel 5 роки тому
.gitignore f2d1ea27b9 adding basics for ssh server 6 роки тому
FEATURES.md 693e762df2 adding some feature notes; commiting the npm package lock; refactoring some ssh connection handling; 5 роки тому
README.md 9767e00a2c adding additional info to the readme 6 роки тому
banner.txt 11067c83cc fixing issues with permissions; moving banner out of json and into plaintext file; fixing formatting issues with the banner change 6 роки тому
config.json 29454a0c49 fixing config file 6 роки тому
index.js fe42b416af moving rooms, items, mobile into 'world' directory; moving all system-level classes into 'system' directory; consolidating configs, adding entrypoint for npm start; deleting unused json data; updating readme 6 роки тому
npm-debug.log 3490379bac updating node dependencies; fixing ssh2 server authentication flow 2 роки тому
package-lock.json 3490379bac updating node dependencies; fixing ssh2 server authentication flow 2 роки тому
package.json 3490379bac updating node dependencies; fixing ssh2 server authentication flow 2 роки тому

README.md

starmire

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)

Dependencies

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.

How to start the server

The server is set up to automatically run using node. Just execute

./system/server.js

or

npm start

Configuration

The config.json file has some basic configuration settings. Otherwise, just dive in!

Basic Commands

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.

Install as systemd Service

Create directory /var/starmire, put sshkey and players here Create starmire user with write access to /var/starmire

/lib/systemd/system/starmire.service

[Unit]
Description=Starmire Mud Service
After=network.target

[Service]
Type=simple
ExecStart=/usr/bin/node /var/www/starmire/index.js
Restart=on-failure
User=starmire

[Install]
WantedBy=multi-user.target


sudo systemctl daemon-reload

sudo service starmire start

use sudo service starmire status to debug any issues