Skip to content

Echsecutor/story_adventure

Folders and files

NameName
Last commit message
Last commit date
Nov 15, 2024
Jan 18, 2025
Feb 15, 2025
Dec 25, 2024
Feb 15, 2025
Dec 18, 2024
Apr 13, 2024
Jan 18, 2025

Repository files navigation

Story Adventure Tools

This is a minimalist framework for writing / playing through (non-linear) stories.

If you like this, consider supporting further development!

Buy Me A Coffee

TL;DR

Introduction

Have a look at the example story to see the format.

A Story Adventure is primarily a set of Sections together with a State representing the current (initially the starting) state. The State can also hold variables that you can set initially (e.g. for consistent naming of entities) or change during the game.

Sections links to each other via Choices in the .next array of each section. Sections without choices are terminal. Sections can also contain Media, with a type (image/video) and the link to the src. This can also be embedded as a data link. Embedding Media has the advantage of creating an all-in-one file, but the obvious disadvantage of creating large files with inefficient encoding of binary data.

Choices may contain a description which is then actually displayed as a choice when playing through the adventure. If you leave the description empty, it is just a "next" type button to break long sections into readable chunks/change grafics. You likely do not want to do this if there is more then one choice.

Editor

Using the editor you can write your own story adventures by providing text and media for each section and linking the sections by choices.

Viewer

Using the viewer you can play thtough any story adventure.

Acknowledgment

We proudly acknowledge using the following open source components in this project:

  • Bootstrap 5 for UI components
  • Cytoscape.js for drawing the story graph in the editor -cytoscape-klay for the graph layout
  • marked for Markdown rendering in the viewer
  • DOMPurify for HTML sanitization in the viewer
  • JSZip for zipping (bundle export)
  • file-saver for large files directly from the browsers memory
  • esm.sh for converting the old JS packages among the above into esm modules

See there for the corresponding licenses and meta-dependencies.

License

Copyright 2024-2025 Sebastian Schmittner

AGPLV3

All code published in this repository is free software. Everything written by me, i.e. excluding the dependencies mentioned in the Acknowledgment, can be redistributed and/or modified under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

For the included open source projects, different licenses might be applicable. See the respective projects pages listed above for details.