The open source, JavaScript game engine for running text-based adventure games

Background

text quest is an open source game engine for running text-based adventure games; using a low/no code approach to game design.

A list of available games can be found on the text quest home page. You can also read more about the games in detail in the games section (be careful - spoilers alert!).

Motivation

Text quest was create to:

  1. Inspire creative story writing (without images, CGI or video)
  2. Create a low/no code solution for building games (using YAML)
  3. Bootstrap something as quickly as possible to test the above (and not get bogged down with tooling, libraries and frameworks)
  4. Provide a little escapism during these unusual times

Game Design

Games are defined using YAML. A sample game can be seen below, it contains the game, player, powers and single block (See: concepts for more detail):

game:
  name: Single Room Example Game
  version: 1.0
  description: Use commands to in a single room
  author: <a href="https://github.com/desholmes">Des Holmes</a>
  intro: '"Where am I?!?, maybe I should <b>look</b> around."</p>'

player:
  name: "Des"
  block: entrance
  bag:
  powers:
  blockHistory:

powers:
  help:
    description: "help: Lists your powers and any hints."
  look:
    description: "look: Use `look` for a description of your surroundings."
  powers:
    description: "powers: List the powers you have unlocked."

blocks:
  ######
  # SINGLE ROOM
  ######
  entrance:
    state: default
    states:
      default:
        name: "Single room"
        description: "You're in a single room game, nothing much to see in here."

Concepts

Here’s an overview of the core concepts within a games:

  • Blocks: A block represents a single location within the game. A block can have:
    • exits: Connections to other blocks
    • states: Variations for a block state (containing exits, actions, items)
    • items: Items which are ‘visible’ from within a block state
    • actions: Actions which can be performed by the player within a block state, and actions which can be triggered automatically based on what a player is carrying
  • Game: The name, version and author for the game
  • Player: The name, current block location, powers and items they are carrying
  • Powers: Descriptions for powers a player can unlock (not listed here, as they are part of the game)
  • Items: Descriptions for items which the player can carry, or can be found in a block

Technical Details

This project currently uses:

  1. JavaScript as the core programming language for the game engine
  2. Parcel web application bundler
  3. text-terminal for the terminal interface
  4. YAML to store the game configuration
  5. ascii generator for the logo
  6. github-fork-ribbon-css

Development

If you’re interesting in contributing head over to the text quest GitHub project.

Future Roadmap

The follow features are currently being considered for future development.

  1. Introduce characters as a concept (and associated powers)
  2. Cross over with voice activation project (coming soon)
  3. Upload/point to yaml URL (incl. Game yaml validator)
  4. Create a supporting website with docs and links to games
  5. Online game editor (visual, or text based)

Cross post from textquest.io/about.


Related Posts