Ren’Py is a tool to build interactive novels from code.
In these novels, the player/reader must choose between different choices. This leads to a tree structure. It is not easy to have an accurate and correct view of the story that is written from the pure code.
I needed a tool to organize my 10k+lines Ren’Py project.
So I created my own tool in #Go.
It is a text analyser that draws a graph of the project from its source code. Here is an extract of the graph that can be generated:
What I learned:
- Go data structures (
struct
,map
) and methods over a type - RegEx a lot
- Go cross-compilation
- Cross-compilation is hard when using a C library
- Graphviz, a graph library
- dot language, used along with graphviz
Learn more about the tool on Github.