Visual Novel with Renpy

Posted on
catn narrative computational-approaches-to-narrative

Ren’py is a tool for making visual novels, a format I associate with dating sims.

The package name seems to be a pun on the Japanese word for falling in love, 恋愛 ren’ai. The Japanese term for dating sim is ren’ai shimyurēshon gēmu, 恋愛シミュレーションゲーム. source

Ren’py is different from the other tools we’ve used so far in that it exposes the underlying programming language much more. In this case, the language is Python.

I was excited to be able to use Python data objects, import packages, and write functions. I ended up using the standard library packages random and hashlib.

I was a little disappointed that Ren’py is still on Python 2.7.

Koans

The story I wrote this week was in response to an in-class discussion about Zen koans.

The conversation was focused on the use of koans as a test of a student’s understanding of Buddhism. Koans are usually a question with a singe correct answer. Usually, the answer seems nonsensical to most people.

These properties reminded me of cryptographic hashing functions. One-way hashing functions take an input and output a random-seeming, but deterministic output (the same input always results in the same output). The output seems like noise, but it is not.

As relating back to Zen koans, the unpredictability of their answers shouldn’t be surprising since they should only be generated by a mind with a developed model of Buddhism.

Similarly to koans, crypto hashing functions are also used for various tests, such as validating authorship.

I also added a portion of the conversation where the student is forced to simply view various inputs and outputs of the MD5 hashing function. This is a nod to the focused, direct approach of Zen Buddhism towards mindfulness.

I’ve always thought of Zen Buddhism as a sort of brute-force approach to enlightenment. It is much more focused on attaining understanding and mindfulness through the experience of meditation than other forms of Buddhism.

Next Steps

I think there is an opportunity to make enjoyable educational content about computation using Ren’py since it provides a nice and simple interface that can guide users through content step-by-step. I imagine something like a Bubblesort zine, but in visual novel format.