#game-engine #gamedev #game

pasaka

Interactive fiction game engine

2 releases

Uses new Rust 2024

0.1.1 Sep 19, 2025
0.1.0 Sep 7, 2025

#948 in Game dev

Custom license

28KB
742 lines

Example

use pasaka::*;

#[passage]
fn Example(mut h: PassageHandle, state: i32) -> PassageResult {
    h.text("Text can be outputted using .text.")
        .text("It can also be chained.")
        .text(format!("Count: {state}"));

    h.choice()
        .option("The expression is usually a choice", |h, state| {
            h.passage(Example, state + 1)
        })
        .build(state)
}


Pasaka

Pasaka is an interactive fiction game engine, designed to be highly-modular.

Features

  • Twine-inspired passage-based story creation, with choice-based gameplay.
  • Mix-and-match different structs for game state.
  • (De-)serialization of game state.
  • Game history, with undo/redo.
  • Web support out-of-the-box (with web feature)
  • Tracking previously visited passage

Planned features

  • Better html styling
  • Autosaving
  • Stacked passages, allowing for easy off-shoots and returns
  • Image support
  • Fancy options (e.g. disabled)

Planned non-features

  • Arbitrary HTML support

Dependencies

~3.5–9MB
~165K SLoC