No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Latest commit d0f7873 Dec 8, 2018

README.md

text.camp

It's a MUD! It's a MUSH! It's a MESS!

Text Camp is barely "playable" at the moment. You can move around, look at things, and pick up objects ... but the world is very limited at the moment.

Dependencies

  1. We're workin' in Rust (2018, stable), so head over to https://rustup.rs/ and follow the instructions for installing the toolchain.
  2. (optional) rustup component add rustfmt provides auto-formatting for Rust code: cargo fmt
  3. (optional) rustup component add clippy provides linting! cargo clippy

Running

  1. Build and run the server with cargo run
  2. Point your favorite web browser at http://localhost:8080/
  3. Click the "Connect" button

Technical Design Goals

  • Client / Server -- The server consumes events, and handles state change and knowledge of the universe; the client renders state and provides the server with events. State and events should be structured in JSON.
  • Editable -- The world should be hand editable using common tools, for example, editing JSON files in a directory tree that can be version controlled with Git.
  • Efficient with memory and performance -- hence, Rust!

Implementation Overview

text.camp is implemented using the actor pattern, with the Actix actor framework.

The world is controlled via the World actor.

Rooms and spaces in the world are represented via Space structs inside of the World. Our heroic adventuring characters are represented as Hero structs, and items as Item structs.

Time is propagated via the TickMessage which is delivered to all of the active parts of the system. You can read about how the time system works in time.md.

Space, Hero, and Item descriptions are persisted as JSON in the data/world/ directory. See the Persistable trait to see how serialization/deserialization works.

Connection handling and state are handled by the Connection actor.

The root space can be found at 00/00/00/00000000.space

Details about the messages consumed by the actors are in messages.md

Todo (incomplete, obvs)

  • Looking at items, detailed descriptions
  • Add climate and time influence on descriptions
  • Test coverage? What's that? 😬 Seriously though, things are shifting so quickly that tests are difficult to maintain.

Legal

Copyright (c) 2018 Peat Bakke peat@peat.org.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.