Pangamebook

Pangamebook is a free filter I wrote for the (also free) Pandoc document conversion tool. It shuffles and numbers sections to create (static) gamebooks. So this is for choice-based IF that can be represented on paper, or in a EPUB, but not for those fancy scripted books where the computer keeps track of stuff for you. It also comes with a second script called pangamebookdot that generates a DOT file for Graphviz, so you can visualize how all the sections in the gamebook are connected. All is explained in the README, at least in theory.

If this sounds vaguely familiar it is probably because of the (equally cleverly named) gamebookformat tool that I posted about here a few years ago. That one was much more complex as it had its own configurable template system for various output formats. Pangamebook building on top of Pandoc is a much more sane approach to do the same thing. There are a few advanced features of gamebookformat that are not in pangamebook (yet?) but I think the only must-haves to layout a gamebook are included and other than bugfixes I have no further plans for it.

5 Likes

This seems like a very very interesting tool. :slight_smile:

Thanks! I just pushed a small bugfix. The README mentions that there is an error to use a hardcoded section number that is too low, but in reality there was no error (it just caused the section to be assigned a higher number than the intended). Now it will hopefully work as intended (i.e. it will crash and tell you you did wrong instead of just silently accept the wrong number).

And yet another small bugfix. The graph output included boring automatically generated section names like “section-1”, “section-2” etc that were added for sections with hardcoded numbers. Those are hidden now. As a bonus made the graph nodes look slightly prettier by adding a new-line between number and name.

1 Like