Skip to main content
← Work
Creative Coding·2025

Algorithmic Storytelling: Rules, Interaction, and Narrative

p5.jsAnimationCollision zonesInteractive narrativeCritical play

Two studies

These studies came from an Emerging Media and Technology (EMAT) creative-coding course. The sequence moved from testing whether a canvas could carry a visual rule, to exploring sprite animation and interaction, to attempting a larger narrative prototype.

Study 01 · Sol LeWitt-inspired generative sketch

An 800×800 p5.js sketch uses rotating nested squares, randomly generated geometric shapes, transparency, and changing color. Clicking pauses or resumes the animation; vertical mouse position changes speed. ChatGPT helped with the loop structure and the mouse-position frame-rate function.

Open the Sol LeWitt study →

Study 02 · Algorithmic Storytelling v1 → v2 → v3

Versions 1 to 3 added sprite animation, collision zones, movement-triggered feedback, and a branching narrative. Version 3 is the one I submitted.

What the rules do

In the Sol LeWitt study, the rules are the experience: a click changes time, mouse position changes tempo, and randomness changes the arrangement.

In the storytelling prototype, the rules become spatial. Movement through zones triggers feedback and changes what the player can do next.

What went wrong

I did not finish the version I planned. Implementation was difficult and debugging took substantial time. ChatGPT helped debug the sketch.

I learned to separate a small finished interaction from a larger prototype that still needs work. I also learned that choosing a political theme does not put the idea in the game. If surveillance, resistance, or self-protection matter, the mechanics have to show them, and that has to be tested.

Play version 3

The p5.js editor contains the v3 submission.

Open Algorithmic Storytelling v3 →

Where this goes next

SensorSynthFM picks up the same interest in how an input becomes a sound.

p5.jsGenerative rulesAnimation timingSprite interactionCollision designNarrative systemsAI-assisted debuggingCreative coding reflection