Skip to main content

Write interactive fiction played with pencil, paper, and addition

Project description

Addventure

Write interactive fiction played with pencil, paper, and addition.

Players solve games by looking up a Verb ID and an Object ID, adding them together, finding the sum in a potentials list, and reading the corresponding ledger entry. No electronics needed at the table.

How It Works

A game compiles down to a printable PDF with these pages:

  • Title Page — intro text, cue checks, and the master potentials list (maps every valid sum to a ledger entry)
  • Actions & Inventory — verb IDs, inventory tracking slots, and signal codes
  • Room Sheets — one per location, listing objects and their IDs
  • Story Ledger — numbered narrative entries with instructions ("cross out X, write Y")
  • Fragments — sealed text passages, revealed during play (if the game uses them)

The player's loop: pick a verb, pick a target, add the IDs, look up the sum in the potentials list. If it's there, read the ledger entry and follow the instructions (state changes, item transfers, room transitions).

Quick Start

Python 3.10+. Uses uv as the runner. PDF output requires Typst installed on your system.

uv run addventure build                     # compile example game to PDF (example.pdf)
uv run addventure build games/example       # same thing, explicit path
uv run addventure build path/to/game        # your own game
uv run addventure build --md                # markdown output instead of PDF
uv run addventure build -o output.pdf       # custom output path
uv run addventure new my-game               # scaffold a new game directory

Writing Games

A game is a directory of .md files. You need one index.md for metadata, verbs, and items; all other .md files define rooms and are loaded alphabetically.

index.md

---
title: The Facility
author: Example
---

# Verbs
USE
TAKE
LOOK

# Inventory
CROWBAR
KEYCARD
KNIFE

The frontmatter metadata (title, author) is used in PDF sheet titles and page footers.

Room files

# Control Room
LOOK: Fluorescent lights buzz. Banks of dead equipment line the walls.

TERMINAL
+ LOOK: A dusty CRT. A keycard slot sits beside it.
+ USE + KEYCARD:
  You slide the keycard. The screen floods with data.
  - TERMINAL -> TERMINAL__UNLOCKED
    + LOOK: Scrolling text. A map shows the facility layout.
  - KEYCARD -> trash
  - room -> room__POWERED
    + LOOK: The room hums with energy. A hatch has opened in the floor.
    + HATCH -> room
      + LOOK: A dark opening, just wide enough to squeeze through.
      + USE:
        You lower yourself into the darkness.
        - player -> "Basement"

CRATE
+ LOOK: A heavy wooden crate, nailed shut.
+ USE + CROWBAR:
  You pry it open. A keycard glints inside.
  - CRATE -> CRATE__OPEN
    + LOOK: A splintered crate, lid hanging off.
  - KEYCARD -> room
    + LOOK: A small keycard among the splinters.
    + TAKE:
      You pocket the keycard.
      - KEYCARD -> player
  - CROWBAR -> trash

Example Output

Running uv run addventure build generates a PDF with sheets like:

THE FACILITY — ACTIONS & INVENTORY
========================================

  USE                  [ 32 ]
  TAKE                 [ 21 ]
  LOOK                 [ 51 ]
ROOM: CONTROL ROOM
Room ID: 144

Objects in this room:
  TERMINAL                 951
  CRATE                    963
  WALL_PANEL               662
  BINDINGS                 949

The potentials list maps sums to ledger entries (e.g., LOOK + TERMINAL = 51 + 951 = 1002 → Entry #5), and the story ledger contains the narrative with physical instructions for updating your sheets.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

addventure-2.1.0.tar.gz (2.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

addventure-2.1.0-py3-none-any.whl (584.8 kB view details)

Uploaded Python 3

File details

Details for the file addventure-2.1.0.tar.gz.

File metadata

  • Download URL: addventure-2.1.0.tar.gz
  • Upload date:
  • Size: 2.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for addventure-2.1.0.tar.gz
Algorithm Hash digest
SHA256 ed11750e321f9eb62b6271b5a74941667dd7f3e227dfc4d271234a7315cca407
MD5 4034bd8b37d5643fedb2343cca313c08
BLAKE2b-256 56cf0df398d0fa196f62aebf5f8b27d778f4437b63a41fae89439643bc164a45

See more details on using hashes here.

Provenance

The following attestation bundles were made for addventure-2.1.0.tar.gz:

Publisher: publish.yml on SmileyChris/addventure

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file addventure-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: addventure-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 584.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for addventure-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dddc17b6b32822dc1bad1310a1086b3c33ae868290c6ae8b333b7c3513297182
MD5 31f1586272ae865137da599545de0f2a
BLAKE2b-256 310fcf10272dc12aa3e8c7c1c5a44867160b00b27cfb7173c96e86de6ce5dbf2

See more details on using hashes here.

Provenance

The following attestation bundles were made for addventure-2.1.0-py3-none-any.whl:

Publisher: publish.yml on SmileyChris/addventure

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page