Skip to content

an event-driven text adventure engine for both narrative story telling and procedural dungeon crawling

License

Notifications You must be signed in to change notification settings

ssube/textual-engine

Repository files navigation

Textual Engine

This is a text adventure engine for the CLI and browsers, supporting both narrative fiction and procedural dungeon crawlers, using an event and service architecture.

See the demo on Github Pages or the getting started docs for more info.

snippet of wandering goblins and attacking bats

Features

  • text
  • adventure
  • worlds:
    • contextual verbs
    • item modifiers
    • persistent rooms
    • procedural expansion
    • geometric links
    • wandering monsters
  • engine:
    • localization of both input and output with i18next
    • structured logging with bunyan
    • multiple data loaders: fetch, file, local storage, and page elements
    • multiple input parsers: simple word and natural language
    • multiple rendering engines: readline, Ink, and React
    • save and reload game state
    • entity scripts for signals and verbs
  • planned:
    • chat client and network play
    • world editor for React browser UI

Contents

Building

Some make targets are provided:

  • make build: transpile Typescript sources
  • make test: build and run mocha tests
  • make cover: run make test with nyc code coverage

Playing

A recent version of the game is available on Github Pages.

If you have a copy of this repository checked out, the make run target will build and launch the game on the CLI, using the Ink rendering engine and demo world.

If you prefer to run a Docker image, the latest build is published as ssube/textual-engine:master-stretch, and can be run with:

> docker run --rm -it ssube/textual-engine:master-stretch \
  --config data/config.yml \
  --data file://data/demo.yml

Docs

More detailed docs are located in ./docs.

Available documentation includes:

License

This project uses the MIT license.

About

an event-driven text adventure engine for both narrative story telling and procedural dungeon crawling

Topics

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •