Code Monkey home page Code Monkey logo

dennismud's Introduction

Dennis MUD - Multiplayer Text Adventure Sandbox

Dennis is a MUD (Multi-User Dungeon, aka a multi-player text adventure) and collaborative writing exercise inspired by ifMUD, in which all content is created by the users, by utilizing in-game commands. The game starts with a single empty room, and one or more players build a world from that point by adding rooms, exits, and items, and assigning them descriptions and attributes. The in-game help command provides a categorized listing and usage instructions for every command in the game. This is an experimental project in early alpha, and new features are added frequently. Bugs and backwards-incompatible updates are to be expected.

A public test instance is generally kept running. Access it with the web client at http://play.dennismud.xyz/ or via telnet at the same host on port 37380.

Defaults Configuration

There is a configuration file defaults.config.example.json which contains a number of default values to use when creating new in-game rooms, items, and users. It is necessary before running Dennis to copy this file to defaults.config.json, and make changes if desired.

Single User Mode (Single-player)

To try out single user mode on the command line, first make sure you have Python 3, TinyDB, Python Prompt Toolkit, and jsonschema. (Previous versions used MongoDB.) Then copy singleuser.config.example.json to singleuser.config.json, change any necessary settings, and run python3 singleuser.py in the project's top directory from your console.

Multi-player Server

To run a multi-player server, you can run server.py, which will start a websocket service and a telnet service by default. websocket-client.example.html provides an example in-browser client for the websocket service. You will also have to copy server.config.example.json to server.config.json and change any necessary settings. If you would like, you can also copy motd.telnet.example.txt to motd.telnet.txt and modify it as needed to provide a message to telnet users upon connection. To run the services, you will need Python 3, TinyDB, jsonschema, Twisted, Autobahn, pyOpenSSL, and service_identity.

Windows Releases

The Windows releases contain binaries which already contain all of the requirements for running the server and cli. You shouldn't need to install anything. You also don't need to copy or rename the config files if you download a Windows release.

dennismud's People

Contributors

seisatsu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

dennismud's Issues

Database should be aware of its own version.

The world databases should have a version string, which gets incremented each time there is a change to the schema. This will get verified by the Dennis server as being the correct version for the currently running server version, and it will also be used by update scripts to know which transformations to make.

Solving this issue should require the update script to be version-aware.

Option for changing the placement of the player's name in decorated actions.

For the actions associated with the decoration commands, there should be a way to set an action that doesn't necessarily begin with the player's name, using some token to specify where the name should go. When the token isn't present, the action starts with the player's name by default.

e.g.

> decorate exit 1 fell through the floor.
Seisatsu fell through the floor.
> decorate exit 1 The floor fell out under %u.
The floor fell out under Seisatsu.

Command History

Add the ability to navigate through command history on the websocket frontend by pressing the up and down arrows in the text box.

Completion for commands that work on names

Allow completion for non-ambiguous partial names in commands.

Example: If there is an exit called "Big Wooden Door", then go big should select for that exit. However, if there is also an exit in the same context (same room in this case) named "Big Plastic Door", then go big should reject the command string as ambiguous.

This should also work on commands like use, look, and get, to name a few.

Port to TinyDB

Port to BlitzDB TinyDB so we have the option of saving worlds to flat file or MongoDB.

Better logging for services.

Currently the server logs aren't as useful as they could be. Logging messages should be improved and expanded upon.

Fix Secure Websockets

Currently secure websockets don't work. There is a handshake failure of some kind.

Purge Inventory Command

There should be a purge inventory command that breaks all items in your inventory that you own.

Purge Entrances Command

There should be a purge entrances command that breaks all exits leading to the given room.

MongoDB import/export tool

In order to support the sharing of people's worlds as standalone packages, there should be a utility included that can import and export single files which contain a Dennis game's database state. Import and export of user data should be an optional switch.

Telnet MOTD

The telnet server (and websocket server) currently don't send any message on connect. It's hard to tell on some clients whether you connected at all. Telnet should send an MOTD with useful info for new players.

Issue #17 should be done first.

Randomize item/exit

Command to set how often an item or exit will appear to a user entering a room.

randomize <item/exit> <id> <chance>
Where the possibility for the object to appear is 1 out of every chance times.

Break User and Purge User Commands

Add a break user command for wizards which deletes a user account and removes them as owner from everything they owned in the world. Items with no owner will be owned by <world>.

Also add a purge user command which deletes everything in the world for which they were the only owner.

Turn common command module procedures into reusable functions.

Most of the code in command modules is duplicated across several modules. Common procedures should be split off into utility functions to make command code shorter and more readable.

These common functions will be kept in commands/_util.py. Python files starting with an underscore in the commands folder will be importable by command modules, but will not themselves be loaded in as command modules.

Migrate to MongoDB

BlitzDB can't handle concurrent access, so I can't use it for communication between the planned web interface frontend and backend.

Chests

Items that hold other items.

Lock/unlock commands.

Lock/unlock commands to prevent anyone except owners from editing a room or item.

Custom actions for exits.

Add an "action" attribute to exits for the action that is displayed when a player goes through an exit. For example, if the exit is called "window" and the action is "jumped out the", then the message will be "User jumped out the window."

Merge telnet and websocket servers.

Use Twisted's multi-service feature to merge the telnet and websocket backends. This will consolidate things and allow users on both interfaces to communicate with each other.

Option to disable autolook

It might get a little obnoxious for some players to see the full output of the look command every time they change rooms. This should be configurable client-side. Add enable autolook and disable autolook commands.

List Entrances Command

A command to list all of the exits in the world that lead to the current room. Usable by the room owner and by wizards.

Make first versioned Alpha release

A version 0.0.1 package ready to extract and run should be released soon, both for Linux and as an EXE build for Windows. It should be released once all of the code and commands are fairly well documented.

Users table in Router should contain Dicts, not Lists.

The users table in the Router in server.py would be cleaner if each user was represented as a dict with keys "service" and "console", rather than the list [service, console.Console(dbman, peer, self)]. This would make code more readable in some other places as well, such as the break item, unduplify item, and requisition commands, and anywhere else where we have to step through the list of all online users.

Option to allow origin file:// in websocket server

In order to allow connections to the websocket server by opening the html frontend locally, the allowNullOrigin option in Autobahn must be set to true. There should be a config option to enable this.

Purge Exits Command

There should be a purge exits command that will break all exits in a room that you own.

Set and Permit commands

Set command is for miscellaneous exit, room, and item settings. Permit command is similar, but for permissions.

Example: "permit room 3 enter 0" to prevent anyone except the owner from entering room 3.

Glue/Unglue commands.

Glue/unglue commands to prevent items from being picked up by anyone except the owner.

Grant/Revoke commands.

Grant/revoke ownership of a room or item.

grant item <id> <user>
revoke item <id> <user>
grant room <id> <user>
revoke room <id> <user>

Cleaner command alias handling.

Command aliases should be defined inside of their respective command modules, instead of in the _process_aliases() function in console.py.

Secure password reset over email

The register command should take an email address. There should then be a reset password command which takes an email address as an argument and sends a new password to the email provided. There should also be a change password command.

Web Interface

Shift focus to a working browser-interfaced Dennis client-server model using MongoDB for communication.

Clean way to exit telnet session.

There should be one or more commands that close the session from the server-side. Most likely the pseudo-command "quit" like in cli-frontend.py.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.