Skip to main content
100%

Script to parse Dendry games for use in DendryScope.

✓ Published0🌍 Public
JJazzTap
Last edited Dec 31, 2025
Created on Dec 4, 2025

This script converts Dendry game scene files into a JSON AST, which is then loaded into DendryScope for interactive exploration. The visualization uses a force-directed graph where scenes are nodes and connections represent narrative transitions. Users can click scene names to require or forbid them, mouse over blocks to inspect scene versions, and pin blocks to enforce specific story events. The Python script relies on Pygments' custom lexer to tokenize the `.dry` files before parsing them into a nested tree structure using `defaultdict`.

AI-generated description
  1. Parse your Dendry game using this Python script from the command line or an IDE. Set scenesPath to your input and outPath to the desired filename.

  2. Clone the DendryScope repository, and replace ./dist/3d213cdc68443ea49186.json with your parsed game. Run python -m http.server, then open http://localhost:8000/ in your browser.
    https://github.com/JazzTap/DendryScope/tree/main

If you have an ObservableHQ account, then you can use their web interface instead of cloning my repository.

  1. Open the Observable notebook, and replace the file attachment bee-scenes-ast@2.json. The new skein will appear.
    https://observablehq.com/@jazztap/dendryscope-demo

Now your game is in Dendryscope. Click on the names of scenes to require or forbid them.

  • Mouse over blocks to inspect specific versions of scenes.
  • Click on blocks to pin that version of events: the blue pin demonstrates the event, and the black pin enforces it.

Changelog:
12/31/25 - fixed parse\2, which was super broken because is started checking for exact token subtype.
12/4/25 - initial upload

Similar vizzes