/chasm

CHAracter State Management - a generative text adventure

Primary LanguageHyGNU Affero General Public License v3.0AGPL-3.0

Chasm - CHAracter State Manager (game client)

Chasm is a generative text adventure game in a world you specify. It uses generative artificial intelligence to generate scenes and characters as you play. Unlike simply role-playing with a chatbot, important state persists (locations, characters, dialogue etc.)

See the example gameplay for what a new game can be like.

This is the client software that connects to a server. To play, you need to connect to a server.

Chasm is still being written. It's already pretty great though, with a good model.

Features

  • specify initial world with a short description
  • persistent world / locations
  • fuzzy matching names of locations
  • continue / save file for game
  • persistent items
  • character inventory
  • per-character event memory
  • per-character quests
  • take, drop, use items
  • permanently modify items
  • natural item interaction
  • natural item spawning from narrative
  • NPCs should interact with items
  • NPCs should interact with plot, follow quests
  • NPCs should travel
  • persistent global event memory (plot events in vector db)
  • per-character dialogue memory (snippets in vector db)
  • play as any character
  • world editor / admin repl for manual world construction
  • multiplayer - separate async server with many clients
  • player authentication

Installing and running

Installing

There are some dependencies so you may want to install everything in a virtual environment. To install using pip:

$ <activate your venv>
$ pip3 install -U git+https://github.com/atisharma/chasm
# edit the client.toml file (see below), for example using nano
$ nano client.toml
$ chasm

You may want to consider using pyenv for complete control over your python version.

Running the client

Check your settings in client.toml, activate your venv and invoke chasm from inside your terminal, so

$ chasm

will connect to the server with the character name set in the client.toml config (see the example). You'll need to specify a passphrase which will be the key for your character.

name = "Hero"
passphrase = "sup3r-secr3t un1que pa55phrase"
# connect to a world on a specific port on the server
chasm_server = "tcp://chasm.run:PORT"
loglevel = "info"

where PORT is the port number of your world.

You'll need to run it inside a terminal that can handle escape characters (colour etc). Any linux terminal should work - I'm not sure about Windows.

Character cards

If you want to override your or any other character's attributes permanently, create a file characters/Hero.json (if your character's name is Hero) with the contents

{
    "name": "Hero",
    "appearance": "Heroic",
    "gender": "Hero's gender",
    "backstory": "Comes from a long line of heroes; heroic from an early age.",
    "voice": "Heroic",
    "traits": "Heroism",
    "likes": "Being heroic",
    "dislikes": "Not being heroic",
    "motivation": "To be heroic"
}

reflecting the desired values. Leave out fields and they'll be automatically generated. The name field is ignored (since it's implicit in the filename).

Interface

  • management done by config files
  • terminal interface
  • web chat interface, since should be remotely available?
  • map display?

Problems / bugs

There are still many.